diff options
| author | Kevin Fenzi <kevin@scrye.com> | 2015-11-07 20:06:35 +0000 |
|---|---|---|
| committer | Kevin Fenzi <kevin@scrye.com> | 2015-11-07 20:06:35 +0000 |
| commit | 7eebae7c897db068f8878d2ccf6406594760093d (patch) | |
| tree | 1b08d8a68a8e03d4a95b2cdb53dc3a8385d8df1a /roles/apache/tasks | |
| parent | 439955157d6a781c698c7256dd72331914533e80 (diff) | |
| download | ansible-7eebae7c897db068f8878d2ccf6406594760093d.tar.gz ansible-7eebae7c897db068f8878d2ccf6406594760093d.tar.xz ansible-7eebae7c897db068f8878d2ccf6406594760093d.zip | |
Adjust for dnf vs yum
Diffstat (limited to 'roles/apache/tasks')
| -rw-r--r-- | roles/apache/tasks/main.yml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/roles/apache/tasks/main.yml b/roles/apache/tasks/main.yml index 17c6890d2..9dc55f020 100644 --- a/roles/apache/tasks/main.yml +++ b/roles/apache/tasks/main.yml @@ -1,6 +1,6 @@ --- # install apache(httpd) -- name: install apache +- name: install apache (yum) yum: name={{ item }} state=present with_items: - httpd @@ -8,6 +8,18 @@ tags: - packages - apache + when: ansible_distribution_major_version|int < 22 + +# install apache(httpd) +- name: install apache (dnf) + dnf: name={{ item }} state=present + with_items: + - httpd + - httpd-tools + tags: + - packages + - apache + when: ansible_distribution_major_version|int > 22 - name: set apache running/enabled service: name=httpd enabled=yes |
