This change bumps up the maximum supported Ansible version to 4.x
(ansible-core 2.11.x) and minimum to 2.10. This synchronises Kayobe with
Kolla Ansible (see change I8b9212934dfab3831986e8db55671baee32f4bbd).
Uses of docker_image are updated. We must now provide the source
parameter. When source is build (for molecule), we replace force by
force_source and force_tag and move path and dockerfile under the build
parameter.
Use docker_image_info instead of docker_image_facts.
Handle update of ansible inside kolla-ansible virtualenv and document
how to do it for the kayobe virtualenv.
Change-Id: I7a4530f4f63ddb37aa30a617db5944b97bc3e17f
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts.<fact>.
This change updates all references to Ansible facts within Kayobe
from using individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.
This change disables fact variable injection in the ansible
configuration used in CI, to catch any attempts to use the injected
variables.
[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars
Story: 2007993
Task: 42464
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/791276
Change-Id: I14db53ed6e57d37bbd28dd5819e432e3fe6628b2
Since Ansible 2.5, the use of jinja tests as filters has been deprecated.
I've run the script provided by the ansible team to 'fix' the jinja filters
to conform to the newer syntax.
This fixes the deprecation warnings.
Change-Id: I775c849c944f82bdfc779c8c530346e7ebedbd2a
The latest image is currently failing to download, with the following
error:
no matching manifest for unknown in the manifest list entries
This is currently blocking CI.
Change-Id: I3b4acadd53fe171e71ee16e0eb0b7a711fa97a4f
TrivialFix
In certain environments, a user's primary group doesn't necessarily
match that of their username. This change updates various playbooks to
make use of the `ansible_user_gid` fact instead.
This change also makes ownership explicit by using `ansible_user_uid`
instead of `ansible_user` or `ansible_user_id`, where appropriate.
Change-Id: Ifc2ea7d95ec90e91791ccb10772b15d991379479
Story: 2002770
Task: 22636
For several roles (cadvisor, inspection-store, docker-registry, etc.),
we use an 'action' variable, in a similar manner to kolla-ansible,
to determine the current action being performed (deploy,
reconfigure, upgrade). It is likely this information will be
useful for custom playbooks, so we should expose it. The 'action'
keyword is reserved, and its use triggers a warning, so we change its
name to kayobe_action before advertising it to users.
Change-Id: I5ffbb8b014a31e27141bfc8bf780297d81c840be
Story: 2001663
Task: 12604
The restart handler task fails unless the image argument is passed to
the docker_container module. This shouldn't be necessary, as it should be
possible to identify the container by name alone.
In environments without Swift we are currently unable to store hardware
introspection data. The inspection_store container runs an nginx server
that supports a restricted Swift-like HTTP API using WebDAV that supports
upload and retrieval of introspection data.