14 Commits

Author SHA1 Message Date
Pierre Riteau
0f2b104213 Bump up Ansible supported versions
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
2021-09-29 22:31:33 +02:00
Mark Goddard
f639ad0b35 Use ansible_facts to reference facts
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
2021-08-21 09:57:29 +02:00
Mark Goddard
71c2aa1d90 Add support for stopping overcloud services
Implemented via 'kolla-ansible stop'.

Change-Id: Iaf8db47e70f023b446c17aa61fc8bb89cf7c2b28
Story: 2007467
Task: 39155
2020-03-26 14:34:07 +00:00
Scott Solkhon
ec56393590 Task to generate nginx.conf in inspection-store missing become: True
Change-Id: Idf1e7b1e7018d1324326c3b8b8cb04f2e27ee0d2
2019-12-04 11:52:38 +00:00
Raimund Hook
6df6277096 Updating Jinja filters to conform to Ansible 2.5+
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
2019-06-28 16:34:24 +01:00
zhulingjie
8be12b71d7 use include_tasks and import_playbook instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: Ia1b826ca08ae042eec80f8c495ab030a087d97ba
2019-01-18 12:22:38 +00:00
Mark Goddard
679de79cfc Switch inspection store to use stable docker image
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
2018-08-29 12:14:48 +01:00
Will Szumski
2ddcd94cd4 Use host networking for inspection store
Change-Id: I126e500be0b22d65b918a5291cac189425be51b9
Story: 2003207
Task:  23365
2018-08-01 15:38:46 +01:00
Nick Jones
5265993134
Don't assume user's primary group name is the same as username
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
2018-07-04 19:56:05 +01:00
Mark Goddard
4038c8226b Change reserved keyword 'action' to 'kayobe_action'
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
2018-05-21 16:00:57 +01:00
Mark Goddard
87d46a33c2 Update python docker package requirement note in role READMEs 2017-12-13 17:03:54 +00:00
stack
20e3b75547 In latest Docker 17.05 restart-retires and unless-stopped are
mutually exclusive. Remove restart-retries where used.
2017-10-23 11:13:48 +01:00
Mark Goddard
f047fbd4a9 Add workaround for ansible issue #21188 to inspection store
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.
2017-09-18 21:41:47 +01:00
Mark Goddard
5304c0a489 Add a data store for ironic inspector introspection data
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.
2017-09-01 18:21:10 +00:00