mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Merge pull request #188 from teutostack/warnings-removal
Fixing deprecation warnings regarding bare variables and apt
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
- meta: flush_handlers
|
||||
|
||||
- include: start.yml
|
||||
with_items: groups['kube-master']
|
||||
with_items: "{{ groups['kube-master'] }}"
|
||||
when: "{{ hostvars[item].inventory_hostname == inventory_hostname }}"
|
||||
|
||||
# Create kube-system namespace
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
create: yes
|
||||
backup: yes
|
||||
when: hostvars[item].ansible_default_ipv4.address is defined
|
||||
with_items: groups['all']
|
||||
with_items: "{{ groups['all'] }}"
|
||||
|
||||
- name: Hosts | populate kubernetes loadbalancer address into hosts file
|
||||
lineinfile:
|
||||
|
||||
@@ -64,18 +64,13 @@
|
||||
- "/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
|
||||
|
||||
- name: Install python-dnf for latest RedHat versions
|
||||
command: dnf install -y python-dnf yum
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
mode: 0600
|
||||
with_items: keyfiles.stdout_lines
|
||||
with_items: "{{ keyfiles.stdout_lines }}"
|
||||
|
||||
Reference in New Issue
Block a user