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
This commit is contained in:
Monty Taylor 2019-10-18 05:31:10 +09:00
parent 92fe8eae71
commit 8725a1ee53
2 changed files with 4 additions and 2 deletions

View File

@ -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 }}

View File

@ -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