Use {{ ansible_pkg_mgr }} instead of yum

This should make things work on systems with dnf and even on systems
which use apt!
This commit is contained in:
Eric Paris 2015-05-30 10:34:37 -04:00
parent 3af9346596
commit b0b3b03045
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,9 @@
---
- name: Install etcd
yum: pkg=etcd state=latest
action: "{{ ansible_pkg_mgr }}"
args:
name: etcd
state: latest
notify:
- restart etcd
when: not is_atomic

View File

@ -3,7 +3,10 @@
when: ansible_distribution == "Fedora"
- name: Install kubernetes
yum: pkg=kubernetes state=latest
action: "{{ ansible_pkg_mgr }}"
args:
name: kubernetes
state: latest
notify:
- restart daemons
when: not is_atomic