Skip to content

Commit c8515b3

Browse files
authored
Bump Ansible version_tested_max to 2.4.3.0 (#945)
Also fix `replace_item_with_key()` custom output method to handle tasks that use `with_dict` and `no_log`. Prevents errors such as: [WARNING]: Failure using method (v2_runner_item_on_skipped) in callback plugin (<ansible.plugins.callback.output.CallbackModule object at 0x7f9cd2039150>): 'item'
1 parent a48c0c5 commit c8515b3

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### HEAD
2+
* Bump Ansible `version_tested_max` to 2.4.3.0 ([#945](https://github.com/roots/trellis/pull/945))
23
* Update wp-cli to 1.5.0 ([#944](https://github.com/roots/trellis/pull/944))
34
* Update `vagrant_box_version` to `>= 201801.02.0` ([#939](https://github.com/roots/trellis/pull/939))
45
* Bump Ansible `version_tested_max` to 2.4.2.0 ([#932](https://github.com/roots/trellis/pull/932))

lib/trellis/plugins/vars/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
display = Display()
1515

1616
version_requirement = '2.4.0.0'
17-
version_tested_max = '2.4.2.0'
17+
version_tested_max = '2.4.3.0'
1818

1919
if not ge(LooseVersion(__version__), LooseVersion(version_requirement)):
2020
raise AnsibleError(('Trellis no longer supports Ansible {}.\n'

lib/trellis/utils/output.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ def reset_task_info(obj, task=None):
4545

4646
# Display dict key only, instead of full json dump
4747
def replace_item_with_key(obj, result):
48-
if not obj._display.verbosity and 'label' not in result._task._ds.get('loop_control', {}):
49-
item = '_ansible_item_label' if '_ansible_item_label' in result._result else 'item'
48+
item = '_ansible_item_label' if '_ansible_item_label' in result._result else 'item'
49+
should_replace = (
50+
not obj._display.verbosity
51+
and 'label' not in result._task._ds.get('loop_control', {})
52+
and item in result._result
53+
)
54+
55+
if should_replace:
5056
if 'key' in result._result[item]:
5157
result._result[item] = result._result[item]['key']
5258
elif type(result._result[item]) is dict:

vagrant.default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vagrant_cpus: 1
44
vagrant_memory: 1024 # in MB
55
vagrant_box: 'bento/ubuntu-16.04'
66
vagrant_box_version: '>= 201801.02.0'
7-
vagrant_ansible_version: '2.4.2.0'
7+
vagrant_ansible_version: '2.4.3.0'
88
vagrant_skip_galaxy: false
99

1010
vagrant_install_plugins: true

0 commit comments

Comments
 (0)