From 8725a1ee53c75ee25cfa7ae5883dc1c623633f31 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 18 Oct 2019 05:31:10 +0900 Subject: [PATCH] Squash two ansible warnings Add bool to use_upstream_docker conditional This is an ansible behavior change that's coming in 2.12 but is currently spewing warnings. The warnings make the log really hard to read, so just fix it. Disable group name auto-renaming If you have group names with non-python identifier characters, it prevents you from looking it up in jinja like "groups.group-name" so ansible auto-transforms it so you can do "groups.group_name". This is a confusing behavior which is going away. However, ansible is warning everyone who has groups with characters in them as it has no idea how you might be accessing those group names. Add a config setting to suppress the warning about -'s in group names. Change-Id: Ib3262025799af7c3171ed0b079cb1dd969075931 --- playbooks/roles/install-ansible/templates/ansible.cfg.j2 | 2 ++ playbooks/roles/install-docker/tasks/main.yaml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/install-ansible/templates/ansible.cfg.j2 b/playbooks/roles/install-ansible/templates/ansible.cfg.j2 index 0dd890f613..a343ff5dd9 100644 --- a/playbooks/roles/install-ansible/templates/ansible.cfg.j2 +++ b/playbooks/roles/install-ansible/templates/ansible.cfg.j2 @@ -9,6 +9,8 @@ retry_files_save_path= gathering=smart fact_caching=jsonfile fact_caching_connection=/var/cache/ansible/facts +# Squash warning about ansible auto-transforming group names with -'s in them +force_valid_group_names=ignore callback_whitelist=profile_tasks, timer {% if install_ansible_ara_enable %} callback_plugins=/etc/ansible/callback_plugins:{{ install_ansible_ara_callback_plugins.stdout }} diff --git a/playbooks/roles/install-docker/tasks/main.yaml b/playbooks/roles/install-docker/tasks/main.yaml index 83e088bf2b..5b1a505308 100644 --- a/playbooks/roles/install-docker/tasks/main.yaml +++ b/playbooks/roles/install-docker/tasks/main.yaml @@ -6,11 +6,11 @@ - name: Install docker-ce from upstream include: upstream.yaml - when: use_upstream_docker + when: use_upstream_docker|bool - name: Install docker-engine from distro include: distro.yaml - when: not use_upstream_docker + when: not use_upstream_docker|bool - name: reset ssh connection to pick up docker group meta: reset_connection