Commit Graph

41 Commits

Author SHA1 Message Date
Pierre Riteau 1edf231477 Pin ansible-core at 2.15.6
We are seeing the following issue since 2.15.7 was released:

    Pattern and root_dir should be of the same type, not <class
    'ansible.utils.unsafe_proxy.AnsibleUnsafeText'> and <class 'str'>

Change-Id: I5cb458132133d171037f8697072e6bd8858db01a
2023-12-05 09:14:43 +01:00
Grzegorz Koper 80f6db34cd Bump up Ansible supported versions to 7.x/8.x
This change bumps up the maximum supported version of Ansible to 8.x
(ansible-core 2.15.x) and minimum to 7.x (ansible-core 2.14.x).

Depends on:
https://github.com/stackhpc/ansible-role-systemd-networkd/pull/10

https://github.com/stackhpc/ansible-role-dell-powerconnect-switch/pull/13

https://github.com/stackhpc/ansible-role-mellanox-switch/pull/8

gateway_ip was being set to empty string. This was triggering neutron
""Invalid input for gateway_ip. Reason: '' is not a valid IP address."
Omitting by default.

Installing openstack.cloud collection.
Upgrade failed as Ansible in kayobe-venv was not upgraded.

Change-Id: Ia3550644e5fc3e83f792e46d42b4c35d5eec4705
2023-11-07 18:33:06 +01:00
Will Szumski 0ae9e8d489 Kayobe environment dependencies
Allows you to combine multiple environments by declaring any dependencies.

Story: 2002009
Task: 42911
Change-Id: I4d9f96ec4cf3c6cd0d28dfe5ddb239d863498a72
2023-05-30 20:20:41 +01:00
Kayobe Automation a46b3ebc8e Add cached plugin
This is useful to cache expensive lookups.

Change-Id: I0748f7bd3e6f7f91e35b2178acb6973e99710f88
2023-05-30 19:18:26 +00:00
Mark Goddard 428ef10fa4 Use merge_configs and merge_yaml to generate Kolla custom config
This patch adds new functionality - merging base & environment specific
kolla config. This allows you to place common settings in the base
configuration and only keep environment specific settings in the
environment directories.

Change-Id: Id4588f4529a4522e68e22ce58711cb927fa68a9d
Story: 2002009
Task: 42903
2023-05-30 16:47:14 +00:00
Bartosz Bezak 773eead34d Bump up Ansible supported versions to 6.x/7.x
This change bumps up the maximum supported Ansible version to 7.x
(ansible-core 2.14.x) and minimum to 6.x (ansible-core 2.13.x).
This synchronises Kayobe with Kolla Ansible.

Change-Id: Ibffecaa8085bd38ebc8cded9a4bfebe77d59d515
2023-05-25 08:10:17 +00:00
Scott Solkhon 08bd6815bd Add Hashi Vault support for Kolla passwords
This commit adds the necessary changes needed to support
reading and writing Kolla passwords to a Hashicorp Vault server
using Kolla-Ansible commands `kolla-readpwd` and `kolla-writepwd`.

This follows the support that was added into Kolla-Ansible in
the Change-Id Icf0eaf7544fcbdf7b83f697cc711446f47118a4d.

Change-Id: I732988e6160cc64d663d6ef8179f04d3e1226537
2022-12-21 18:27:13 +00:00
Michal Nasiadka 65587cb279 Bump up Ansible supported versions to 5.x/6.x
This change bumps up the maximum supported Ansible version to 6.x
(ansible-core 2.13.x) and minimum to 5.x. This synchronises Kayobe with
Kolla Ansible.

Shebang has been removed from modules due to [1].

os_openstacksdk_version has been added as openstack cloud modules don't
support versions greater than 0.99.

[1]: https://github.com/ansible/ansible/pull/76677

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/867546
Change-Id: Ibb00f6d079442a8509411ae8a71d74fd7bd8cccd
2022-12-14 14:55:33 +00:00
Mark Goddard 0c074431d0 Support configuration of swap
Supports creating and using swap files, or using pre-existing swap
devices.

Story: 2004958
Task: 29390

