diff --git a/README.md b/README.md index e20b3bc1454..1d674d6d74a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cluster.yml b/cluster.yml index 5b748da594a..3b6297c5a5f 100644 --- a/cluster.yml +++ b/cluster.yml @@ -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: diff --git a/remove-node.yml b/remove-node.yml index 0fae1a99425..aceed33acbd 100644 --- a/remove-node.yml +++ b/remove-node.yml @@ -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: diff --git a/requirements.txt b/requirements.txt index 59034dff53f..fed7afe5052 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ansible>=2.5.0 +ansible>=2.5.0,<2.7 jinja2>=2.9.6 netaddr pbr>=1.6 diff --git a/reset.yml b/reset.yml index 959487b8a26..de47fafcab5 100644 --- a/reset.yml +++ b/reset.yml @@ -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 diff --git a/scale.yml b/scale.yml index 81ddef8211c..1be060ce384 100644 --- a/scale.yml +++ b/scale.yml @@ -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: diff --git a/upgrade-cluster.yml b/upgrade-cluster.yml index 69e312794ba..8397341f4e8 100644 --- a/upgrade-cluster.yml +++ b/upgrade-cluster.yml @@ -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: