Browse Source

using apt module instead of command module to install python-apt

pull/188/head
teuto.net Netzdienste GmbH 8 years ago
parent
commit
4271dd6645
1 changed files with 2 additions and 7 deletions
  1. 9
      roles/kubernetes/preinstall/tasks/main.yml

9
roles/kubernetes/preinstall/tasks/main.yml

@ -61,16 +61,12 @@
- "/opt/cni/bin"
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)
yum: update_cache=yes name='*'
when: ansible_pkg_mgr == 'yum'
- name: Install python-apt for Debian distribs
command: apt-get install -y python-apt
- name: Install latest version of python-apt for Debian distribs
apt: name=python-apt state=latest update_cache=yes cache_valid_time=3600
when: ansible_os_family == "Debian"
changed_when: False
@ -78,7 +74,6 @@
command: dnf install -y python-dnf yum
when: ansible_distribution == "Fedora" and
ansible_distribution_major_version > 21
changed_when: False
- 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

Loading…
Cancel
Save