Change-Id: Iadb540f42036a4a63cdd5b695b82f1504b3a4a28
2022-12-07 14:23:18 +00:00
Will Szumski 1fbb5cb400 Add support for dellos10 switch configuration
Change-Id: I2823016294e7df63f63be9ab26535b3962a71ebe
2022-06-09 21:59:33 +02:00
Mark Goddard c9c0019d7e Use jinja2.pass_context instead of contextfilter
The contextfilter decorator was deprecated in jinja2 3.0.0, and has been
dropped in 3.1.0. This results in the following warning, and failed
attempts to use filters:

    [WARNING]: Skipping plugin (networks.py) as it seems to be invalid:
    module 'jinja2' has no attribute 'contextfilter'

This change switches to use the pass_context decorator. The minimum
version of Jinja2 is raised to 3 to ensure pass_context is present.

This change also includes some changes to address issues with image
builds in CI, caused by CentOS Scream.

1. disable IPA image builds in seed deploy jobs

IPA image builds will be split out into a separate job. For now, disable
them.

2. disable overcloud host image builds in seed deploy jobs

Overcloud host image builds will be split out into a separate job. For
now, disable them.

Depends-On: https://review.opendev.org/c/openstack/kayobe/+/835279
Change-Id: If657bf5b0117812d3c53942464cc41cf86cc8ad5
2022-03-29 13:59:56 +01:00
Mark Goddard fb5649bd2f Bump up Ansible supported versions
This change bumps up the maximum supported Ansible version to 5.x
(ansible-core 2.12.x) and minimum to 4.x. This synchronises Kayobe with
Kolla Ansible (see change Ia373f9cc3bb69eba0288bbb3e497e8cadb7cc4d3).

ansible 5 / ansible-core 2.12 raises the minimum version of Python to
3.8, so CentOS Stream 8 environments will typically get ansible 4 /
ansible-core 2.11.

Change-Id: If4477e7fa4c022ead6cda4a34a72b342f115936f
2022-01-28 10:44:32 +00:00
Zuul 580485790a Merge "Import merge_configs and merge_yaml from Kolla Ansible" 2021-10-07 19:31:06 +00:00
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 a04b5d6a20 Import merge_configs and merge_yaml from Kolla Ansible
These action plugins will be useful for generating configuration files
on the Ansible control host.

Change-Id: I172c8e81936c93c8d6ce4e53c83083a44aa52e6b
2021-09-29 18:36:16 +02:00
Michal Nasiadka 16cce92a74 Bump max Ansible version to 2.10
Molecule also needs to be bumped to support Ansible 2.10
lint: section changed in Molecule 3.x - adapted.
molecule-docker added do test-reqs because it code has moved to it from
molecule core
pytest-testinfra and pytest-molecule needed for testinfra tests to work

[1]: https://github.com/ansible-community/molecule/issues/2872

Change-Id: I0299f5126ebd080f3912a76294b0013abe7747a0
2021-03-24 07:25:28 +00:00
Pierre Riteau 825a9366fb Bump Ansible version range to 2.9 - 2.9
Updates the minimum version of Ansible from 2.8 to 2.9.

Change-Id: Icd5a23b3e723c14ae214d6c4e982109406dd0611
2020-10-01 09:49:41 +00:00
Pierre Riteau f6f08df6b1 Block Ansible 2.9.12
Ansible 2.9.12 changed default permissions of created files to 600 [1].
This breaks kayobe because kolla-ansible generates admin-openrc.sh owned
by root:root with mode 0600, which kayobe fails to read to generate
public-openrc.sh.

Block only Ansible 2.9.12 as the next release should include a revert of
this change.

[1] https://github.com/ansible/ansible/issues/71200

Depends-On: https://review.opendev.org/746220

Change-Id: I3de408d384141eee1a088d222dca7d583251a297
Story: 2008011
Task: 40661
2020-08-13 20:30:30 +00:00
Mark Goddard cd1753d85a Fix multiple CI failures
1. Blacklist Ansible 2.9.8

Ansible 2.9.8 includes a regression on the fileglob plugin [1] that
causes the Kolla Ansible HAProxy role to fail.

