Commit Graph

22 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 6a25236b25 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: I9110294e492a501204c8e92448a2f2929781a509
2023-07-14 18:49:03 +02:00
Adrien Cunin e29058b48e Don't install zlibc, it was removed from Debian
Change-Id: If3757269213246f3f54769e12bc93cdc50fe93e1
2023-05-12 15:27:57 +02:00
Dmitriy Rabotyagov ab4b4a1d25 Ensure service is restarted on unit file changes
At the moment we don't restart services if systemd unit file is changed.

We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now  we ensure that role handlers will also listen for systemd
unit changes.

Change-Id: I4eec982a682bfff121f9658c6d4eb3d1db8cb94f
2023-04-10 16:33:54 +02:00
Dmitriy Rabotyagov 286414c2a6 Set manila_backends to empty dict by default
This simplifies logic across the role and not verify if variable is
defined each time we're attempting to use it.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/787341
Change-Id: I6db4ad6e6389b1ff63dc52a1e48c477a97905d17
2021-05-20 18:52:19 +00:00
Zuul 91b53f2b6c Merge "Remove ceph-fuse requirement" 2021-05-20 09:17:16 +00:00
Dmitriy Rabotyagov a5ba4dc4cd Remove ceph-fuse requirement
Since we don't need to mount and create volumes directory for
manila, ceph-fuse package is not required anymore as well.

Change-Id: I5cd92bd90ab19a32f7488ab56dbb6b005253e2c3
2021-05-18 16:33:49 +00:00
Jonathan Rosser e85642f80c 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: I508c7aea34bb706b58fc69be8bfb6c06d50f2f40
2021-05-18 16:32:05 +00:00
Dmitriy Rabotyagov de29f07d77 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to replace policy.json to
policy.yaml and remove deprecated policy.json.

config_template has been choosen instead of the copy, since it can
properly handle content that has been lookuped.

We make a separate task not to restart service when it's not needed.

CephFS Native hook has been removed since [2] as manila leverages MGR
now and doesn't require having directory in share.

Additionally bionic test is removed as we don't have Octopus infra
mirrors for it.

[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
[2] a830710939

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/791202
Change-Id: I7a1807e4b984e31cb6250132f35d4c27f0b69b0c
2021-05-13 13:11:04 +00:00
Dmitriy Rabotyagov b5aed5c130 Use global service variables
Instead of overriding each service separatelly it might make
sense for deployers to define some higher level variable that
will be used first or fallback to default variable.

Change-Id: Ie2c30dcc3640361b91e602125e98996c897f0f06
2021-01-18 11:36:42 +02:00
Mohammed Naser abbfec221b Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Change-Id: I946adf21b58e117508dcc470c0fb3e9c2565c26d
2020-11-06 12:59:12 +00:00
Dmitriy Rabotyagov 4bbf35b981 Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Change-Id: I9dbb96df92711467aaa7676534adfd1f7013cb27
2020-11-01 12:17:23 +02:00
root 80ea46f075 Add centos-8 support
Depends-On: https://review.opendev.org/757854
Change-Id: Id70a78274b322658da53cdba38ef2ac48f714d0c
2020-10-13 13:01:20 +00:00
Dmitriy Rabotyagov d09f038ac7 Fix _manila_backends fact
Previously _manila_backends was set only in case manila-share and
manila-api are the same host, which is the case only for aio deployments
Now fact will be set in an appropriate way.

This also drops facts refresh task since it's not need since queens and
uses tempfile for creating temporary directory

Change-Id: Ie5f95b7e80cd7fd26ee1f25aedf938abff131623
2020-02-20 17:23:22 +02:00
Mohammed Naser 67c4bc8316 refactor: service group names
The uwsgi role assumes that the keys used match the service names
and all of our other services follow this pattern so let's keep
it the same for this.

Change-Id: Id740ff6704bddad306f7470665717dd5c8674e82
2020-01-30 19:06:29 +02:00
Dmitriy Rabotyagov a97cbbd565 Add manila CI
This patch aims to fix and cleaup manila role and add CI into it.

Changes it implements:
* Fix endpoint creation
* adds playbook.yml in examples to use integrated linters check
* adds role CI tests using integrated repo
* adds sqlite installation

Depends-On: https://review.opendev.org/704163
Depends-On: https://review.opendev.org/702853
Depends-On: https://review.opendev.org/674653
Depends-On: https://review.opendev.org/703136
Change-Id: I0807180bd9b2ccbf2f1ebb6a72d74e9f0d126ba6
2020-01-30 14:07:20 +01:00
Dmitriy Rabotyagov ac36db35ea service_setup: refactor service setup to a single file
This patch refactors the openstack user/service/endpoints creation to
service_setup.yml which will eventually be managed by
openstack-ansible-tests.

Change-Id: Ie7533f10054abe382e21bca875d084449ee3047d
2019-10-21 18:34:59 +03:00
Dmitriy Rabotyagov 38432790c7 Add variable files for RedHat and Suse
This patch aims to add support of manila deployments on RedHat and Suse.

Change-Id: Ib72e8b9ca8cfd52e09ee14a4ca643512008faf5d
2019-08-08 13:00:58 +00:00
Dmitriy Rabotyagov 203eb8772a smart_sources: Use config files from repo
Do not carry and maintain rootwrap and api files, since they are present
inside pip packages and deployed during installation.
This also adds deployment of rootwrap filters for manila-share nodes.

Change-Id: I41b680f5dcb5be92e3304c591d9a4705cf138a72
2019-08-08 16:00:18 +03:00
Guilherme Steinmüller 407981a711 debian: add support
This patch updates the meta to reflect it's
support of Debian accordingly as well as rename
ubuntu vars file to debian.

Change-Id: Ieba5eca547f5307b50733bd45f49a5f7611b7c5b
2019-04-08 23:33:05 +00:00
Mohammed Naser d37116a602 developer_mode: drop vars
The developer mode no longer exists, therefore, we should remove
all references and we're already installing the distro devel
packages inside python_venv_build.

We were also referencing the wrong constraint variable, so this
fixes that as well.

Change-Id: Iaf2e848b80923718741c148f2a76d5a3efca53b1
2019-03-28 22:11:11 -04:00
Kevin Carter b9809ef89d Update manila so that it works with cephfs
This change updates manila so that it can function with cephfs.
While cephfs was assumed to work these changes solidify support
and tune up the role.

Change-Id: I4d95bfc15d09b7b7c0b997d7eab91509b0c63885
Signed-off-by: cloudnull <kevin@cloudnull.com>
2019-03-27 22:39:33 +00:00
Michael Vollman f9bfb7f0bc Basic working os_manila role
Starting this new role as a copy of the os_cinder role due to the
similarities between the two openstack projects.  This role will
deploy manila api, scheduler and share services on ubuntu with the
default local LVM backed NFS scenario.

Change-Id: Ibda073e5aaa6df3b254961d4aed3a8d5961f3432
2019-03-08 19:41:48 +00:00