Fix deprecation warnings (#4130)
* use not deprecated ansible_play_hosts variable * Using tests as filters is deprecated * Fix deprecation warning about pkg listpull/4162/head
parent
1abd3cf3d7
commit
7f93a5a0f5
|
@ -9,7 +9,7 @@
|
||||||
- docker.io
|
- docker.io
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'Debian'
|
- ansible_os_family == 'Debian'
|
||||||
- (docker_versioned_pkg[docker_version | string] | search('docker-ce'))
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
||||||
|
|
||||||
- name: Ensure old versions of Docker are not installed. | RedHat
|
- name: Ensure old versions of Docker are not installed. | RedHat
|
||||||
package:
|
package:
|
||||||
|
@ -28,5 +28,5 @@
|
||||||
- docker-engine-selinux.noarch
|
- docker-engine-selinux.noarch
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == 'RedHat'
|
- ansible_os_family == 'RedHat'
|
||||||
- (docker_versioned_pkg[docker_version | string] | search('docker-ce'))
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
||||||
- not is_atomic
|
- not is_atomic
|
||||||
|
|
|
@ -88,13 +88,12 @@
|
||||||
- name: Install packages requirements
|
- name: Install packages requirements
|
||||||
action:
|
action:
|
||||||
module: "{{ ansible_pkg_mgr }}"
|
module: "{{ ansible_pkg_mgr }}"
|
||||||
name: "{{ item }}"
|
name: "{{ required_pkgs | default([]) | union(common_required_pkgs|default([])) }}"
|
||||||
state: latest
|
state: latest
|
||||||
register: pkgs_task_result
|
register: pkgs_task_result
|
||||||
until: pkgs_task_result is succeeded
|
until: pkgs_task_result is succeeded
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
with_items: "{{required_pkgs | default([]) | union(common_required_pkgs|default([]))}}"
|
|
||||||
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "ClearLinux"] or is_atomic)
|
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "ClearLinux"] or is_atomic)
|
||||||
tags:
|
tags:
|
||||||
- bootstrap-os
|
- bootstrap-os
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
run_once: true
|
run_once: true
|
||||||
delegate_to: "{{groups['kube-master'][0]}}"
|
delegate_to: "{{groups['kube-master'][0]}}"
|
||||||
register: nca_pod
|
register: nca_pod
|
||||||
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(play_hosts)|length * 2
|
until: nca_pod.stdout_lines|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 10
|
delay: 10
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
delay: "{{ agent_report_interval }}"
|
delay: "{{ agent_report_interval }}"
|
||||||
until: agents.content|length > 0 and
|
until: agents.content|length > 0 and
|
||||||
agents.content[0] == '{' and
|
agents.content[0] == '{' and
|
||||||
agents.content|from_json|length >= groups['k8s-cluster']|intersect(play_hosts)|length * 2
|
agents.content|from_json|length >= groups['k8s-cluster']|intersect(ansible_play_hosts)|length * 2
|
||||||
failed_when: false
|
failed_when: false
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue