Commit Graph

22 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 94e5817391 Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I68a3041edf0b0eb891fbe1e40081f779fc40c21d
2023-07-14 15:21:35 +02:00
Jonathan Rosser 2dc4709537 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I70349036d45f44b7d951224fa2d27fe417301d87
2021-03-16 08:04:15 +00:00
Jonathan Rosser 22b5051802 Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I1a9fd61f8690621144fc26eec762527d6ffcc33c
2021-03-10 12:16:38 +00:00
Jean-Philippe Evrard 1fe9d38970 Clarify supported SUSE versions
This role only support openSUSE Leap 15, not 42.3, not tumbleweed.
Saying all is confusing and a bad practice. This fixes it, while
ensuring the job is properly defined to test that assertion.

Change-Id: Icd9692dc33749f7fb79e61be73e7fdd6bc8d15dc
2019-05-20 12:29:46 +02:00
Guilherme Steinmüller 8420298481 debian: add suport
This patch adds the Debian jobs for this role to make sure
it's always passing as well as updates the meta to reflect
it's support of Debian accordingly.

Depends-On: I9a92b73c419a0dc1cca40dacfef75de61a61db94
Change-Id: I8e3b4d7386575906f2b4713623c89a8b7c30faac
2019-04-09 17:00:41 +00:00
Markos Chandras f3e30f96f6 SUSE: Add support for openSUSE Leap 15
Change-Id: Ia47b3be327bd66818163b034b72938e4868dc824
2018-09-26 13:58:30 +01:00
Jesse Pretorius dff02f23ff Remove galera_client meta-dependency
Given that pymysql is pure python and has no C binding
dependencies, we no longer need the role to install the
MariaDB client libraries.

Change-Id: I2c42f931498847f5a6fbac96260058f85c477dc5
2018-09-16 03:28:07 +00:00
Jonathan Rosser 7c2d07ffb5 Add bionic to galaxy_info metadata
Change-Id: I24f08a76d042e85c2740672183f50fa40bfb2648
2018-08-02 15:01:29 +01:00
Jesse Pretorius 86d1369e19 Execute service setup against a delegated host using Ansible built-in modules
In order to reduce the packages required to pip install on to the hosts,
we allow the service setup to be delegated to a specific host, defaulting
to the deploy host. We also switch as many tasks as possible to using the
built-in Ansible modules which make use of the shade library.

The 'virtualenv' package is now installed appropriately by the openstack_hosts
role, so there's no need to install it any more. The 'httplib2' package is a
legacy Ansible requirement for the get_url/get_uri module which is no longer
needed. The keystone client library is not required any more now that we're
using the upstream modules. As there are no required packages left, the task
to install them is also removed.

With the dependent patches, the openstack_openrc role is now executed once
on the designated host, so it is no longer required as a meta-dependency for
the role.

Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: I261a49e374d34d00d0be1863da701b7a13ceb3c6
2018-07-06 13:55:08 +00:00
Jean-Philippe Evrard c7410c5fed Remove pip_install dependency
With addition of pip_install on every node, we don't
need to have pip_install as a meta dependency.

Depends-On: If3412bb888ebb854874bbc43eb76bfcb3e4a7868
Depends-On: I79ff70c438b44753be2a93f004ebbc46de0a963d
Change-Id: I375c749d84f794c5fe135ef9d7cdd5c078bb3c52
2017-12-05 11:55:06 +00:00
Jean-Philippe Evrard 9ad974d1a6 Add OpenStack-Ansible metadata
We need to add openstack ansible information in the role
metadata to be able to track role maturity. With it,
we can create a role maturity table and take decisions about
role deprecations.

Change-Id: I679e7ce67139e02d3369d448d0dc12a3d7b94521
2017-10-11 08:54:20 +00:00
Markos Chandras 1d0d71e5cc Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Nothing special is
required for this except for adding the appropriate distro variables
file and also update the zypper cache before package installation.

Change-Id: Ibb3a6633724ce3555d5262fb44914d6cddfe1481
2017-07-11 14:01:01 +01:00
Jesse Pretorius b1721a7460 Use package module to install distro packages
Consolidate distro package install tasks into a
single task using the package module and pass
the package list into the name instead of using
a with_items loop.

The minimum Ansible version is raised to 2.2 due to a
known bug [1] in Ansible's apt module which does not
update the cache properly if the cache update and the
install are combined in a single task.

[1] https://github.com/ansible/ansible-modules-core/issues/1497

Change-Id: I9aabf53e75dbe60bf634a8113bf11f3574b1285e
2017-05-02 11:32:30 +01:00
Andy McCrae b77c406c69 Remove Trusty support from os_heat role
Change-Id: If665515b30bfbd6b618c70357963df28d3d7de54
Implements: blueprint trusty-removal
2016-12-15 13:17:58 +00:00
Jesse Pretorius 30c51cd191 Use updated get_url module checksum functionality
Starting in Ansible 2.0, the get_url [1] module provides the
ability for a checksum to be provided to the get_url module
which will be verified against the local destination file
and the task skipped if it matches.