This change blacklists Ansible 2.9.8 to work around the issue.

2. Use ensure-docker role instead of install-docker

The install-* roles are being deprecated and renamed to follow the
ensure-* naming convention [2].

[1] https://github.com/ansible/ansible/issues/69450
[2] http://lists.zuul-ci.org/pipermail/zuul-announce/2020-April/000071.html

Change-Id: Iab1d84e6a8c1b3dd81e53279309153687677a061
Story: 2007659
Task: 39748
2020-05-12 19:04:43 +02:00
Radosław Piliszek 83bc574ba5 Cleanup py27 support
Removes and/or replaces all mentions of py27.

Cleans up obsolete requirements and their lower-constraints.

Update cliff minimum to 3.1.0 in requirements.txt, which has a fix for
story 2005891.

Change-Id: I52cffa2f1aee944f79c4618ea20b779755792f2a
2020-04-20 18:04:19 +00:00
Mark Goddard 5507bba744 Blacklist Ansible 2.8.9
Backport: train

OpenStack Ansible modules were broken in Ansible 2.8.9. This affects
kolla-toolbox, and kayobe's ansible install for tasks that interact with
APIs. See https://github.com/ansible/ansible/issues/68042 and
https://bugs.launchpad.net/kolla/+bug/1866181.

This change blacklists ansible 2.8.9 for Kayobe and Kolla Ansible. A
separate change will be made to kolla to blacklist ansible 2.8.9 from
the kolla-toolbox image.

Depends-On: https://review.opendev.org/711485

Change-Id: I535ab240b7ab8f3ab104b49170e4a9ee01fc482b
Story: 2007383
Task: 38959
2020-03-05 17:00:46 +00:00
Mark Goddard ebd5aa4477 Bump Ansible version range to 2.8 - 2.9
Updates the minimum version of Ansible from 2.6 to 2.8, and the maximum
supported version from 2.8 to 2.9.

CentOS 8 requires Ansible 2.8.

Change-Id: I3f8f7f8d7d37e3cb851965a491ac9c43030869d5
Story: 2006574
Task: 38826
2020-02-27 15:39:27 +00:00
Mark Goddard a91135179d CentOS 8: Use ansible_playbook_python for localhost dependencies
Currently we install python dependencies on the Ansible control host
each time the ip-allocation and console-allocation roles are executed.
This is inefficient, particularly in the case of the ip-allocation role
which is run serially for all hosts. It is also unnecessary since we
have these packages available in the Python environment used to execute
kayobe.

The kolla-ansible role also has an implicit dependency on PyYAML for
managing kolla passwords.

This change uses ansible_playbook_python as the Python interpreter for
the necessary tasks in these roles to avoid installing dependencies on
the system on CentOS 8 and Ubuntu. For CentOS 7 we still need to use the
platform Python, due to needing SELinux bindings.

Change-Id: Ic6a1c69a34241f4fbe617a0b12aec9b1528ba352
Story: 2006574
Task: 38825
2020-02-25 16:15:09 +00:00
Will Szumski 8454cf8551 Adds support for Ansible 2.8, bump mimimum to 2.6
Updates the minimum version of Ansible from 2.5 to 2.6, and the maximum
supported version from 2.7 to 2.8.

Change-Id: I5aeb28424a8d1920b58ca73e37131d8cbfeabf29
2019-12-12 11:20:40 +00:00
Zuul 8076acdb74 Merge "Adds support for Ansible 2.7, bump mimimum to 2.5" 2019-07-12 21:28:37 +00:00
Pierre Riteau 2863c73861 Move paramiko cap to test-requirements.txt
Change-Id: Ia7d069bc49037c9961bce2a7814fae5745ae8a91
2019-07-08 14:15:19 +00:00
Mark Goddard 405ccdada2 Adds support for Ansible 2.7, bump mimimum to 2.5
Updates the minimum version of Ansible from 2.4 to 2.5, and the maximum
supported version from 2.6 to 2.7.

