andreaswolf / ansible-role-letsencrypt

Ansible role for generating certificates with acme-tiny via Let’s encrypt
46 stars 20 forks source link

[BUGIFX] ensure git is installed #15

Open lynxis opened 8 years ago

andreaswolf commented 8 years ago

I would rather like to not tie this directly to one family of OSes. Then let’s see if we can instead download the zip file from Github instead (which would also make the process a lot faster).

emmetog commented 8 years ago

How about using a conditional, like this:

- name: ensure git is present (apt)
  apt: name=git state=present cache_valid_time=3600 update_cache=yes
  when: ansible_pkg_mgr == 'apt'

- name: ensure git is present (yum)
  yum: name=git state=present update_cache=yes
  when: ansible_pkg_mgr == 'yum'