Skip to content

Commit

Permalink
Assert if ansible 2.7 is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ant31 committed Oct 25, 2018
1 parent 7abd4ee commit 6e0e219
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ To deploy the cluster you can use :

### Ansible

#### Ansible version

Ansible v2.7.0 is failing and/or produce unexpected results due to [ansible/ansible/issues/46600](https://github.com/ansible/ansible/issues/46600)

#### Usage

# Install dependencies from ``requirements.txt``
sudo pip install -r requirements.txt

Expand Down
13 changes: 13 additions & 0 deletions cluster.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
- hosts: localhost
tasks:
- name: Check ansible version <2.7
assert:
msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
that:
- ansible_version.string is version("2.7.0", "<")
- ansible_version.string is version("2.5.0", ">=")
tags:
- check
vars:
ansible_connection: local

- hosts: bastion[0]
gather_facts: False
roles:
Expand Down
12 changes: 12 additions & 0 deletions remove-node.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
---
- hosts: localhost
tasks:
- name: Check ansible version <2.7
assert:
msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
that:
- ansible_version.string is version("2.7.0", "<")
- ansible_version.string is version("2.5.0", ">=")
tags:
- check
vars:
ansible_connection: local

- hosts: all
vars:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible>=2.5.0
ansible>=2.5.0,<2.7
jinja2>=2.9.6
netaddr
pbr>=1.6
Expand Down
12 changes: 12 additions & 0 deletions reset.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
---
- hosts: localhost
tasks:
- name: Check ansible version <2.7
assert:
msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
that:
- ansible_version.string is version("2.7.0", "<")
- ansible_version.string is version("2.5.0", ">=")
tags:
- check
vars:
ansible_connection: local

- hosts: all
gather_facts: true
Expand Down
13 changes: 13 additions & 0 deletions scale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
- hosts: localhost
tasks:
- name: Check ansible version <2.7
assert:
msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
that:
- ansible_version.string is version("2.7.0", "<")
- ansible_version.string is version("2.5.0", ">=")
tags:
- check
vars:
ansible_connection: local

- hosts: bastion[0]
gather_facts: False
roles:
Expand Down
13 changes: 13 additions & 0 deletions upgrade-cluster.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
- hosts: localhost
tasks:
- name: Check ansible version <2.7
assert:
msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
that:
- ansible_version.string is version("2.7.0", "<")
- ansible_version.string is version("2.5.0", ">=")
tags:
- check
vars:
ansible_connection: local

- hosts: bastion[0]
gather_facts: False
roles:
Expand Down

0 comments on commit 6e0e219

Please sign in to comment.