Change-Id: If8071a9b5c85e5e69fbb333e91c84d10c20d80f3
Story: 2006143
Task: 35639
2019-07-02 10:38:54 +01:00
Zuul 6baad19b0b Merge "Restrict cliff to <2.15.0" 2019-06-19 17:45:15 +00:00
Mark Goddard a3a71b919c Restrict cliff to <2.15.0
Using Kayobe with cliff 2.15.0 fails with the following error:

kayobe playbook run playbook.yml
invalid conflict_resolution value: 'ignore'

This change restricts cliff to <2.15.0.

Also, fix git cloning previous release repos in CI to allow this patch
to merge.

Zuul provides repositories with all branches containing all prospective
changes, not just the current branch. We can use this in the upgrade
jobs to include changes to the previous release branch when a patch
depends on them.

Change-Id: I7966cf33f6133090d83232504b8c1da4c7817e0c
Depends-On: https://review.opendev.org/665703/
Story: 2005891
Task: 33748
2019-06-17 19:29:26 +01:00
Pierre Riteau 686cf8d541 Cap paramiko to releases below 2.5.0
This new version makes the kayobe-tox-molecule job fail with:

    ImportError: cannot import name py31compat

Change-Id: Ieddf039483649cc7b575019409257b6ce5b3fb99
2019-06-11 14:48:11 +01:00
Mark Goddard a0b4ab57a4 Bump Ansible to 2.6.x
Bump the maximum supported version of Ansible to 2.6.x for both Kayobe
and Kolla Ansible.

Change-Id: Ia8691d127bb6ce57dcd6fdac25f0357844f5cbaa
Story: 2004287
Task: 27839
2018-11-07 09:18:33 +00:00
Mark Goddard 07b2f06a82 Support Ansible 2.5
Raises the maximum Ansible version in requirements.txt to Ansible 2.5.x
for both kayobe and kolla ansible.

Also removes the hack to use a patched parted module for ceph block
device management, as Ansible 2.4 contains the required fix.

Change-Id: I0d2f564eb1ddb63b07829d6f0d918af26887db97
Story: 2001649
Task: 6668
2018-06-06 12:45:51 +01:00
Mark Goddard 1579dc6c41 Use pbr to build the project
Python Build Reasonableness (PBR) [1] is used by most OpenStack projects
for building python packages, so we should fall into line here.

[1] https://pypi.python.org/pypi/pbr

Change-Id: Ic74a62eeb65e7158ce75a082e68652c2e50a2a91
Story: #2001637
Task: #6648
2018-03-08 16:37:08 +00:00
Mark Goddard 4b197daeaf Add a note to requirements.txt about Ansible dell network module bug 30350 2017-09-18 21:41:47 +01:00
Mark Goddard c2312561dd Relax requirements.txt to allow ansible 2.3
Kayobe has a dependency on ansible, which is currently capped to 2.2. Docker has
decided to rename the docker-py python module to docker, and made some backwards
incompatible API changes to go along with it. Kolla-ansible requires us to use
docker (not docker-py) on the target hosts, but this is not supported for the
docker_container and docker_image ansible modules that kayobe uses with ansible
2.2. Upgrading to ansible 2.3 allows us to support the new docker python package.
2017-09-18 21:41:47 +01:00
Mark Goddard f40978b59e Alter ansible version constraint to <2.3.0
Ansible 2.3 has been found not to work with some parts of kayobe.
2017-07-11 17:49:41 +01:00
Stig Telfer ccc8507253 Avoid Ansible 2.3, does odd things, for now 2017-04-24 23:58:49 +01:00
stack 45e62f4bbc Add version requirements to dependencies 2017-04-04 10:37:47 +01:00
stack 9b3369417a Add ansible and netaddr as dependencies of kayobe 2017-03-17 19:48:18 +00:00
Mark Goddard baf17c8cff Add unit tests and style checks for Kayobe python module
Unit tests can be run via:

tox -e py27

Style checks can be run via:

tox -e pep8
2017-03-01 13:32:37 +00:00
Mark Goddard caf9b52ac7 Add kayobe python module with CLI
The CLI replaces all existing shell scripts except for
configure-kayobe.sh. Other shell scripts are now removed.
2017-02-28 16:17:54 +00:00