[1] http://docs.ansible.com/ansible/get_url_module.html

This patch implements the use of this functionality.

The ability to ignore a venv download failure is also removed
as this is not necessary or desirable. It is better for the
download to fail and the playbook execution to stop immediately
so that the failure point is exposed.

Change-Id: I5869bee139a77613f96ca3528b760b45340effaa
2016-11-07 17:44:10 +00:00
Amy Marrich f659c8244c Implement Xenial Support
This implements support for Ubuntu 16.04.

Change-Id: I1c05af32bd85931d09aaf5227dbc9af1a2151ab4
Implements: blueprint support-ubuntu-1604
2016-06-14 13:21:42 -05:00
Jimmy McCrory aa04e70502 Remove pip_lock_down dependency
The pip_install and pip_lock_down roles have been merged.

Remove pip_lock_down from the role's meta dependencies and test
requirements.

Change-Id: If6f57db0acbb08dd062230d40705bd9650c7da9a
2016-06-07 23:38:07 -05:00
Jesse Pretorius b0a78fde2b Update min_ansible_version to 1.9
This role makes use of the ternary filter which was only introduced in
Ansible 1.9, this patch updates the min_ansible_version to 1.9.

Change-Id: Ia01c7bcd52bfecf79a5859ab9de9eb839ef7f8bf
2016-04-11 12:19:14 +01:00
Jesse Pretorius 73b738fb5d Ensure that pip lock down happens before other dependencies
The pip_install role is depended on by a lot of other roles, and
therefore sometimes gets processed prior to the pip_lock_down
role resulting in the pip, setuptools and wheels packages being
installed from a source other than the repo server once the repo
server is available. This is not the intended behaviour - the
repo server should always be a the primary source once it's
available.

This patch ensures that the pip_lock_down role is applied before
all the other dependent roles to ensure that the expected
behaviour is followed.

Change-Id: Ie043da3101013e84104780a0a243a147b74c2e89
2016-03-31 16:56:06 +00:00
Travis Truman 57ab18ca3e Enable functional testing
This commit updates tests/test.yml to deploy rabbitmq, galera,
keystone, and heat in a functional test.  Note that we point at
a non-existent memcached server, but this can be adjusted to build
memcached if deemed necessary.

Note that we also have to install openstack-ansible-plugins in the
ansible-lint job as test.yml uses string_2_int filter which is
included in openstack-ansible-plugins.

Closes-Bug: #1553969
Change-Id: I650120b1605220b4d79c35db9c06c416b241da92
2016-03-15 14:20:21 +00:00
Kevin Carter 245cf2f67b added role to pin packages
This new role is now providing the ability for a user to pin apt
packages as they see fit. The idea is to allow someone to implement
pinning in a generic way that can be represented as a global variable
or as a hostvar. The new role has been added to all install roles as
a dependency which will allow it to ensure that packages are pinned
everywhere as would be expected.

Change-Id: I354e8515570fa7174366ba57d57aece3c304568e
2015-05-08 13:22:42 -05:00
Kevin Carter 275bfbad15 Convert existing roles into galaxy roles
This change implements the blueprint to convert all roles and plays into
a more generic setup, following upstream ansible best practices.

Items Changed:
* All tasks have tags.
* All roles use namespaced variables.
* All redundant tasks within a given play and role have been removed.
* All of the repetitive plays have been removed in-favor of a more
  simplistic approach. This change duplicates code within the roles but
  ensures that the roles only ever run within their own scope.
* All roles have been built using an ansible galaxy syntax.
* The `*requirement.txt` files have been reformatted follow upstream
  Openstack practices.
* Dynamically generated inventory is now more organized, this should assist
  anyone who may want or need to dive into the JSON blob that is created.
  In the inventory a properties field is used for items that customize containers
  within the inventory.
* The environment map has been modified to support additional host groups to
  enable the seperation of infrastructure pieces. While the old infra_hosts group
  will still work this change allows for groups to be divided up into seperate
  chunks; eg: deployment of a swift only stack.
* The LXC logic now exists within the plays.
* etc/openstack_deploy/user_variables.yml has all password/token
  variables extracted into the separate file
  etc/openstack_deploy/user_secrets.yml in order to allow seperate
  security settings on that file.

Items Excised:
* All of the roles have had the LXC logic removed from within them which
  should allow roles to be consumed outside of the `os-ansible-deployment`
  reference architecture.

Note:
* the directory rpc_deployment still exists and is presently pointed at plays
  containing a deprecation warning instructing the user to move to the standard
  playbooks directory.
* While all of the rackspace specific components and variables have been removed
  and or were refactored the repository still relies on an upstream mirror of
  Openstack built python files and container images. This upstream mirror is hosted
  at rackspace at "http://rpc-repo.rackspace.com" though this is
  not locked to and or tied to rackspace specific installations. This repository
  contains all of the needed code to create and/or clone your own mirror.

DocImpact
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Closes-Bug: #1403676
Implements: blueprint galaxy-roles
Change-Id: I03df3328b7655f0cc9e43ba83b02623d038d214e
2015-02-18 10:56:25 +00:00