Bump ansible version constraints to >=2.7,<2.10
This means that ansible 2.9 is typically used, and causes ansible-lint to fail. Two workarounds have been added to address this: * Use .get() to avoid passing an undefined object through to_nice_yaml filter * Create a dummy tenks_update_state.py module to avoid ansible-lint being confused about our action plugin. Change-Id: I54388f713e17a47601be2db63a26fc43ca7ac6c8
This commit is contained in:
parent
3db82fd551
commit
512174a828
@ -18,5 +18,7 @@
|
|||||||
copy:
|
copy:
|
||||||
# tenks_schedule lookup plugin outputs a dict. Pretty-print this to
|
# tenks_schedule lookup plugin outputs a dict. Pretty-print this to
|
||||||
# persist it in a YAML file.
|
# persist it in a YAML file.
|
||||||
content: "{{ new_state.result | to_nice_yaml }}"
|
# NOTE(mgoddard): Use .get to avoid a nasty error in ansible-lint
|
||||||
|
# (cannot represent an object).
|
||||||
|
content: "{{ new_state.get('result') | to_nice_yaml }}"
|
||||||
dest: "{{ state_file_path }}"
|
dest: "{{ state_file_path }}"
|
||||||
|
2
ansible/library/tenks_update_state.py
Normal file
2
ansible/library/tenks_update_state.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# NOTE(mgoddard): Dummy module to fudge ansible-lint into working.
|
||||||
|
# tenks_update_state is actually an action_plugin.
|
@ -12,7 +12,7 @@
|
|||||||
- name: Ensure package dependencies are installed
|
- name: Ensure package dependencies are installed
|
||||||
package:
|
package:
|
||||||
name: "{{ vbmcd_packages }}"
|
name: "{{ vbmcd_packages }}"
|
||||||
state: installed
|
state: present
|
||||||
register: result
|
register: result
|
||||||
until: result is success
|
until: result is success
|
||||||
retries: 3
|
retries: 3
|
||||||
|
@ -50,5 +50,7 @@
|
|||||||
copy:
|
copy:
|
||||||
# tenks_schedule lookup plugin outputs a dict. Pretty-print this to
|
# tenks_schedule lookup plugin outputs a dict. Pretty-print this to
|
||||||
# persist it in a YAML file.
|
# persist it in a YAML file.
|
||||||
content: "{{ new_state.result | to_nice_yaml }}"
|
# NOTE(mgoddard): Use .get to avoid a nasty error in ansible-lint
|
||||||
|
# (cannot represent an object).
|
||||||
|
content: "{{ new_state.get('result') | to_nice_yaml }}"
|
||||||
dest: "{{ state_file_path }}"
|
dest: "{{ state_file_path }}"
|
||||||
|
5
releasenotes/notes/ansible-2.7-2.8-63f01fbf5ab9ba08.yaml
Normal file
5
releasenotes/notes/ansible-2.7-2.8-63f01fbf5ab9ba08.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Updates the minimum allowed version of Ansible from 2.6 to 2.7, and the
|
||||||
|
maximum allowed version from 2.7.x to 2.9.x.
|
@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
pbr>=2.0 # Apache-2.0
|
pbr>=2.0 # Apache-2.0
|
||||||
# NOTE(mgoddard): Ansible 2.8.0 breaks ansible-lint.
|
# NOTE(mgoddard): Ansible 2.8.0 breaks ansible-lint.
|
||||||
ansible>=2.6.0,<2.8.0 # GPLv3
|
ansible>=2.7.0,<2.10.0 # GPLv3
|
||||||
os-client-config # Apache-2.0
|
os-client-config # Apache-2.0
|
||||||
selinux;python_version>='3' # MIT
|
selinux;python_version>='3' # MIT
|
||||||
|
Loading…
Reference in New Issue
Block a user