Commit Graph

26 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov cf448d95c5 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: Ifb3711157e77d5c917d05e4a384dead2abe72a7c
2023-07-14 14:56:14 +02:00
Jonathan Rosser 7f2614ce4e 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: Id4f43e11bb02733b90f8bdf49e86f7a37656c68f
2021-03-10 12:16:38 +00:00
Jonathan Rosser ae6c72997c Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I03b51e2cf342b8b1434503f2bd0f4b30dcd5258e
2021-02-23 18:05:14 +00:00
Jean-Philippe Evrard c75ae4dcb4 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: I928bed1b0a4de7ffab198433514891cf49148859
2019-05-22 06:32:58 +00:00
Mohammed Naser 6312c1cc7e debian: add ci and update meta
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: I626c183c0ecffdb731f87722c840121f7dfd6aae
2019-04-06 18:55:01 -04:00
Markos Chandras 4a3ec0c6d0 SUSE: Add support for openSUSE Leap 15
Change-Id: I3226e8c38fe40a7b9a049f6ff5545b84eb18341a
Depends-On: https://review.openstack.org/#/c/603114/
2018-09-20 14:02:03 +01:00
Jesse Pretorius 1c3b303208 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: I8e15ffe03d1a57bcc5b2f8be36e4a6d6e6bf27a2
2018-09-16 03:26:57 +00:00
Jonathan Rosser dbc936f89a Add bionic to galaxy_info metadata
Depends-On: https://review.openstack.org/#/c/588466/
Change-Id: Id2dd90cf40486fed580f8be4335d3a93fc0f6c2b
2018-08-03 08:06:03 +00:00
Jesse Pretorius fa11f38215 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. 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.

Ansible 2.5 is a hard dependency for this patch due to the dynamic setting
of the ansible_python_interpreter, which in 2.4 is literally interpreted,
but in 2.5 thanks to [1] is now templated. See [2] for more details.

[1] https://github.com/ansible/ansible/pull/33698
[2] https://github.com/ansible/ansible/issues/18665
Depends-On: https://review.openstack.org/501814
Depends-On: https://review.openstack.org/568139
Depends-On: https://review.openstack.org/568141
Depends-On: https://review.openstack.org/568146
Depends-On: https://review.openstack.org/571423
Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: I6a5a85fae5a481900149a343a163fe82e788d1eb
2018-07-06 13:54:34 +00:00
Major Hayden bfc6597b6e Change include: to include_tasks:
This removes warnings in Ansible 2.4+.

The patch also removes the "static:" argument which is no longer
used by Ansible.

Change-Id: Iee7cd23ccd93e0f3a379fcd42dbd12ba3ee25cac
2018-02-16 18:44:43 +00:00
Jean-Philippe Evrard 5f4fc3ef1a 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: I6d021c28020879cd34046e8f23ba7d12f0e65d6b
2017-12-05 11:54:55 +00:00
Jean-Philippe Evrard 73dc946c92 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: I5196403b4c63fe965ad566c9b19d921bb11e0891
2017-10-17 10:23:53 +00:00
Markos Chandras e9ae99edbf 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: Ia3fe5fedbbc2781cf2e7ae4d82c09e0960c6744b
2017-07-06 13:19:19 +01:00
Jesse Pretorius 1e9e5a6481 Optimise apt cache update task
The update of the apt cache and the package installation
can all be handled in a single task by providing the
package action plugin with the right parameters. This
removes an extra task to optimise execution.

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: Ief4818b7a3f0b87ddb4d0cdfd56809c2f09a59c1
2017-04-21 15:58:21 +01:00
Andy McCrae 42838c971c Remove Trusty support from os_glance role
Change-Id: If44365b0c00588a40802afe12f937b0c5ae797f8
Implements: blueprint trusty-removal
2016-12-15 13:17:08 +00:00
Jimmy McCrory c49b582e2c Use upstream openstack image module
Replace the use of OSA's glance library with the upstream Ansible
os_image module within this role's functional testing tasks. Also,
httplib2 no longer needs to be installed since it's not needed by the
uri module as of Ansible 2.1.

Change-Id: If0e36c61307056c8786c67b60fd56b03f2ad7bda
2016-11-10 16:12:44 -08:00
Jesse Pretorius 63143ee917 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: I7e81f4c7c6748c0d7dc4df6f968465f044027b6b
2016-11-07 17:45:18 +00:00
Major Hayden ffacc20cc8 Implement CentOS 7 support in os_glance
This change implements CentOS 7 support within the os_glance role.

Change-Id: I65d8e66673f5372fe880680a035842ffcd775ac2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Co-Authored-By: Major Hayden <major@mhtx.net>
Co-Authored-By: Marc Gariepy <gariepy.marc@gmail.com>
2016-09-19 15:47:39 +00:00
Jimmy McCrory 3dabe29f62 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: If92589b43a21383bae97ad903c4853e7dda8a0c0
2016-06-07 23:24:15 -05:00
Kevin Carter 24c3d7053e Implement Ubuntu 16.04 support with SystemD
This change updates the glance role to support Ubuntu 14.04 with
upstart init and 16.04 with a systemd init.

Implements: blueprint support-ubuntu-1604
Depends-On: Ib6d7e68133de8d10b81d9116b74dca1de7568897
Change-Id: I39214199e2bbc2bbc5c1b30f8a04aa4e74ed967b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-31 14:37:59 +00:00
Jesse Pretorius 9c5c088fa8 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: Ibc0fc1d02dfdc77b77de298993c27d3e559d6c38
2016-04-11 12:17:50 +01:00
Jesse Pretorius 5d3d9e7baa 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: I1ea66b752092c95e7211ca903c806e9b14e448ff
2016-03-31 17:05:15 +00:00
Hector I Gonzalez 651a11d5a0 Updated role using Multi-Distro framework
* The default apt packages have been moved into a var file
  that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
  into a named install task file.

Change-Id: Id352021c2c4a989eb93cdaa3804b2d363cd9f8bd
2016-03-28 13:26:48 -05:00
Matt Thompson f4454345f6 Enable developer mode
This commit adds the ability to install glance without a repo server.
This pattern is lifted from the os_keystone role and allows us to
further develop functional testing for this role.

Change-Id: I39d13e70aaf4bb7ccd8411b19d16c57b8b3ffeb7
Partial-Bug: #1553960
2016-03-07 14:08:31 +00:00
Kevin Carter 2e02d0e03a 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 fc2e3a54b6 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