Commit Graph

42 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 9917675a9f 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.

Change-Id: I022c2ed5edb0acb80433a29172bd6617e994f30f
2023-08-22 12:45:59 +02:00
Damian Dabrowski a240e24e54 Add TLS support to mistral backends
By overriding the variable `mistral_backend_ssl: True` HTTPS will
be enabled, disabling HTTP support on the mistral backend api.

The ansible-role-pki is used to generate the required TLS
certificates if this functionality is enabled.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879085
Change-Id: Id9248e1618b9f2ad39a698c2ecf9c04e64cd119a
2023-04-29 18:42:27 +02:00
Erik Berg 33e4fc3325 Remove redundant vars line
This line has been here since the initial commit
I2390533690cd2c4511a272cc0834e240bb554696, but should already
be covered by the distribution_major_version line above.

Change-Id: Ia98b2ae3bad719929b13294b4df2dec69875e655
2022-09-14 13:55:17 +02:00
Zuul 9f55f90b08 Merge "Support service tokens" 2022-06-17 10:21:04 +00:00
Dmitriy Rabotyagov 2a8972b5e8 Support service tokens
Implement support for service_tokens. For that we convert
role_name to be a list along with renaming corresponding variable.

Additionally service_type is defined now for keystone_authtoken which
enables to validate tokens with restricted access rules

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/845690
Change-Id: Ie34df51cc0284b23713a897c8bc9d4958a1fe385
2022-06-15 19:14:14 +02:00
Dmitriy Rabotyagov 7dd254b652 Remove mention of haproxy-endpoints role
Role was never migrated to usage of haproxy-endpoints role
and included task was used instead the whole time.
With that to reduce complexity and to have unified approach, all mention
of the role and handler are removed from the code.

Change-Id: I126a9180d37fe3242762776837e2b15abc9924e2
2022-06-14 18:01:48 +00:00
Zuul 24edf0ce1b Merge "Use common service setup tasks from a collection rather than in-role" 2022-05-05 13:55:58 +00:00
Jonathan Rosser fba805f2ec Use common service setup tasks from a collection rather than in-role
Depends-On:  https://review.opendev.org/c/openstack/openstack-ansible/+/839988
Change-Id: Iae89fb17e42d1f95ba21dcaaa9a942429f958a3e
2022-04-29 18:46:36 +00:00
Jonathan Rosser 0139fe44b2 Refactor use of include_vars
Use a first_found lookup instead of a with_first_found loop so that
the 'paths' parameter can be used.

This ensures that only vars from the role are included, and not vars
from a parent calling role. This can happen when a parent role has
a higher priority vars file available for inclusion than the role
it calls.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/839988
Change-Id: I68f0921ea1441d552dfcbc6197327d3046991b36
2022-04-29 18:17:39 +00:00
OpenStack Proposal Bot dc98b6ee02 Updated from OpenStack Ansible Tests
Change-Id: Id34047927b5295af22218525efffa4053c2e3cf2
2021-12-04 17:40:30 +00:00
Dmitriy Rabotyagov 929a8a6c36 Use config_template as a collection
Since we still use ceph-ansible that has their own implementation of
config_template module it's worth to use mentioned module as a collection
explicitly.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819814



