Commit Graph

26 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 8413941eaa 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: I671cc35a055b35fb249ad3054c45ec65f2b54ab4
2023-07-14 12:58:19 +00:00
Jonathan Rosser 13ac3d38ee 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: I796d9de164a8b79eff8a615442dd46e7de2353e7
2021-03-10 12:16:37 +00:00
Jonathan Rosser a4653722ed Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I299e71fac6efdb89655bd36de72b95400d7000aa
2021-02-23 18:04:29 +00:00
Jean-Philippe Evrard 1882c2da2c 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: Ia58564c7e8bfd5e32bc344c9f1e22473a54218d4
2019-05-20 11:52:37 +02:00
Mohammed Naser 60af6fd3a3 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: I3e2a1bc279b2c57fcf61dea34f5238e05f637425
2019-04-06 18:56:07 -04:00
Markos Chandras 3d51e02a0d SUSE: Add support for openSUSE Leap 15
Change-Id: Ic1166b8f6aac1e9a843c4877b06928c6c4d8d915
2018-09-28 13:25:33 +01:00
Jesse Pretorius c1eb5c3665 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: Ib486a09c6e5d202332b9d7700526ab9007524a82
2018-09-16 03:26:26 +00:00
Jonathan Rosser 55638bc53f Add bionic to galaxy_info metadata
Change-Id: Id6d1c19fcfeef8ae1448d82c1dc7a13f8c8e2e94
2018-08-02 14:57:57 +01:00
Jesse Pretorius c5ecc77f46 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 'shade' client library is not required any more now that we're
installing it via openstack_hosts. As there are no required packages left, the
task to install them is also removed.

We still need to implement the openrc file on the target host for the cinder
backends and qos tasks. Those use the cinder venv so we don't need packages
installed on the host for them - we do just need the openrc file. Once these
shell tasks can be replaced with os_* module tasks we can change the
implementation to use them and remove the openrc role execution.

Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: Iaf3084f597be0585cbd712bbdb9aa826c1f0c1eb
2018-07-13 13:42:58 +01:00
Jean-Philippe Evrard 9dbda04b9f 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: I4f58507546b6990003e9465851c8039de9eeb35c
2017-12-05 11:54:39 +00:00
Jean-Philippe Evrard 8c0f9b04e2 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: Ia82b2ed5e24848e449345c6085f243bb757f34e6
2017-10-10 09:32:10 +00:00
Markos Chandras d6e92768bb 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: Ie7a62cf249deb521cb8538e19dda2ab7170b2b9b
2017-07-07 07:04:15 +01:00
Jesse Pretorius e5e98deeea 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: I88ff40f2ae3bca8341daeddfe8c7a23c2addc057
2017-04-21 16:15:21 +01:00
Andy McCrae 6683a8db26 Remove Trusty support from os_cinder role
Change-Id: I1959caae206dab450e50dd6f9d7a11137f1d8281
Implements: blueprint trusty-removal
2016-12-15 13:16:08 +00:00
Jesse Pretorius b9545d93ee 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: I7f0274d332b81b9d597b5f40a428f9a51030bbd4
2016-11-07 17:46:50 +00:00
Marc Gariepy f420900880 Add centos support for os_cinder role
Add basic centos support for cinder role

Change-Id: I21f84809c44ac4be0165fadfb8da67bbcbc9b05c
2016-09-23 13:48:06 +00:00
Jenkins 4bcdb6c966 Merge "Update the cinder role to support Ubuntu 16.04 and Systemd" 2016-06-24 16:40:24 +00:00
Ashana Evans ab33572534 Update the cinder role to support Ubuntu 16.04 and Systemd
-Created a  ubuntu-16.04 file in vars
-Updated meta/main.yml dependencies to include xenial
 as a verison of Ubuntu.
-Added cinder-16.04-support.yaml in realesenotes
-Added template files for systemd support

Implements: blueprint support-ubuntu-1604

Change-Id: Idb2f6b84fc558b21ca2dfce6121dc22ff31a659a
2016-06-24 08:45:06 -04:00
Jimmy McCrory 868a6d3a49 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: I259c92e0a58cfc63de24257a276f2232387582b5
2016-06-07 23:26:23 -05:00
Jenkins 8c03ecd80e Merge "Update min_ansible_version to 1.9" 2016-04-12 08:47:24 +00:00
Jesse Pretorius f6d4d7a35e 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: Ic1b178f7d9275a4a8070f1b2f4ff26d854948209
2016-04-11 12:17:02 +01:00
Hector I Gonzalez 19bc27e893 Updated role using Multi-Distro framework
* Moved APT cache var to ubuntu-14.04 file
* Moved tags from cinder_install_apt.yml since they will be inherited
* Updated meta/main.yml dependencies to include apt_package_pinning
when ansible_pkg_mgr is apt.

Change-Id: I23163f783f3b6bce4b170236c46c163d8068b5e0
2016-04-04 16:06:16 -05:00
Jesse Pretorius a2662d7f8d 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: I91ba49e5f6d46c2b2808e29609f7ed7086590669
2016-03-31 19:02:06 +00:00
Matt Thompson 49978a5e06 Enable developer mode
This commit adds the ability to install cinder 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: Iaff1b9dadac857f3787074d7905d59547deba0ee
Partial-Bug: #1553971
2016-03-08 10:42:49 +00:00
Kevin Carter 3cba6d5573 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 1cd0bdff52 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