See if we can handle the yum, dnf and ostree cases right.

This commit is contained in:
Kevin Fenzi 2015-05-13 23:39:35 +00:00
parent fe59adfd6b
commit b42db39955
2 changed files with 7 additions and 3 deletions

View file

@ -49,10 +49,14 @@
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- name: install cloud-utils
- name: install cloud-utils (yum)
yum: pkg=cloud-utils state=present
when: ansible_distribution_major_version < '22'
- name: install cloud-utils (dnf)
command: dnf install -y cloud-utils
when: ansible_distribution_major_version > '21' and not ansible_cmdline.ostree
- include: "{{ tasks }}/cloud_setup_basic.yml"
handlers:

View file

@ -13,7 +13,7 @@
- name: ntp pkgs
command: dnf install -y ntpdate ntp libsemanage-python libselinux-python
when: ansible_distribution_major_version > '22'
when: ansible_distribution_major_version > '21' and not ansible_cmdline.ostree
tags:
- packages
@ -61,7 +61,7 @@
- name: update all
command: dnf -y update creates=/etc/sysconfig/global-update-applied
register: updated
when: ansible_distribution_major_version > '21'
when: ansible_distribution_major_version > '21' and not ansible_cmdline.ostree
tags:
- packages