From 28e105c05689f3b8fc046758f9218e9ffab51360 Mon Sep 17 00:00:00 2001 From: "Jesse Pretorius (odyssey4me)" Date: Tue, 29 Oct 2019 10:54:24 +0000 Subject: [PATCH] Revert "Workaround for ansible-lint installation failure" This reverts the disabling of the ansible-lint test from commit cffd4fc9d41b15c31610dee4abd8786916f5933b and updates ansible-lint to the fixed version. Included are fixes for ansible-lint test failures which got merged as part of I2f88caa8e1c230dfe846a8a0dd9f939b98992cd5 while the lint test was disabled. Change-Id: I37100f5e1764a5cd2cb8df82ae963e673ca0a8da --- .pre-commit-config.yaml | 2 +- tox.ini | 4 +--- .../roles/tripleo-container-manage/tasks/main.yml | 11 +++++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 137387c2c..0ed54242a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: types: [file, yaml] entry: yamllint --strict -f parsable - repo: https://github.com/ansible/ansible-lint - rev: v4.1.0a0 + rev: v4.1.1a2 hooks: - id: ansible-lint files: \.(yaml|yml)$ diff --git a/tox.ini b/tox.ini index e8378f433..1f3b8ea7d 100644 --- a/tox.ini +++ b/tox.ini @@ -82,9 +82,7 @@ deps = -r {toxinidir}/molecule-requirements.txt commands = {[testenv:pep8]commands} - #TODO(ekultails): Re-enable after this is fixed - # https://github.com/ansible/ansible-lint/issues/590 - #{[testenv:ansible-lint]commands} + {[testenv:ansible-lint]commands} {[testenv:bashate]commands} {[testenv:yamllint]commands} {[testenv:whitespace]commands} diff --git a/tripleo_ansible/roles/tripleo-container-manage/tasks/main.yml b/tripleo_ansible/roles/tripleo-container-manage/tasks/main.yml index 7e744f66e..5c8376a3d 100644 --- a/tripleo_ansible/roles/tripleo-container-manage/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-container-manage/tasks/main.yml @@ -53,15 +53,18 @@ src: "{{ item.path }}" register: containers_data loop: "{{ hashed_files.files }}" - - set_fact: - container_hash: "{'{{ item.source|basename|regex_replace('^hashed-','')|regex_replace('.json$','')}}': {{item.content|b64decode|from_json}} }" + - name: Prepare container hashes from config + set_fact: + container_hash: "{'{{ item.source|basename|regex_replace('^hashed-','')|regex_replace('.json$','') }}': {{ item.content|b64decode|from_json }} }" register: container_hashes loop: "{{ containers_data['results'] }}" - - set_fact: + - name: Compile container hashes from results + set_fact: container_hash: "{{ item.ansible_facts.container_hash | combine(item.ansible_facts.container_hash) }}" register: container_hashes loop: "{{ container_hashes.results }}" - - set_fact: + - name: Finalise hashes for all containers + set_fact: all_containers_hash: "{{ container_hashes.results | map(attribute='ansible_facts.container_hash') | list | singledict() }}" - name: Manage containers with Podman