Change-Id: Ib5f99c0189871d8a79000d014e3e4b49bd7fec02
2021-11-30 15:17:21 +02:00
Zuul 797835ffa6 Merge "Use ansible_facts[] instead of fact variables" 2021-06-12 12:52:54 +00:00
OpenStack Proposal Bot 7d9ffb9e2d Updated from OpenStack Ansible Tests
Change-Id: I8bc1ca077eb2646825cf89726292734598a875bd
2021-04-19 09:58:50 +00:00
Zuul 7fa4a4eb63 Merge "[goal] Deprecate the JSON formatted policy file" 2021-04-08 18:24:43 +00:00
Dmitriy Rabotyagov f2cf31bf47 [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.

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

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/777384
Change-Id: I9c358f7d8bd655712748717b391cbf6a58b196c7
2021-03-24 12:05:19 +00:00
Jonathan Rosser 481d5e49d7 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: Iddd575ea7859e496a659a01a454e87d27e85fb1f
2021-03-16 08:12:48 +00:00
Jonathan Rosser 736f80885d 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: Id400c679e1ccc5cc10a92143321ec3e182f9ecdc
2021-03-10 12:16:39 +00:00
OpenStack Proposal Bot 053982c22a Updated from OpenStack Ansible Tests
Change-Id: I8723995806e75dbd728ad36cc699b90b9e434f66
2020-10-19 09:20:23 +00:00
OpenStack Proposal Bot 185c6ea70c Updated from OpenStack Ansible Tests
Change-Id: I04d2c9538a1c0969852969bd2efe912f74b5380e
2020-10-01 14:30:59 +00:00
Dmitriy Rabotyagov 99f3fed9fd 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: Ib8c8ddf5adc71f42b401b034807c4e716f515202
2020-09-16 13:50:01 +00:00
Dmitriy Rabotyagov 086ad74db3 Use the utility host for db setup tasks
Move it to the service setup host (defaults to utility[0]) instead
of the galera[0] host, and use galera_address (defaults to internal VIP)
as the endpoint instead of a local connection on the db host.

Change-Id: I133eee39903fd469ded423775af330f0eece9e43
2020-08-20 18:45:28 +03:00
OpenStack Proposal Bot a6ae43ab6f Updated from OpenStack Ansible Tests
Change-Id: I90aea72b98af25ce65d4d9dd5f77843e267e92d9
2020-08-12 11:34:00 +00:00
OpenStack Proposal Bot 684a077919 Updated from OpenStack Ansible Tests
Change-Id: I76f00e5fa9216830dcc811005c753a54728ee7bd
2020-06-08 19:55:44 +00:00
Jonathan Rosser 498ce9f3d6 Allow venv python interpreter to be overridden
Change-Id: I15825709d5b740617c093649752aefaab638aaaa
2019-09-11 21:10:28 +01:00
Zuul aa3ef79627 Merge "Start using uWSGI role" 2019-09-06 15:37:53 +00:00
Dmitriy Rabotyagov ac93b1f46f 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: Ia1788a7a9ce80349440bedbb2a0fdeb2a7f9934a
2019-09-05 14:46:14 +03:00
OpenStack Proposal Bot 162673c1f3 Updated from OpenStack Ansible Tests
Change-Id: Iaef84f802e295b549ba89aeaa853f963abc54598
2019-09-04 15:16:01 +00:00
Dmitriy Rabotyagov 296fee4969 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: I31cad6851c7508dcad681ca4f97eac4dfce1a7b4
2019-08-07 19:20:04 +03:00
Zuul 6f31a874c8 Merge "Use systemd-journald instead of log files" 2019-07-18 20:21:35 +00:00
Dmitriy Rabotyagov c9e5f629b4 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald. We also disable uwsgi logging, since it dublicates
requests that are logged by service itself.

Change-Id: I61605b7820bb518fb809b01781f6d83f89487be8
2019-07-17 16:14:34 +00:00
Dmitriy Rabotyagov 29c540fac3 Convert dynamic includes to static imports
When task/role files are included using include_tasks, tags are not
passed to the included tasks. As a result, tags like neutron-config
do not have the intended effect. This patch changes include_tasks
to import_tasks for all cases where dynamic vars or loops are not used
so that tags are properly handled.

Reference -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html
https://bugs.launchpad.net/openstack-ansible/+bug/1815043

Change-Id: I7e529e9b4d23ffe8658c4dcdf4e98989d0f84f3f
2019-07-17 18:50:28 +03:00
OpenStack Proposal Bot 1516054746 Updated from OpenStack Ansible Tests
Change-Id: Ie21d4eb401d28a071afa923c0a02b7922392cfb8
2019-07-16 14:52:16 +00:00
Guilherme Steinmüller 65d31e5d86 db_setup: refactor database setup to a common file
This patch refactors the database creation to db_setup.yml which
will eventually be managed by openstack-ansible-tests.

This also re-orders the mq_setup to be done earlier so these system
level dependencies are ready before service activation.

Change-Id: I07fa7716383b741fe9ca157aeae3fa1683776c72
2019-07-15 01:01:07 +00:00
OpenStack Proposal Bot 0d431e8ac6 Updated from OpenStack Ansible Tests
Change-Id: Iefc2aceb6c297622af76f233a62afe464f5b424a
2019-06-18 18:16:11 +00:00
OpenStack Proposal Bot 2d3abc0e2e Updated from OpenStack Ansible Tests
Change-Id: I4b368558d2bbdafa7900e71a66664a94345fda0f
2019-06-11 22:18:29 +00:00
OpenStack Proposal Bot efb9bc7a24 Updated from OpenStack Ansible Tests
Change-Id: If09a871a48915a27c20fdf29f707e49f07f9f6ba
2019-05-09 11:34:58 +00:00
OpenStack Proposal Bot 2d6cdc50b6 Updated from OpenStack Ansible Tests
Change-Id: I75e3161ec51a1e57d3aaeb817dac1b7b0a1c79a8
2019-04-17 19:11:54 +00:00
OpenStack Proposal Bot b1e053cd6c Updated from OpenStack Ansible Tests
Change-Id: I0e10ea37ad921051235fa964d8b56ecaa948e9f8
2019-04-17 07:25:40 +00:00
OpenStack Proposal Bot 29dcaa84a6 Updated from OpenStack Ansible Tests
Change-Id: I1148bb29f38c9c8d0626f4f62b663c3b406c5731
2019-04-13 20:22:55 +00:00
OpenStack Proposal Bot cc84602cc1 Updated from OpenStack Ansible Tests
Change-Id: I9dbc878c2c6702ea3bfbb840f4d5f7bc2c03bd27
2019-04-01 13:19:04 +00:00
Guilherme Steinmüller a3770b9d39 Update role for new source build process
The variable mistral_developer_mode and mistral_venv_download
no longer carry any meaning. This review changes mistral to
do the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.

As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.

Change-Id: Ibb0a20eeec763f2051c8577da5a91ddc5b9a9e62
2019-03-26 20:17:55 +00:00
Mohammed Naser b6f83caabf Add initial Mistral role
This role allows the installation of Mistral alongside running
all of the API tests.

Depends-On: I2e19efd5fdcb0bdbb3d1cd5ee44f20e4807ea537
Depends-On: Ie3d8fb921dfedff0852b630a0a0af17b97c1bffa
Change-Id: I2390533690cd2c4511a272cc0834e240bb554696
2019-02-06 15:42:34 -05:00