Skip to content

Commit

Permalink
bump minimal ansible version to 2.8.0 (kubernetes-sigs#5984)
Browse files Browse the repository at this point in the history
* bump minimal ansible version to 2.8.0

* check ansible version in separate playbook
  • Loading branch information
LuckySB authored Apr 22, 2020
1 parent b0484fe commit aead0e3
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 78 deletions.
15 changes: 15 additions & 0 deletions ansible_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- hosts: localhost
gather_facts: false
become: no
vars:
minimal_ansible_version: 2.8.0
ansible_connection: local
tasks:
- name: "Check ansible version >={{ minimal_ansible_version }}"
assert:
msg: "Ansible must be {{ minimal_ansible_version }} or higher"
that:
- ansible_version.string is version(minimal_ansible_version, ">=")
tags:
- check
15 changes: 2 additions & 13 deletions cluster.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- hosts: localhost
gather_facts: false
become: no
tasks:
- name: "Check ansible version >=2.7.8"
assert:
msg: "Ansible must be v2.7.8 or higher"
that:
- ansible_version.string is version("2.7.8", ">=")
tags:
- check
vars:
ansible_connection: local
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: all
gather_facts: false
Expand Down
4 changes: 4 additions & 0 deletions mitogen.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: localhost
strategy: linear
vars:
mitogen_version: master
mitogen_url: https://github.com/dw/mitogen/archive/{{ mitogen_version }}.zip
ansible_connection: local
tasks:
- name: Create mitogen plugin dir
file:
Expand Down
15 changes: 2 additions & 13 deletions recover-control-plane.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- hosts: localhost
gather_facts: False
become: no
tasks:
- name: "Check ansible version >=2.7.8"
assert:
msg: "Ansible must be v2.7.8 or higher"
that:
- ansible_version.string is version("2.7.8", ">=")
tags:
- check
vars:
ansible_connection: local
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: bastion[0]
gather_facts: False
Expand Down
15 changes: 2 additions & 13 deletions remove-node.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- hosts: localhost
become: no
gather_facts: no
tasks:
- name: "Check ansible version >=2.7.8"
assert:
msg: "Ansible must be v2.7.8 or higher"
that:
- ansible_version.string is version("2.7.8", ">=")
tags:
- check
vars:
ansible_connection: local
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: "{{ node | default('etcd:k8s-cluster:calico-rr') }}"
gather_facts: no
Expand Down
15 changes: 2 additions & 13 deletions reset.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- hosts: localhost
become: no
gather_facts: False
tasks:
- name: "Check ansible version >=2.7.8"
assert:
msg: "Ansible must be v2.7.8 or higher"
that:
- ansible_version.string is version("2.7.8", ">=")
tags:
- check
vars:
ansible_connection: local
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: bastion[0]
gather_facts: False
Expand Down
15 changes: 2 additions & 13 deletions scale.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- hosts: localhost
gather_facts: False
become: no
tasks:
- name: "Check ansible version >=2.7.8"
assert:
msg: "Ansible must be v2.7.8 or higher"
that:
- ansible_version.string is version("2.7.8", ">=")
tags:
- check
vars:
ansible_connection: local
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: all
gather_facts: false
Expand Down
15 changes: 2 additions & 13 deletions upgrade-cluster.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
---
- hosts: localhost
gather_facts: false
become: no
tasks:
- name: "Check ansible version >=2.7.8"
assert:
msg: "Ansible must be v2.7.8 or higher"
that:
- ansible_version.string is version("2.7.8", ">=")
tags:
- check
vars:
ansible_connection: local
- name: Check ansible version
import_playbook: ansible_version.yml

- hosts: all
gather_facts: false
Expand Down

0 comments on commit aead0e3

Please sign in to comment.