Commit Graph

22 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d41ac57fe4 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: I6ca96cd72600e59c2e6616880d7cd9155a26c5bb
2023-07-14 12:56:46 +00:00
Jonathan Rosser 1b6f3273fb Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I40b37608f65ec57b26fb10528da63ad54f9a1496
2021-03-16 08:02:26 +00:00
Jonathan Rosser e0afffd98c 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: I96a9757621eab69e7bc16a2e31ab28d0eb8a23be
2021-03-10 12:16:38 +00:00
Jean-Philippe Evrard 9cdab8209f 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: I42b7153ebdc2683d0df9759e43d8c665144a960e
2019-05-20 12:13:02 +02:00
Guilherme Steinmüller b59cad830d debian: add support
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: Icc254aedb41b4090500c20103383681a17852171
Change-Id: I2c3063b38461d2b6998bf5f73418508daf2fb739
2019-04-11 13:43:26 +00:00
Markos Chandras 8e829211a0 SUSE: Add support for openSUSE Leap 15
Change-Id: If64f825fcac107f3820b710324624cf3117a9de3
2018-09-26 11:51:18 +01:00
Jesse Pretorius 0812140e0f 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: Id5aaeb02772f9925510e712c2e8a90df6d96955a
2018-09-16 03:27:50 +00:00
Jonathan Rosser a9dec5e177 Add bionic to galaxy_info metadata
Change-Id: I46bb3e5c7b8635874f18f028026ff90690abb0b4
2018-08-02 15:00:15 +01:00
Jesse Pretorius 9fb3ab96a2 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
Change-Id: I155b5036dd98f80a0d31d8bb691beae147a97bc3
2018-07-06 13:51:39 +00:00
Jean-Philippe Evrard 6621c7a66d 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: I2f903995102bcdd3e61fa3e72d6f13ac60c5de2e
2017-12-05 11:54:50 +00:00
Jean-Philippe Evrard 453d3e1031 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: Ib8b0169202e19f5ec3d73300a36dab75d243a668
2017-10-12 10:41:07 +00:00
Markos Chandras 26950b3e55 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: I6dc2aa249c9935e5570509af08bb2aeba8afef76
2017-07-11 12:43:11 +01:00
Jesse Pretorius c9817c1b99 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.

Also, Ansible 2.x allows the package module to consume
the package list in the name parameter instead of using
a with_items loop which further optimises the 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: I51d051e1bd10a98e868afba4e11bd01c9d09c7a3
2017-05-02 11:16:37 +01:00
Andy McCrae 5a6d24ea90 Remove Trusty support from os_designate role
Change-Id: I7e0c3b72a556a62f805b0a6c15750032acfb076a
Implements: blueprint trusty-removal
2016-12-15 13:16:25 +00:00
Jesse Pretorius 4ef956f639 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: I5fc9c6899293dad7675ed4927e5c98047db6b485
2016-11-07 17:45:43 +00:00
Mike Carden cf5bb838e4 Implement Ubuntu 16.04 Xenial support
This change updates the os_designate role to support Ubuntu 16.04
and systemd in addition to Ubuntu 14.04 and upstart. Changes are
patterned on those made in the os_glance role.

Change-Id: I49b6271a2046b322b9ba57703331ad49aba1bc9d
Implements: blueprint support-ubuntu-1604
2016-07-13 09:53:43 +10:00
Jimmy McCrory 9985d50ad6 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: I4c5f51143d783d8acd0a6ef9fc0d12deaab182ec
2016-06-14 15:57:08 -07:00
Hector I Gonzalez a4f5657f27 Updated role using the 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: I0b31d5d76d3aaedf3b87550165d0e670b314bebd
2016-04-18 16:56:43 -05:00
Jesse Pretorius 75eaeba3f0 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: I2173ecbee4f8d93a6c206ed944c721a996adfd86
2016-03-31 17:04:45 +00:00
Jesse Pretorius efb3648384 Clean up CR's, whitespace and service description
This patch removes unnecessary whitespace and converts Windows
CR's to Unix LF's.

It also makes a small change to the default description for
Designate in the Keystone service catalogue to ensure that it
is more consistent with other services in OpenStack-Ansible.
2016-03-14 12:34:47 +00:00
Jesse Pretorius 5a53c622b7 Enable 'developer mode' installation
This commit adds the ability to install glance without requiring an
OpenStack-Ansible pip wheel repository.

In 'developer mode' the git source is cloned directly and the services
are installed directly from the git clone with its requirements being
installed from pypi. The OpenStack upper-constraints file is also used
to ensure that the install is executed using the appropriately tested
set of pypi packages.

The following variables are added:

 - designate_developer_mode: A boolean switch to enable/disable developer
   mode.
 - designate_git_repo: The git repository to clone Designate from.
 - designate_git_install_branch: The branch, tag or SHA to checkout once
   the designate repository has been cloned.
 - designate_requirements_git_repo: The git repository to clone in order
   to retrieve the upper-constraints file.
 - designate_requirements_git_install_branch: The branch, tag or SHA to
   checkout once the requirements repository has been cloned.

The testing playbook overrides the *_install_branch variables to fixed
SHA's in order to fix points in time at which updates are made. This
reduces the effect of upstream development changes on the
OpenStack-Ansible development cycle.
2016-03-14 12:34:46 +00:00
sharmaswati6 8d6686ef54 Initial commit 2016-03-14 12:34:10 +00:00