using apt module instead of command module to install python-apt
parent
457ed11b49
commit
4271dd6645
|
@ -61,16 +61,12 @@
|
||||||
- "/opt/cni/bin"
|
- "/opt/cni/bin"
|
||||||
when: kube_network_plugin == "calico"
|
when: kube_network_plugin == "calico"
|
||||||
|
|
||||||
- name: Update package management cache (APT)
|
|
||||||
apt: update_cache=yes
|
|
||||||
when: ansible_pkg_mgr == 'apt'
|
|
||||||
|
|
||||||
- name: Update package management cache (YUM)
|
- name: Update package management cache (YUM)
|
||||||
yum: update_cache=yes name='*'
|
yum: update_cache=yes name='*'
|
||||||
when: ansible_pkg_mgr == 'yum'
|
when: ansible_pkg_mgr == 'yum'
|
||||||
|
|
||||||
- name: Install python-apt for Debian distribs
|
- name: Install latest version of python-apt for Debian distribs
|
||||||
command: apt-get install -y python-apt
|
apt: name=python-apt state=latest update_cache=yes cache_valid_time=3600
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
|
@ -78,7 +74,6 @@
|
||||||
command: dnf install -y python-dnf yum
|
command: dnf install -y python-dnf yum
|
||||||
when: ansible_distribution == "Fedora" and
|
when: ansible_distribution == "Fedora" and
|
||||||
ansible_distribution_major_version > 21
|
ansible_distribution_major_version > 21
|
||||||
changed_when: False
|
|
||||||
|
|
||||||
- name: Install epel-release on RHEL
|
- name: Install epel-release on RHEL
|
||||||
command: rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
|
command: rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
|
||||||
|
|
Loading…
Reference in New Issue