diff --git a/.ansible-lint b/.ansible-lint index 7b72ba17a0..0dcd1a6f2b 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -11,9 +11,6 @@ strict: false skip_list: # disable experimental rules - experimental - # NOTE(frickler): Agreed at Zed PTG not to use FQCN for builtin actions for now, due to - # conflicts with open patches and backports. - - fqcn-builtins # FQCNs again, now for module actions - fqcn[action] # Role names diff --git a/.ansible-lint-ignore b/.ansible-lint-ignore index ab7637ed47..5031b87b51 100644 --- a/.ansible-lint-ignore +++ b/.ansible-lint-ignore @@ -1 +1,412 @@ -etc/kolla/globals.yml yaml[comments] skip \ No newline at end of file +# This file contains ignores rule violations for ansible-lint skip +ansible/roles/memcached/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/check.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/config.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/main.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/pull.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/stop.yml fqcn[action-core] skip +ansible/roles/memcached/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/check.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/clone.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/config.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/main.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/pull.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/register.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/stop.yml fqcn[action-core] skip +ansible/roles/mistral/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/module-load/tasks/main.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/check.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/config-host.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/config.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/main.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/pull.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/stop.yml fqcn[action-core] skip +ansible/roles/multipathd/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/neutron/handlers/main.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/check.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/clone.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/config-host.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/config-neutron-fake.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/config.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/legacy_upgrade.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/main.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/neutron_plugin_agent_check.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/pull.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/register.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/rolling_upgrade.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/stop.yml fqcn[action-core] skip +ansible/roles/neutron/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/nova-cell/handlers/main.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/bootstrap_upgrade.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/cell_proxy_loadbalancer.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/check.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/clone.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/config-host.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/config-libvirt-tls.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/config-nova-fake.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/config.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/config_bootstrap.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/create_cells.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/discover_computes.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/external_ceph.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/get_cell_settings.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/libvirt-cleanup.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/main.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/proxy_loadbalancer.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/pull.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/rabbitmq.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/rolling_upgrade.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/stop.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/version-check.yml fqcn[action-core] skip +ansible/roles/nova-cell/tasks/wait_discover_computes.yml fqcn[action-core] skip +ansible/roles/nova/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/nova/tasks/bootstrap_upgrade.yml fqcn[action-core] skip +ansible/roles/nova/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/nova/tasks/check.yml fqcn[action-core] skip +ansible/roles/nova/tasks/clone.yml fqcn[action-core] skip +ansible/roles/nova/tasks/config.yml fqcn[action-core] skip +ansible/roles/nova/tasks/config_bootstrap.yml fqcn[action-core] skip +ansible/roles/nova/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/nova/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/nova/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/nova/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/nova/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/nova/tasks/main.yml fqcn[action-core] skip +ansible/roles/nova/tasks/map_cell0.yml fqcn[action-core] skip +ansible/roles/nova/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/nova/tasks/pull.yml fqcn[action-core] skip +ansible/roles/nova/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/nova/tasks/refresh_scheduler_cell_cache.yml fqcn[action-core] skip +ansible/roles/nova/tasks/register.yml fqcn[action-core] skip +ansible/roles/nova/tasks/stop.yml fqcn[action-core] skip +ansible/roles/nova/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/octavia-certificates/tasks/check_expiry.yml fqcn[action-core] skip +ansible/roles/octavia-certificates/tasks/client_ca.yml fqcn[action-core] skip +ansible/roles/octavia-certificates/tasks/client_cert.yml fqcn[action-core] skip +ansible/roles/octavia-certificates/tasks/main.yml fqcn[action-core] skip +ansible/roles/octavia-certificates/tasks/server_ca.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/check.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/clone.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/config-host.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/config.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/get_resources_info.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/hm-interface.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/main.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/openrc.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/pull.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/register.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/stop.yml fqcn[action-core] skip +ansible/roles/octavia/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/check.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/config.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/main.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/pull.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/register.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/stop.yml fqcn[action-core] skip +ansible/roles/opensearch/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/openvswitch/handlers/main.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/check.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/config-host.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/config.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/main.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/pull.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/stop.yml fqcn[action-core] skip +ansible/roles/openvswitch/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/check.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/config.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/main.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/pull.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/stop.yml fqcn[action-core] skip +ansible/roles/ovn-controller/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/bootstrap-db.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/bootstrap-initial.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/check.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/config-relay.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/config.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/lookup_cluster.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/main.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/pull.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/stop.yml fqcn[action-core] skip +ansible/roles/ovn-db/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/handlers/main.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/check.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/config.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/main.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/pull.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/stop.yml fqcn[action-core] skip +ansible/roles/ovs-dpdk/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/placement/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/placement/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/placement/tasks/check.yml fqcn[action-core] skip +ansible/roles/placement/tasks/clone.yml fqcn[action-core] skip +ansible/roles/placement/tasks/config.yml fqcn[action-core] skip +ansible/roles/placement/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/placement/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/placement/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/placement/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/placement/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/placement/tasks/main.yml fqcn[action-core] skip +ansible/roles/placement/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/placement/tasks/pull.yml fqcn[action-core] skip +ansible/roles/placement/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/placement/tasks/register.yml fqcn[action-core] skip +ansible/roles/placement/tasks/stop.yml fqcn[action-core] skip +ansible/roles/placement/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/database_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/datetime_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/host_os_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/inventory_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/main.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/package_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/service_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/timesync_checks.yml fqcn[action-core] skip +ansible/roles/prechecks/tasks/user_checks.yml fqcn[action-core] skip +ansible/roles/prune-images/tasks/prune_images.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/config.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/main.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/pull.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/stop.yml fqcn[action-core] skip +ansible/roles/prometheus-node-exporters/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/check.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/config.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/main.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/pull.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/stop.yml fqcn[action-core] skip +ansible/roles/prometheus/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/proxysql-config/tasks/main.yml fqcn[action-core] skip +ansible/roles/prune-images/tasks/main.yml fqcn[action-core] skip +ansible/roles/prune-images/tasks/prune_images.yml fqcn[action-core] skip +ansible/roles/prune-images/tasks/validate_docker_execute.yml fqcn[action-core] skip +ansible/roles/rabbitmq/handlers/main.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/check.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/config.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/feature-flags.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/main.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/post-deploy.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/pull.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/remove-ha-all-policy.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/reset-state.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/restart_services.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/stop.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/rabbitmq/tasks/version-check.yml fqcn[action-core] skip +ansible/roles/service-cert-copy/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-check-containers/tasks/iterated.yml fqcn[action-core] skip +ansible/roles/service-check-containers/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-check/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-config-validate/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-config-validate/tasks/validate.yml fqcn[action-core] skip +ansible/roles/service-image-info/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-precheck/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-stop/tasks/main.yml fqcn[action-core] skip +ansible/roles/service-uwsgi-config/tasks/main.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/check.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/config.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/main.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/pull.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/register.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/stop.yml fqcn[action-core] skip +ansible/roles/skyline/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/sysctl/tasks/main.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/check.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/clone.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/config.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/main.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/pull.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/register.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/stop.yml fqcn[action-core] skip +ansible/roles/tacker/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/check.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/config.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/main.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/pull.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/stop.yml fqcn[action-core] skip +ansible/roles/telegraf/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/trove/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/trove/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/trove/tasks/check.yml fqcn[action-core] skip +ansible/roles/trove/tasks/clone.yml fqcn[action-core] skip +ansible/roles/trove/tasks/config.yml fqcn[action-core] skip +ansible/roles/trove/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/trove/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/trove/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/trove/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/trove/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/trove/tasks/main.yml fqcn[action-core] skip +ansible/roles/trove/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/trove/tasks/pull.yml fqcn[action-core] skip +ansible/roles/trove/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/trove/tasks/register.yml fqcn[action-core] skip +ansible/roles/trove/tasks/stop.yml fqcn[action-core] skip +ansible/roles/trove/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/check.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/config.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/main.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/pull.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/stop.yml fqcn[action-core] skip +ansible/roles/valkey/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/check.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/clone.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/config.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/main.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/pull.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/register.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/stop.yml fqcn[action-core] skip +ansible/roles/watcher/tasks/upgrade.yml fqcn[action-core] skip +ansible/roles/zun/handlers/main.yml fqcn[action-core] skip +ansible/roles/zun/tasks/bootstrap.yml fqcn[action-core] skip +ansible/roles/zun/tasks/check-containers.yml fqcn[action-core] skip +ansible/roles/zun/tasks/check.yml fqcn[action-core] skip +ansible/roles/zun/tasks/clone.yml fqcn[action-core] skip +ansible/roles/zun/tasks/config.yml fqcn[action-core] skip +ansible/roles/zun/tasks/config_validate.yml fqcn[action-core] skip +ansible/roles/zun/tasks/copy-certs.yml fqcn[action-core] skip +ansible/roles/zun/tasks/deploy-containers.yml fqcn[action-core] skip +ansible/roles/zun/tasks/deploy.yml fqcn[action-core] skip +ansible/roles/zun/tasks/external_ceph.yml fqcn[action-core] skip +ansible/roles/zun/tasks/loadbalancer.yml fqcn[action-core] skip +ansible/roles/zun/tasks/main.yml fqcn[action-core] skip +ansible/roles/zun/tasks/precheck.yml fqcn[action-core] skip +ansible/roles/zun/tasks/pull.yml fqcn[action-core] skip +ansible/roles/zun/tasks/reconfigure.yml fqcn[action-core] skip +ansible/roles/zun/tasks/register.yml fqcn[action-core] skip +ansible/roles/zun/tasks/stop.yml fqcn[action-core] skip +ansible/roles/zun/tasks/upgrade.yml fqcn[action-core] skip +etc/kolla/globals.yml yaml[comments] skip +roles/cephadm/tasks/main.yml fqcn[action-core] skip +roles/cephadm/tasks/pkg_debian.yml fqcn[action-core] skip +roles/cephadm/tasks/pkg_redhat.yml fqcn[action-core] skip +roles/kolla-ansible-deploy/tasks/main.yml fqcn[action-core] skip +roles/multi-node-managed-addressing/tasks/main.yml fqcn[action-core] skip +roles/multi-node-vxlan-overlay/tasks/main.yml fqcn[action-core] skip diff --git a/ansible/gather-facts.yml b/ansible/gather-facts.yml index cb0040a743..4b7de2ee32 100644 --- a/ansible/gather-facts.yml +++ b/ansible/gather-facts.yml @@ -12,12 +12,12 @@ gather_facts: false tasks: - name: Group hosts to determine when using --limit - group_by: + ansible.builtin.group_by: key: "all_using_limit_{{ (ansible_play_batch | length) != (groups['all'] | length) }}" changed_when: false - name: Gather facts - setup: + ansible.builtin.setup: filter: "{{ kolla_ansible_setup_filter }}" gather_subset: "{{ kolla_ansible_setup_gather_subset }}" when: @@ -47,7 +47,7 @@ delegate_hosts: "{{ kolla_ansible_delegate_facts_hosts[batch_index | int::batch_size | int] }}" tasks: - name: Gather facts - setup: + ansible.builtin.setup: filter: "{{ kolla_ansible_setup_filter }}" gather_subset: "{{ kolla_ansible_setup_gather_subset }}" delegate_facts: true diff --git a/ansible/group_vars/all/grafana.yml b/ansible/group_vars/all/grafana.yml index 15f4301149..470ac16692 100644 --- a/ansible/group_vars/all/grafana.yml +++ b/ansible/group_vars/all/grafana.yml @@ -9,3 +9,5 @@ grafana_public_endpoint: "{{ grafana_external_fqdn | kolla_url(public_protocol, grafana_server_port: "3000" grafana_server_public_port: "{{ haproxy_single_external_frontend_public_port if haproxy_single_external_frontend | bool else grafana_server_port }}" grafana_server_listen_port: "{{ grafana_server_port }}" + +grafana_ldap_enabled: false diff --git a/ansible/mariadb.yml b/ansible/mariadb.yml index 2024a2a4af..b0ba775290 100644 --- a/ansible/mariadb.yml +++ b/ansible/mariadb.yml @@ -13,7 +13,7 @@ - mariadb tasks: - name: Apply mariadb role - import_role: + ansible.builtin.import_role: name: mariadb - name: Restart mariadb services @@ -31,7 +31,7 @@ - mariadb tasks: - name: Restart mariadb services - import_role: + ansible.builtin.import_role: name: mariadb tasks_from: restart_services.yml @@ -50,7 +50,7 @@ - mariadb tasks: - name: Start mariadb services - import_role: + ansible.builtin.import_role: name: mariadb tasks_from: restart_services.yml @@ -67,7 +67,7 @@ - mariadb tasks: - name: Restart bootstrap mariadb service - import_role: + ansible.builtin.import_role: name: mariadb tasks_from: restart_services.yml @@ -84,13 +84,13 @@ - mariadb tasks: - name: Include mariadb post-deploy.yml - include_role: + ansible.builtin.include_role: name: mariadb tasks_from: post-deploy.yml when: kolla_action in ['deploy', 'reconfigure', 'upgrade'] - name: Include mariadb post-upgrade.yml - include_role: + ansible.builtin.include_role: name: mariadb tasks_from: post-upgrade.yml when: kolla_action == 'upgrade' diff --git a/ansible/nova-libvirt-cleanup.yml b/ansible/nova-libvirt-cleanup.yml index 638e9bbcb4..a153dc668c 100644 --- a/ansible/nova-libvirt-cleanup.yml +++ b/ansible/nova-libvirt-cleanup.yml @@ -15,6 +15,6 @@ - nova-libvirt-cleanup tasks: - name: Clean up nova libvirt container and configuration - import_role: + ansible.builtin.import_role: name: nova-cell tasks_from: libvirt-cleanup.yml diff --git a/ansible/nova.yml b/ansible/nova.yml index 95eb6a141a..4f24f6e1c7 100644 --- a/ansible/nova.yml +++ b/ansible/nova.yml @@ -47,7 +47,7 @@ # * Map cell0 # * Cell0 DB schema migrations - name: Bootstrap deploy - include_role: + ansible.builtin.include_role: name: nova tasks_from: bootstrap when: @@ -57,7 +57,7 @@ # * API DB schema migrations # * Cell0 DB schema migrations - name: Bootstrap upgrade - include_role: + ansible.builtin.include_role: name: nova tasks_from: bootstrap_upgrade when: @@ -83,7 +83,7 @@ # * Cell DB schema migrations # * Create cell mappings - name: Bootstrap deploy - include_role: + ansible.builtin.include_role: name: nova-cell tasks_from: bootstrap when: @@ -92,7 +92,7 @@ # * Cell DB schema migrations - name: Bootstrap upgrade - include_role: + ansible.builtin.include_role: name: nova-cell tasks_from: bootstrap_upgrade when: @@ -165,7 +165,7 @@ default(100) }} tasks: - name: Refresh nova scheduler cell cache - import_role: + ansible.builtin.import_role: name: nova tasks_from: refresh_scheduler_cell_cache when: @@ -195,7 +195,7 @@ default(100) }} tasks: - name: Reload global nova super conductor services - import_role: + ansible.builtin.import_role: name: nova tasks_from: reload_super_conductor when: @@ -224,7 +224,7 @@ default(100) }} tasks: - name: Reload nova cell services - import_role: + ansible.builtin.import_role: name: nova-cell tasks_from: reload when: @@ -249,7 +249,7 @@ default(100) }} tasks: - name: Reload nova API services - import_role: + ansible.builtin.import_role: name: nova tasks_from: reload_api when: @@ -274,7 +274,7 @@ any_errors_fatal: true tasks: - name: Run nova API online database migration - import_role: + ansible.builtin.import_role: name: nova tasks_from: online_data_migrations when: @@ -300,7 +300,7 @@ any_errors_fatal: true tasks: - name: Run nova cell online database migrations - import_role: + ansible.builtin.import_role: name: nova-cell tasks_from: online_data_migrations when: diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml index 93c24cc772..6cd0798147 100644 --- a/ansible/post-deploy.yml +++ b/ansible/post-deploy.yml @@ -4,12 +4,12 @@ gather_facts: false tasks: - name: Get stats of {{ node_config }} - stat: + ansible.builtin.stat: path: "{{ node_config }}" register: st - name: Set become fact - set_fact: + ansible.builtin.set_fact: needs_root: "{{ not (st.stat.writeable | bool) }}" - name: Creating clouds.yaml file on the deploy node @@ -17,7 +17,7 @@ tasks: - name: Template out clouds.yaml become: "{{ needs_root }}" - template: + ansible.builtin.template: src: "roles/common/templates/clouds.yaml.j2" dest: "{{ node_config }}/clouds.yaml" owner: "{{ ansible_facts.user_uid }}" @@ -29,7 +29,7 @@ tasks: - name: Template out admin-openrc.sh become: "{{ needs_root }}" - template: + ansible.builtin.template: src: "roles/common/templates/admin-openrc.sh.j2" dest: "{{ node_config }}/admin-openrc.sh" owner: "{{ ansible_facts.user_uid }}" @@ -38,7 +38,7 @@ - name: Template out admin-openrc-system.sh become: "{{ needs_root }}" - template: + ansible.builtin.template: src: "roles/common/templates/admin-openrc-system.sh.j2" dest: "{{ node_config }}/admin-openrc-system.sh" owner: "{{ ansible_facts.user_uid }}" @@ -47,7 +47,7 @@ - name: Template out public-openrc.sh become: "{{ needs_root }}" - template: + ansible.builtin.template: src: "roles/common/templates/public-openrc.sh.j2" dest: "{{ node_config }}/public-openrc.sh" owner: "{{ ansible_facts.user_uid }}" @@ -56,7 +56,7 @@ - name: Template out public-openrc-system.sh become: "{{ needs_root }}" - template: + ansible.builtin.template: src: "roles/common/templates/public-openrc-system.sh.j2" dest: "{{ node_config }}/public-openrc-system.sh" owner: "{{ ansible_facts.user_uid }}" @@ -64,7 +64,7 @@ mode: "0600" - name: Template out octavia-openrc.sh - import_role: + ansible.builtin.import_role: name: octavia tasks_from: openrc.yml vars: diff --git a/ansible/rabbitmq-reset-state.yml b/ansible/rabbitmq-reset-state.yml index c9d77915db..4bb3cbdb04 100644 --- a/ansible/rabbitmq-reset-state.yml +++ b/ansible/rabbitmq-reset-state.yml @@ -3,7 +3,7 @@ hosts: rabbitmq tasks: - name: Include RabbitMQ reset-state tasks - include_role: + ansible.builtin.include_role: name: rabbitmq tasks_from: reset-state when: diff --git a/ansible/rabbitmq-upgrade.yml b/ansible/rabbitmq-upgrade.yml index 6f1da63f54..cf70aded4c 100644 --- a/ansible/rabbitmq-upgrade.yml +++ b/ansible/rabbitmq-upgrade.yml @@ -11,7 +11,7 @@ default(100) }} tasks: - name: Group hosts based on enabled services (RabbitMQ Only) - group_by: + ansible.builtin.group_by: key: "enable_rabbitmq_{{ enable_rabbitmq | bool }}" changed_when: false tags: always diff --git a/ansible/rabbitmq.yml b/ansible/rabbitmq.yml index c0c3adba5f..243743d7bf 100644 --- a/ansible/rabbitmq.yml +++ b/ansible/rabbitmq.yml @@ -13,7 +13,7 @@ - rabbitmq tasks: - name: Apply rabbitmq role - import_role: + ansible.builtin.import_role: name: rabbitmq vars: role_rabbitmq_cluster_cookie: "{{ rabbitmq_cluster_cookie }}" @@ -43,7 +43,7 @@ - rabbitmq tasks: - name: Restart rabbitmq services - import_role: + ansible.builtin.import_role: name: rabbitmq tasks_from: restart_services.yml vars: @@ -63,7 +63,7 @@ - rabbitmq tasks: - name: Include rabbitmq post-deploy.yml - include_role: + ansible.builtin.include_role: name: rabbitmq tasks_from: post-deploy.yml when: kolla_action in ['deploy', 'reconfigure', 'upgrade'] diff --git a/ansible/roles/aodh/tasks/bootstrap.yml b/ansible/roles/aodh/tasks/bootstrap.yml index 5c6a46098c..12bd36340a 100644 --- a/ansible/roles/aodh/tasks/bootstrap.yml +++ b/ansible/roles/aodh/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run aodh bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/aodh/tasks/check-containers.yml b/ansible/roles/aodh/tasks/check-containers.yml index a9d8bf8d81..b0ff1d2bdb 100644 --- a/ansible/roles/aodh/tasks/check-containers.yml +++ b/ansible/roles/aodh/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check aodh containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/aodh/tasks/check.yml b/ansible/roles/aodh/tasks/check.yml index c278b658ff..07ad6adc14 100644 --- a/ansible/roles/aodh/tasks/check.yml +++ b/ansible/roles/aodh/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Aodh containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/aodh/tasks/clone.yml b/ansible/roles/aodh/tasks/clone.yml index d7ab9a0204..e8c9132e95 100644 --- a/ansible/roles/aodh/tasks/clone.yml +++ b/ansible/roles/aodh/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning aodh source repository for development become: true - git: + ansible.builtin.git: repo: "{{ aodh_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ aodh_dev_repos_pull }}" diff --git a/ansible/roles/aodh/tasks/config.yml b/ansible/roles/aodh/tasks/config.yml index 9957992397..a450746816 100644 --- a/ansible/roles/aodh/tasks/config.yml +++ b/ansible/roles/aodh/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" run_once: true delegate_to: localhost @@ -22,14 +22,14 @@ skip: true - name: Set aodh policy file - set_fact: + ansible.builtin.set_fact: aodh_policy_file: "{{ aodh_policy.results.0.stat.path | basename }}" aodh_policy_file_path: "{{ aodh_policy.results.0.stat.path }}" when: - aodh_policy.results | length > 0 - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ aodh_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ aodh_policy_file }}" mode: "0660" @@ -39,12 +39,12 @@ with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - aodh_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -67,7 +67,7 @@ with_dict: "{{ aodh_services | select_services_enabled_and_mapped_to_host }}" - name: "Configure uWSGI for {{ project_name }}" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ aodh_services }}" @@ -84,7 +84,7 @@ - name: Copying over wsgi-aodh files for services vars: service: "{{ aodh_services['aodh-api'] }}" - template: + ansible.builtin.template: src: "wsgi-aodh.conf.j2" dest: "{{ node_config_directory }}/aodh-api/wsgi-aodh.conf" mode: "0660" diff --git a/ansible/roles/aodh/tasks/config_validate.yml b/ansible/roles/aodh/tasks/config_validate.yml index 12dde59b8c..f9a93d02b5 100644 --- a/ansible/roles/aodh/tasks/config_validate.yml +++ b/ansible/roles/aodh/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate aodh configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ aodh_services }}" diff --git a/ansible/roles/aodh/tasks/copy-certs.yml b/ansible/roles/aodh/tasks/copy-certs.yml index cb71bc4b48..46895243ef 100644 --- a/ansible/roles/aodh/tasks/copy-certs.yml +++ b/ansible/roles/aodh/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ aodh_services }}" diff --git a/ansible/roles/aodh/tasks/deploy-containers.yml b/ansible/roles/aodh/tasks/deploy-containers.yml index 5f6b6c6e66..21efd279b1 100644 --- a/ansible/roles/aodh/tasks/deploy-containers.yml +++ b/ansible/roles/aodh/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check aodh containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/aodh/tasks/deploy.yml b/ansible/roles/aodh/tasks/deploy.yml index b5edd3b262..5111b4c5a0 100644 --- a/ansible/roles/aodh/tasks/deploy.yml +++ b/ansible/roles/aodh/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register aodh in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure aodh - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check aodh containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone aodh repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: aodh_dev_mode | bool - name: Bootstrap aodh service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/aodh/tasks/loadbalancer.yml b/ansible/roles/aodh/tasks/loadbalancer.yml index edced5559c..dbb025f8c6 100644 --- a/ansible/roles/aodh/tasks/loadbalancer.yml +++ b/ansible/roles/aodh/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ aodh_services }}" diff --git a/ansible/roles/aodh/tasks/main.yml b/ansible/roles/aodh/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/aodh/tasks/main.yml +++ b/ansible/roles/aodh/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/aodh/tasks/precheck.yml b/ansible/roles/aodh/tasks/precheck.yml index 415ff7b010..2e65d3bf70 100644 --- a/ansible/roles/aodh/tasks/precheck.yml +++ b/ansible/roles/aodh/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck aodh configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ aodh_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Aodh API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ aodh_api_listen_port }}" connect_timeout: 1 diff --git a/ansible/roles/aodh/tasks/pull.yml b/ansible/roles/aodh/tasks/pull.yml index f73eaca509..38a8f3986d 100644 --- a/ansible/roles/aodh/tasks/pull.yml +++ b/ansible/roles/aodh/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull aodh images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/aodh/tasks/reconfigure.yml b/ansible/roles/aodh/tasks/reconfigure.yml index 12f1eb4fba..8ae72f5d55 100644 --- a/ansible/roles/aodh/tasks/reconfigure.yml +++ b/ansible/roles/aodh/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy aodh - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/aodh/tasks/register.yml b/ansible/roles/aodh/tasks/register.yml index fe54b9e764..a9a4f1b2f4 100644 --- a/ansible/roles/aodh/tasks/register.yml +++ b/ansible/roles/aodh/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register aodh service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_aodh_auth }}" diff --git a/ansible/roles/aodh/tasks/stop.yml b/ansible/roles/aodh/tasks/stop.yml index ba791d1951..575aa40666 100644 --- a/ansible/roles/aodh/tasks/stop.yml +++ b/ansible/roles/aodh/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop aodh containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ aodh_services }}" diff --git a/ansible/roles/aodh/tasks/upgrade.yml b/ansible/roles/aodh/tasks/upgrade.yml index e7648fb54c..6cabd75e01 100644 --- a/ansible/roles/aodh/tasks/upgrade.yml +++ b/ansible/roles/aodh/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure aodh - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check aodh containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run aodh bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/barbican/tasks/bootstrap.yml b/ansible/roles/barbican/tasks/bootstrap.yml index 540fcf8a1b..d36831fd29 100644 --- a/ansible/roles/barbican/tasks/bootstrap.yml +++ b/ansible/roles/barbican/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run barbican bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/barbican/tasks/check-containers.yml b/ansible/roles/barbican/tasks/check-containers.yml index 0a84779cba..990f7faa94 100644 --- a/ansible/roles/barbican/tasks/check-containers.yml +++ b/ansible/roles/barbican/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check barbican containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/barbican/tasks/check.yml b/ansible/roles/barbican/tasks/check.yml index ebc2101108..169f27be4a 100644 --- a/ansible/roles/barbican/tasks/check.yml +++ b/ansible/roles/barbican/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Barbican containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/barbican/tasks/clone.yml b/ansible/roles/barbican/tasks/clone.yml index 27dd0c4ce6..ba82f64fbe 100644 --- a/ansible/roles/barbican/tasks/clone.yml +++ b/ansible/roles/barbican/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning barbican source repository for development become: true - git: + ansible.builtin.git: repo: "{{ barbican_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ barbican_dev_repos_pull }}" diff --git a/ansible/roles/barbican/tasks/config.yml b/ansible/roles/barbican/tasks/config.yml index 166453966d..da7126fc13 100644 --- a/ansible/roles/barbican/tasks/config.yml +++ b/ansible/roles/barbican/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" run_once: true delegate_to: localhost @@ -22,19 +22,19 @@ skip: true - name: Set barbican policy file - set_fact: + ansible.builtin.set_fact: barbican_policy_file: "{{ barbican_policy.results.0.stat.path | basename }}" barbican_policy_file_path: "{{ barbican_policy.results.0.stat.path }}" when: - barbican_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - barbican_copy_certs | bool - name: "Configure uWSGI for barbican-api" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ barbican_services }}" @@ -53,7 +53,7 @@ - barbican_wsgi_provider == "uwsgi" - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -63,7 +63,7 @@ - name: Checking whether barbican-api-paste.ini file exists vars: service: "{{ barbican_services['barbican-api'] }}" - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/barbican/barbican-api-paste.ini" run_once: true delegate_to: localhost @@ -73,7 +73,7 @@ - name: Copying over barbican-api-paste.ini vars: service: "{{ barbican_services['barbican-api'] }}" - template: + ansible.builtin.template: src: "{{ node_custom_config }}/barbican/barbican-api-paste.ini" dest: "{{ node_config_directory }}/barbican-api/barbican-api-paste.ini" mode: "0660" @@ -98,7 +98,7 @@ with_dict: "{{ barbican_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ barbican_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ barbican_policy_file }}" mode: "0660" diff --git a/ansible/roles/barbican/tasks/config_validate.yml b/ansible/roles/barbican/tasks/config_validate.yml index 6403b8a4a4..8d1b4aba10 100644 --- a/ansible/roles/barbican/tasks/config_validate.yml +++ b/ansible/roles/barbican/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate barbican configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ barbican_services }}" diff --git a/ansible/roles/barbican/tasks/copy-certs.yml b/ansible/roles/barbican/tasks/copy-certs.yml index 275a5167b5..789e6cb073 100644 --- a/ansible/roles/barbican/tasks/copy-certs.yml +++ b/ansible/roles/barbican/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ barbican_services }}" diff --git a/ansible/roles/barbican/tasks/deploy-containers.yml b/ansible/roles/barbican/tasks/deploy-containers.yml index d935ea81d3..385d47f3d1 100644 --- a/ansible/roles/barbican/tasks/deploy-containers.yml +++ b/ansible/roles/barbican/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check barbican containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/barbican/tasks/deploy.yml b/ansible/roles/barbican/tasks/deploy.yml index 0de0f2974f..854a403a82 100644 --- a/ansible/roles/barbican/tasks/deploy.yml +++ b/ansible/roles/barbican/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register barbican in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure barbican - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check barbican containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone barbican repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: barbican_dev_mode | bool - name: Bootstrap barbican service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/barbican/tasks/loadbalancer.yml b/ansible/roles/barbican/tasks/loadbalancer.yml index 78a7c1619c..66ef12e90b 100644 --- a/ansible/roles/barbican/tasks/loadbalancer.yml +++ b/ansible/roles/barbican/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ barbican_services }}" diff --git a/ansible/roles/barbican/tasks/main.yml b/ansible/roles/barbican/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/barbican/tasks/main.yml +++ b/ansible/roles/barbican/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/barbican/tasks/precheck.yml b/ansible/roles/barbican/tasks/precheck.yml index 34797c59ba..677964e579 100644 --- a/ansible/roles/barbican/tasks/precheck.yml +++ b/ansible/roles/barbican/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck barbican configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ barbican_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Barbican API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ barbican_api_listen_port }}" connect_timeout: 1 diff --git a/ansible/roles/barbican/tasks/pull.yml b/ansible/roles/barbican/tasks/pull.yml index a61db13c06..67c5ce5f6f 100644 --- a/ansible/roles/barbican/tasks/pull.yml +++ b/ansible/roles/barbican/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull barbican images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/barbican/tasks/reconfigure.yml b/ansible/roles/barbican/tasks/reconfigure.yml index cc6f6f3c67..c9c423e706 100644 --- a/ansible/roles/barbican/tasks/reconfigure.yml +++ b/ansible/roles/barbican/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy barbican - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/barbican/tasks/register.yml b/ansible/roles/barbican/tasks/register.yml index 20442acc4a..895f174771 100644 --- a/ansible/roles/barbican/tasks/register.yml +++ b/ansible/roles/barbican/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register barbican service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_barbican_auth }}" diff --git a/ansible/roles/barbican/tasks/stop.yml b/ansible/roles/barbican/tasks/stop.yml index 06635c23d0..5bac5d47ee 100644 --- a/ansible/roles/barbican/tasks/stop.yml +++ b/ansible/roles/barbican/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop barbican containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ barbican_services }}" diff --git a/ansible/roles/barbican/tasks/upgrade.yml b/ansible/roles/barbican/tasks/upgrade.yml index b876e1b2c8..30d37d45c9 100644 --- a/ansible/roles/barbican/tasks/upgrade.yml +++ b/ansible/roles/barbican/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure barbican - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check barbican containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run barbican bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/bifrost/tasks/bootstrap.yml b/ansible/roles/bifrost/tasks/bootstrap.yml index 12827d5a95..6a2f5db179 100644 --- a/ansible/roles/bifrost/tasks/bootstrap.yml +++ b/ansible/roles/bifrost/tasks/bootstrap.yml @@ -5,7 +5,7 @@ is_debian: "{{ kolla_base_distro in ['debian', 'ubuntu'] }}" become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec bifrost_deploy bash -c 'mkdir -p /var/log/kolla/ironic && chown ironic:ironic /var/log/kolla/ironic && @@ -15,7 +15,7 @@ - name: Bootstrap bifrost (this may take several minutes) become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec bifrost_deploy bash -c 'ansible-playbook {{ bifrost_deploy_verbosity }} @@ -26,7 +26,7 @@ - name: Installing ssh keys become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec bifrost_deploy bash -c 'mkdir -p /root/.ssh ; mkdir -p /home/ironic/.ssh; cp -f /etc/bifrost/id_rsa /root/.ssh/id_rsa && diff --git a/ansible/roles/bifrost/tasks/config.yml b/ansible/roles/bifrost/tasks/config.yml index 6a996193a0..8860c4569a 100644 --- a/ansible/roles/bifrost/tasks/config.yml +++ b/ansible/roles/bifrost/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item }}" state: "directory" owner: "{{ config_owner_user }}" @@ -26,7 +26,7 @@ - "servers" - name: Template ssh keys - template: + ansible.builtin.template: src: "{{ item.src }}" dest: "{{ node_config_directory }}/bifrost/{{ item.dest }}" mode: "0660" diff --git a/ansible/roles/bifrost/tasks/deploy-servers.yml b/ansible/roles/bifrost/tasks/deploy-servers.yml index 6d4d44ebff..f58e298134 100644 --- a/ansible/roles/bifrost/tasks/deploy-servers.yml +++ b/ansible/roles/bifrost/tasks/deploy-servers.yml @@ -2,7 +2,7 @@ - name: Enrolling physical servers with ironic become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec bifrost_deploy bash -c 'export OS_CLOUD=bifrost && export BIFROST_INVENTORY_SOURCE=/etc/bifrost/servers.yml && @@ -13,7 +13,7 @@ - name: Deploy physical servers with ironic become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec bifrost_deploy bash -c 'export OS_CLOUD=bifrost && export BIFROST_INVENTORY_SOURCE=/etc/bifrost/servers.yml && diff --git a/ansible/roles/bifrost/tasks/deploy.yml b/ansible/roles/bifrost/tasks/deploy.yml index 90f076c457..5fdf0aa5a9 100644 --- a/ansible/roles/bifrost/tasks/deploy.yml +++ b/ansible/roles/bifrost/tasks/deploy.yml @@ -1,9 +1,9 @@ --- - name: Configure bifrost - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Start bifrost containers - import_tasks: start.yml + ansible.builtin.import_tasks: start.yml - name: Bootstrap bifrost service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml diff --git a/ansible/roles/bifrost/tasks/main.yml b/ansible/roles/bifrost/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/bifrost/tasks/main.yml +++ b/ansible/roles/bifrost/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/bifrost/tasks/reconfigure.yml b/ansible/roles/bifrost/tasks/reconfigure.yml index 962851ed6e..38bc7ff36b 100644 --- a/ansible/roles/bifrost/tasks/reconfigure.yml +++ b/ansible/roles/bifrost/tasks/reconfigure.yml @@ -12,11 +12,11 @@ - { name: bifrost-deploy, group: bifrost-deploy } - name: Configure bifrost - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check the configs become: true - command: "{{ kolla_container_engine }} exec {{ item.name }} /usr/local/bin/kolla_set_configs --check" + ansible.builtin.command: "{{ kolla_container_engine }} exec {{ item.name }} /usr/local/bin/kolla_set_configs --check" changed_when: false failed_when: false register: check_results @@ -58,7 +58,7 @@ - "{{ check_results.results }}" - name: Start bifrost containers - include_tasks: start.yml + ansible.builtin.include_tasks: start.yml when: remove_containers.changed # noqa no-handler - name: Restart containers diff --git a/ansible/roles/bifrost/tasks/stop.yml b/ansible/roles/bifrost/tasks/stop.yml index 1ea3648e14..c2c91a426e 100644 --- a/ansible/roles/bifrost/tasks/stop.yml +++ b/ansible/roles/bifrost/tasks/stop.yml @@ -21,7 +21,7 @@ - name: Stop services gracefully become: true changed_when: true - command: "{{ kolla_container_engine }} exec bifrost_deploy systemctl stop {{ item }}.service" + ansible.builtin.command: "{{ kolla_container_engine }} exec bifrost_deploy systemctl stop {{ item }}.service" with_items: - ironic - mariadb diff --git a/ansible/roles/bifrost/tasks/upgrade.yml b/ansible/roles/bifrost/tasks/upgrade.yml index c2203cc879..0a0e0e0b99 100644 --- a/ansible/roles/bifrost/tasks/upgrade.yml +++ b/ansible/roles/bifrost/tasks/upgrade.yml @@ -1,7 +1,7 @@ --- # Stop the container prior to redeploying it. - name: Stop bifrost containers - import_tasks: stop.yml + ansible.builtin.import_tasks: stop.yml - name: Deploy bifrost - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/blazar/tasks/bootstrap.yml b/ansible/roles/blazar/tasks/bootstrap.yml index 318d63c3b1..d84eb6eacc 100644 --- a/ansible/roles/blazar/tasks/bootstrap.yml +++ b/ansible/roles/blazar/tasks/bootstrap.yml @@ -52,4 +52,4 @@ delegate_to: "{{ groups['blazar-api'][0] }}" - name: Run blazar bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/blazar/tasks/check-containers.yml b/ansible/roles/blazar/tasks/check-containers.yml index 4d0cc0e4e8..8ac3e14fd0 100644 --- a/ansible/roles/blazar/tasks/check-containers.yml +++ b/ansible/roles/blazar/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check blazar containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/blazar/tasks/check.yml b/ansible/roles/blazar/tasks/check.yml index 8eca8c3372..812c1b870d 100644 --- a/ansible/roles/blazar/tasks/check.yml +++ b/ansible/roles/blazar/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Blazar containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/blazar/tasks/clone.yml b/ansible/roles/blazar/tasks/clone.yml index af7ffb3f58..657a8c7eb5 100644 --- a/ansible/roles/blazar/tasks/clone.yml +++ b/ansible/roles/blazar/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning blazar source repository for development become: true - git: + ansible.builtin.git: repo: "{{ blazar_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ blazar_dev_repos_pull }}" diff --git a/ansible/roles/blazar/tasks/config.yml b/ansible/roles/blazar/tasks/config.yml index 5d1dc74c8d..afa944ee82 100644 --- a/ansible/roles/blazar/tasks/config.yml +++ b/ansible/roles/blazar/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" run_once: true delegate_to: localhost @@ -22,19 +22,19 @@ skip: true - name: Set blazar policy file - set_fact: + ansible.builtin.set_fact: blazar_policy_file: "{{ blazar_policy.results.0.stat.path | basename }}" blazar_policy_file_path: "{{ blazar_policy.results.0.stat.path }}" when: - blazar_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - blazar_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -57,7 +57,7 @@ with_dict: "{{ blazar_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ blazar_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ blazar_policy_file }}" mode: "0660" diff --git a/ansible/roles/blazar/tasks/config_validate.yml b/ansible/roles/blazar/tasks/config_validate.yml index c3b6382cd8..8078c40014 100644 --- a/ansible/roles/blazar/tasks/config_validate.yml +++ b/ansible/roles/blazar/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate blazar configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ blazar_services }}" diff --git a/ansible/roles/blazar/tasks/copy-certs.yml b/ansible/roles/blazar/tasks/copy-certs.yml index d941bc77ec..39875c9c39 100644 --- a/ansible/roles/blazar/tasks/copy-certs.yml +++ b/ansible/roles/blazar/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ blazar_services }}" diff --git a/ansible/roles/blazar/tasks/deploy-containers.yml b/ansible/roles/blazar/tasks/deploy-containers.yml index f0ac13641a..e607af8db4 100644 --- a/ansible/roles/blazar/tasks/deploy-containers.yml +++ b/ansible/roles/blazar/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check blazar containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/blazar/tasks/deploy.yml b/ansible/roles/blazar/tasks/deploy.yml index 3395a815c4..f4629797da 100644 --- a/ansible/roles/blazar/tasks/deploy.yml +++ b/ansible/roles/blazar/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register blazar in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure blazar - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check blazar containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone blazar repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: blazar_dev_mode | bool - name: Bootstrap blazar service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/blazar/tasks/loadbalancer.yml b/ansible/roles/blazar/tasks/loadbalancer.yml index e1dcdc5c74..bd03e7af29 100644 --- a/ansible/roles/blazar/tasks/loadbalancer.yml +++ b/ansible/roles/blazar/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ blazar_services }}" diff --git a/ansible/roles/blazar/tasks/main.yml b/ansible/roles/blazar/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/blazar/tasks/main.yml +++ b/ansible/roles/blazar/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/blazar/tasks/precheck.yml b/ansible/roles/blazar/tasks/precheck.yml index 7f9db1e962..a793649ff4 100644 --- a/ansible/roles/blazar/tasks/precheck.yml +++ b/ansible/roles/blazar/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck blazar configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ blazar_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for blazar API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ blazar_api_port }}" connect_timeout: 1 diff --git a/ansible/roles/blazar/tasks/pull.yml b/ansible/roles/blazar/tasks/pull.yml index 377926295d..667a5cf1bb 100644 --- a/ansible/roles/blazar/tasks/pull.yml +++ b/ansible/roles/blazar/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull blazar images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/blazar/tasks/reconfigure.yml b/ansible/roles/blazar/tasks/reconfigure.yml index 10b685ebff..3839984183 100644 --- a/ansible/roles/blazar/tasks/reconfigure.yml +++ b/ansible/roles/blazar/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy blazar - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/blazar/tasks/register.yml b/ansible/roles/blazar/tasks/register.yml index f0200b7750..206b316251 100644 --- a/ansible/roles/blazar/tasks/register.yml +++ b/ansible/roles/blazar/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register blazar service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_blazar_auth }}" diff --git a/ansible/roles/blazar/tasks/stop.yml b/ansible/roles/blazar/tasks/stop.yml index 91183d3a9b..ed63e9ffa9 100644 --- a/ansible/roles/blazar/tasks/stop.yml +++ b/ansible/roles/blazar/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop blazar containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ blazar_services }}" diff --git a/ansible/roles/blazar/tasks/upgrade.yml b/ansible/roles/blazar/tasks/upgrade.yml index cf1b8152fd..59f09bf84d 100644 --- a/ansible/roles/blazar/tasks/upgrade.yml +++ b/ansible/roles/blazar/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure blazar - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check blazar containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run blazar bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/ceilometer/tasks/bootstrap.yml b/ansible/roles/ceilometer/tasks/bootstrap.yml index e2410d0906..67e1c9698d 100644 --- a/ansible/roles/ceilometer/tasks/bootstrap.yml +++ b/ansible/roles/ceilometer/tasks/bootstrap.yml @@ -1,4 +1,4 @@ --- # TODO(Jeffrey4l): fix idempotent - name: Run ceilometer bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/ceilometer/tasks/check-containers.yml b/ansible/roles/ceilometer/tasks/check-containers.yml index 0e1edc02d9..b377308889 100644 --- a/ansible/roles/ceilometer/tasks/check-containers.yml +++ b/ansible/roles/ceilometer/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check ceilometer containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/ceilometer/tasks/check.yml b/ansible/roles/ceilometer/tasks/check.yml index 28ea6b2ab9..81b093c914 100644 --- a/ansible/roles/ceilometer/tasks/check.yml +++ b/ansible/roles/ceilometer/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Ceilometer containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/ceilometer/tasks/clone.yml b/ansible/roles/ceilometer/tasks/clone.yml index f7a6842f31..fc226bad68 100644 --- a/ansible/roles/ceilometer/tasks/clone.yml +++ b/ansible/roles/ceilometer/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning ceilometer source repository for development become: true - git: + ansible.builtin.git: repo: "{{ ceilometer_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/ceilometer" update: "{{ ceilometer_dev_repos_pull }}" diff --git a/ansible/roles/ceilometer/tasks/config.yml b/ansible/roles/ceilometer/tasks/config.yml index f17be7c125..431a104b4d 100644 --- a/ansible/roles/ceilometer/tasks/config.yml +++ b/ansible/roles/ceilometer/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,17 +10,17 @@ with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}" - name: Check if the folder for custom meter definitions exist - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}" delegate_to: localhost register: ceilometer_custom_meters_folder - name: Set variable that indicates if we have a folder for custom meter YAML files - set_fact: + ansible.builtin.set_fact: custom_meter_folder_exist: "{{ ceilometer_custom_meters_folder.stat.exists and ceilometer_custom_meters_folder.stat.isdir }}" - name: Find all *.yaml files in custom meter definitions folder (if the folder exist) - find: + ansible.builtin.find: paths: "{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}" patterns: "*.yaml" delegate_to: localhost @@ -28,11 +28,11 @@ when: custom_meter_folder_exist - name: Set the variable that control the copy of custom meter definitions - set_fact: + ansible.builtin.set_fact: should_copy_custom_meter_definitions: "{{ custom_meter_folder_exist and ceilometer_custom_meters_folder_found_files.matched > 0 }}" - name: Create default folder for custom meter definitions - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}/meters.d" state: "directory" owner: "{{ config_owner_user }}" @@ -44,7 +44,7 @@ - should_copy_custom_meter_definitions - name: Copying custom meter definitions to Ceilometer - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/ceilometer/{{ ceilometer_custom_meters_local_folder }}/" dest: "{{ node_config_directory }}/{{ item.key }}/meters.d" force: true @@ -55,23 +55,23 @@ with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}" - name: Check if the folder for dynamic pollsters definitions exist - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/ceilometer/{{ ceilometer_dynamic_pollsters_local_folder }}" delegate_to: localhost register: ceilometer_dynamic_pollsters_folder run_once: true - name: Set the variable that control the copy of dynamic pollsters definitions - set_fact: + ansible.builtin.set_fact: should_copy_dynamic_pollster_definitions: "{{ ceilometer_dynamic_pollsters_folder.stat.exists and ceilometer_dynamic_pollsters_folder.stat.isdir }}" - name: Clean default folder for dynamic pollsters definitions - file: + ansible.builtin.file: state: absent path: "{{ node_config_directory }}/ceilometer-central/pollsters.d/" - name: Create default folder for dynamic pollsters definitions - file: + ansible.builtin.file: path: "{{ node_config_directory }}/ceilometer-central/pollsters.d" state: "directory" owner: "{{ config_owner_user }}" @@ -83,7 +83,7 @@ - inventory_hostname in groups['ceilometer-central'] - name: Copying dynamic pollsters definitions - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/ceilometer/{{ ceilometer_dynamic_pollsters_local_folder }}/" dest: "{{ node_config_directory }}/ceilometer-central/pollsters.d/" mode: "0660" @@ -93,13 +93,13 @@ - inventory_hostname in groups['ceilometer-central'] - name: Check if custom polling.yaml exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/ceilometer/polling.yaml" delegate_to: localhost register: ceilometer_polling_file - name: Copying over polling.yaml - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/ceilometer/polling.yaml" dest: "{{ node_config_directory }}/{{ item.key }}/polling.yaml" force: true @@ -110,19 +110,19 @@ with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}" - name: Set ceilometer polling file's path - set_fact: + ansible.builtin.set_fact: ceilometer_polling_file_path: "{{ ceilometer_polling_file.stat.path }}" when: - ceilometer_polling_file.stat.exists - name: Check custom gnocchi_resources.yaml exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/ceilometer/gnocchi_resources.yaml" delegate_to: localhost register: ceilometer_gnocchi_resources_file - name: Copying over gnocchi_resources.yaml - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/ceilometer/gnocchi_resources.yaml" dest: "{{ node_config_directory }}/{{ item.key }}/gnocchi_resources.yaml" force: true @@ -133,13 +133,13 @@ with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}" - name: Set ceilometer gnocchi_resources file's path - set_fact: + ansible.builtin.set_fact: ceilometer_gnocchi_resources_file_path: "{{ ceilometer_gnocchi_resources_file.stat.path }}" when: - ceilometer_gnocchi_resources_file.stat.exists - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -151,19 +151,19 @@ skip: true - name: Set ceilometer policy file - set_fact: + ansible.builtin.set_fact: ceilometer_policy_file: "{{ ceilometer_policy.results.0.stat.path | basename }}" ceilometer_policy_file_path: "{{ ceilometer_policy.results.0.stat.path }}" when: - ceilometer_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - ceilometer_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -186,7 +186,7 @@ with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}" - name: Check custom event_definitions.yaml exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/ceilometer/event_definitions.yaml" delegate_to: localhost register: ceilometer_event_definitions_file @@ -194,7 +194,7 @@ - name: Copying over event_definitions.yaml vars: service: "{{ ceilometer_services['ceilometer-notification'] }}" - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/ceilometer/event_definitions.yaml" dest: "{{ node_config_directory }}/ceilometer-notification/event_definitions.yaml" force: true @@ -208,7 +208,7 @@ - name: Copying over event_definitions.yaml for notification service vars: service: "{{ ceilometer_services['ceilometer-notification'] }}" - template: + ansible.builtin.template: src: "event_definitions.yaml.j2" dest: "{{ node_config_directory }}/ceilometer-notification/event_definitions.yaml" mode: "0660" @@ -232,7 +232,7 @@ when: service | service_enabled_and_mapped_to_host - name: Check custom pipeline.yaml exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/ceilometer/pipeline.yaml" delegate_to: localhost register: ceilometer_pipeline_file @@ -243,7 +243,7 @@ - ceilometer-compute - ceilometer-central - ceilometer-notification - template: + ansible.builtin.template: src: "{{ node_custom_config }}/ceilometer/pipeline.yaml" dest: "{{ node_config_directory }}/{{ item.key }}/pipeline.yaml" force: true @@ -261,7 +261,7 @@ - ceilometer-compute - ceilometer-central - ceilometer-notification - template: + ansible.builtin.template: src: "pipeline.yaml.j2" dest: "{{ node_config_directory }}/{{ item.key }}/pipeline.yaml" mode: "0660" @@ -272,7 +272,7 @@ with_dict: "{{ ceilometer_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ ceilometer_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ ceilometer_policy_file }}" mode: "0660" diff --git a/ansible/roles/ceilometer/tasks/config_validate.yml b/ansible/roles/ceilometer/tasks/config_validate.yml index e91550c876..c9d31953df 100644 --- a/ansible/roles/ceilometer/tasks/config_validate.yml +++ b/ansible/roles/ceilometer/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate ceilometer configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ ceilometer_services }}" diff --git a/ansible/roles/ceilometer/tasks/copy-certs.yml b/ansible/roles/ceilometer/tasks/copy-certs.yml index 8d51048ed1..45701812b7 100644 --- a/ansible/roles/ceilometer/tasks/copy-certs.yml +++ b/ansible/roles/ceilometer/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ ceilometer_services }}" diff --git a/ansible/roles/ceilometer/tasks/deploy-containers.yml b/ansible/roles/ceilometer/tasks/deploy-containers.yml index 04fe3ef2cc..f605e565ad 100644 --- a/ansible/roles/ceilometer/tasks/deploy-containers.yml +++ b/ansible/roles/ceilometer/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check ceilometer containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/ceilometer/tasks/deploy.yml b/ansible/roles/ceilometer/tasks/deploy.yml index fcafcb739e..6c7a3d9e29 100644 --- a/ansible/roles/ceilometer/tasks/deploy.yml +++ b/ansible/roles/ceilometer/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register ceilometer in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure ceilometer - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check ceilometer containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone ceilometer repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: ceilometer_dev_mode | bool - name: Bootstrap ceilometer service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/ceilometer/tasks/main.yml b/ansible/roles/ceilometer/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/ceilometer/tasks/main.yml +++ b/ansible/roles/ceilometer/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/ceilometer/tasks/precheck.yml b/ansible/roles/ceilometer/tasks/precheck.yml index cc6fb06b41..054778a975 100644 --- a/ansible/roles/ceilometer/tasks/precheck.yml +++ b/ansible/roles/ceilometer/tasks/precheck.yml @@ -1,13 +1,13 @@ --- - name: Precheck ceilometer configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ ceilometer_services }}" service_name: "{{ project_name }}" - name: Checking Ceilometer publishers - assert: + ansible.builtin.assert: that: - not (enable_ceilometer | bool) or enable_gnocchi | bool or enable_ceilometer_prometheus_pushgateway | bool msg: "At least one Ceilometer publisher must be enabled" diff --git a/ansible/roles/ceilometer/tasks/pull.yml b/ansible/roles/ceilometer/tasks/pull.yml index 3675f59606..0747af0c7c 100644 --- a/ansible/roles/ceilometer/tasks/pull.yml +++ b/ansible/roles/ceilometer/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull ceilometer images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/ceilometer/tasks/reconfigure.yml b/ansible/roles/ceilometer/tasks/reconfigure.yml index 1a01c7f16d..7edf1f1f52 100644 --- a/ansible/roles/ceilometer/tasks/reconfigure.yml +++ b/ansible/roles/ceilometer/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy ceilometer - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/ceilometer/tasks/register.yml b/ansible/roles/ceilometer/tasks/register.yml index 1fbeac607b..dca887a960 100644 --- a/ansible/roles/ceilometer/tasks/register.yml +++ b/ansible/roles/ceilometer/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register ceilometer service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_ceilometer_auth }}" diff --git a/ansible/roles/ceilometer/tasks/stop.yml b/ansible/roles/ceilometer/tasks/stop.yml index e03f35cdc4..86843045f0 100644 --- a/ansible/roles/ceilometer/tasks/stop.yml +++ b/ansible/roles/ceilometer/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop ceilometer containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ ceilometer_services }}" diff --git a/ansible/roles/ceilometer/tasks/upgrade.yml b/ansible/roles/ceilometer/tasks/upgrade.yml index d39ff1aa47..c5113ca2c8 100644 --- a/ansible/roles/ceilometer/tasks/upgrade.yml +++ b/ansible/roles/ceilometer/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure ceilometer - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check ceilometer containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run ceilometer bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/ceph-rgw/tasks/deploy.yml b/ansible/roles/ceph-rgw/tasks/deploy.yml index ac8dea511c..cdf2814458 100644 --- a/ansible/roles/ceph-rgw/tasks/deploy.yml +++ b/ansible/roles/ceph-rgw/tasks/deploy.yml @@ -1,3 +1,3 @@ --- - name: Register ceph-rgw in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml diff --git a/ansible/roles/ceph-rgw/tasks/loadbalancer.yml b/ansible/roles/ceph-rgw/tasks/loadbalancer.yml index 86f2be9937..ac953e8a96 100644 --- a/ansible/roles/ceph-rgw/tasks/loadbalancer.yml +++ b/ansible/roles/ceph-rgw/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: loadbalancer-config vars: project_services: "{{ ceph_rgw_services }}" diff --git a/ansible/roles/ceph-rgw/tasks/main.yml b/ansible/roles/ceph-rgw/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/ceph-rgw/tasks/main.yml +++ b/ansible/roles/ceph-rgw/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/ceph-rgw/tasks/precheck.yml b/ansible/roles/ceph-rgw/tasks/precheck.yml index 5430f4837a..03a635945d 100644 --- a/ansible/roles/ceph-rgw/tasks/precheck.yml +++ b/ansible/roles/ceph-rgw/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Fail if load balancer members not set - fail: + ansible.builtin.fail: msg: >- Ceph RadosGW load balancer configuration is enabled (enable_ceph_rgw_loadbalancer) but no HAProxy members are configured. diff --git a/ansible/roles/ceph-rgw/tasks/reconfigure.yml b/ansible/roles/ceph-rgw/tasks/reconfigure.yml index bdbb09ded4..fdf0e322b9 100644 --- a/ansible/roles/ceph-rgw/tasks/reconfigure.yml +++ b/ansible/roles/ceph-rgw/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy ceph-rgw - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/ceph-rgw/tasks/register.yml b/ansible/roles/ceph-rgw/tasks/register.yml index f878bf06a2..0a9a82b278 100644 --- a/ansible/roles/ceph-rgw/tasks/register.yml +++ b/ansible/roles/ceph-rgw/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register ceph-rgw service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_ceph_rgw_auth }}" diff --git a/ansible/roles/certificates/tasks/generate-backend.yml b/ansible/roles/certificates/tasks/generate-backend.yml index 3265b82dd4..c873488d45 100644 --- a/ansible/roles/certificates/tasks/generate-backend.yml +++ b/ansible/roles/certificates/tasks/generate-backend.yml @@ -1,6 +1,6 @@ --- - name: Ensuring private backend directory exist - file: + ansible.builtin.file: path: "{{ certificates_backend_dir }}" mode: "0770" state: "directory" @@ -40,19 +40,19 @@ provider: ownca - name: Copy backend cert to default configuration location - copy: + ansible.builtin.copy: src: "{{ certificates_backend_dir }}/backend.crt" dest: "{{ kolla_certificates_dir }}/backend-cert.pem" mode: "0660" - name: Copy backend key to default configuration location - copy: + ansible.builtin.copy: src: "{{ certificates_backend_dir }}/backend.key" dest: "{{ kolla_certificates_dir }}/backend-key.pem" mode: "0660" - name: Copy backend TLS certificate and key for RabbitMQ - copy: + ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "0600" @@ -66,7 +66,7 @@ - rabbitmq_enable_tls | bool - name: Copy backend TLS certificate and key for Mariadb - copy: + ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "{{ item.mode | default('0600') }}" diff --git a/ansible/roles/certificates/tasks/generate-libvirt.yml b/ansible/roles/certificates/tasks/generate-libvirt.yml index fec5cb821b..3b1939c75e 100644 --- a/ansible/roles/certificates/tasks/generate-libvirt.yml +++ b/ansible/roles/certificates/tasks/generate-libvirt.yml @@ -1,6 +1,6 @@ --- - name: Ensuring private libvirt directory exist - file: + ansible.builtin.file: path: "{{ certificates_libvirt_dir }}" mode: "0770" state: "directory" @@ -40,25 +40,25 @@ provider: ownca - name: Setting permissions on libvirt key - file: + ansible.builtin.file: path: "{{ certificates_libvirt_dir }}/libvirt.key" mode: "0660" state: file - name: Ensure libvirt output directory exists - file: + ansible.builtin.file: path: "{{ certificates_libvirt_output_dir }}" state: directory mode: "0770" - name: Copy libvirt root CA to default configuration location - copy: + ansible.builtin.copy: src: "{{ certificates_root_dir }}/root.crt" dest: "{{ certificates_libvirt_output_dir }}/cacert.pem" mode: "0660" - name: Copy libvirt cert to default configuration locations - copy: + ansible.builtin.copy: src: "{{ certificates_libvirt_dir }}/libvirt.crt" dest: "{{ certificates_libvirt_output_dir }}/{{ item }}cert.pem" mode: "0660" @@ -67,7 +67,7 @@ - client - name: Copy libvirt key to default configuration locations - copy: + ansible.builtin.copy: src: "{{ certificates_libvirt_dir }}/libvirt.key" dest: "{{ certificates_libvirt_output_dir }}/{{ item }}key.pem" mode: "0660" diff --git a/ansible/roles/certificates/tasks/generate-root.yml b/ansible/roles/certificates/tasks/generate-root.yml index 761b771482..778d5f1d4a 100644 --- a/ansible/roles/certificates/tasks/generate-root.yml +++ b/ansible/roles/certificates/tasks/generate-root.yml @@ -1,12 +1,12 @@ --- - name: Ensuring ca directory exist - file: + ansible.builtin.file: path: "{{ kolla_certificates_dir }}/ca" state: "directory" mode: "0770" - name: Ensuring private root directory exist - file: + ansible.builtin.file: path: "{{ certificates_root_dir }}" state: "directory" mode: "0770" @@ -41,7 +41,7 @@ selfsigned_not_after: "+1024d" - name: Copy root certificate file to be included in container trusted ca-certificates - copy: + ansible.builtin.copy: src: "{{ certificates_root_dir }}/root.crt" dest: "{{ kolla_certificates_dir }}/ca/root.crt" mode: "0660" diff --git a/ansible/roles/certificates/tasks/generate.yml b/ansible/roles/certificates/tasks/generate.yml index 009d17daec..7715487f34 100644 --- a/ansible/roles/certificates/tasks/generate.yml +++ b/ansible/roles/certificates/tasks/generate.yml @@ -1,12 +1,12 @@ --- - name: Ensuring private internal directory exist - file: + ansible.builtin.file: path: "{{ certificates_internal_dir }}" state: "directory" mode: "0770" - name: Ensuring private external directory exist - file: + ansible.builtin.file: path: "{{ certificates_external_dir }}" state: "directory" mode: "0770" @@ -50,7 +50,7 @@ provider: ownca - name: Creating external Server PEM File - assemble: + ansible.builtin.assemble: regexp: \.(crt|key)$ src: "{{ certificates_external_dir }}" dest: "{{ kolla_external_fqdn_cert }}" @@ -65,19 +65,19 @@ - kolla_same_external_internal_vip | bool block: - name: Copy Certificate for ProxySQL - copy: + ansible.builtin.copy: src: "{{ certificates_external_dir }}/external.crt" dest: "{{ kolla_certificates_dir }}/proxysql-cert.pem" mode: "0660" - name: Copy Key for ProxySQL - copy: + ansible.builtin.copy: src: "{{ certificates_external_dir }}/external.key" dest: "{{ kolla_certificates_dir }}/proxysql-key.pem" mode: "0660" - name: Copy the external PEM file to be the internal when internal + external are same network - copy: + ansible.builtin.copy: src: "{{ kolla_external_fqdn_cert }}" dest: "{{ kolla_internal_fqdn_cert }}" mode: "0660" @@ -128,7 +128,7 @@ provider: ownca - name: Creating internal Server PEM File - assemble: + ansible.builtin.assemble: regexp: \.(crt|key)$ src: "{{ certificates_internal_dir }}" dest: "{{ kolla_internal_fqdn_cert }}" @@ -144,13 +144,13 @@ - not kolla_same_external_internal_vip | bool block: - name: Copy Certificate for ProxySQL - copy: + ansible.builtin.copy: src: "{{ certificates_internal_dir }}/internal.crt" dest: "{{ kolla_certificates_dir }}/proxysql-cert.pem" mode: "0660" - name: Copy Key for ProxySQL - copy: + ansible.builtin.copy: src: "{{ certificates_internal_dir }}/internal.key" dest: "{{ kolla_certificates_dir }}/proxysql-key.pem" mode: "0660" diff --git a/ansible/roles/certificates/tasks/main.yml b/ansible/roles/certificates/tasks/main.yml index e3ac17aa49..564ef4802d 100644 --- a/ansible/roles/certificates/tasks/main.yml +++ b/ansible/roles/certificates/tasks/main.yml @@ -1,12 +1,12 @@ --- - name: Generate root certificates - include_tasks: generate-root.yml + ansible.builtin.include_tasks: generate-root.yml - name: Generate certificates - include_tasks: generate.yml + ansible.builtin.include_tasks: generate.yml - name: Generate backend certificates - include_tasks: generate-backend.yml + ansible.builtin.include_tasks: generate-backend.yml when: - kolla_enable_tls_backend | bool or rabbitmq_enable_tls | bool or database_enable_tls_backend | bool - name: Generate libvirt certificates - include_tasks: generate-libvirt.yml + ansible.builtin.include_tasks: generate-libvirt.yml when: certificates_generate_libvirt | bool diff --git a/ansible/roles/cinder/handlers/main.yml b/ansible/roles/cinder/handlers/main.yml index 51583bbcc4..c54b2ab167 100644 --- a/ansible/roles/cinder/handlers/main.yml +++ b/ansible/roles/cinder/handlers/main.yml @@ -68,7 +68,7 @@ # default is 30 to allow room for slowness. - name: Wait for cinder services to update service versions - pause: + ansible.builtin.pause: seconds: "{{ cinder_rpc_version_startup_delay }}" run_once: true when: diff --git a/ansible/roles/cinder/tasks/bootstrap.yml b/ansible/roles/cinder/tasks/bootstrap.yml index cdcd692281..19e41e5d90 100644 --- a/ansible/roles/cinder/tasks/bootstrap.yml +++ b/ansible/roles/cinder/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run cinder bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/cinder/tasks/check-containers.yml b/ansible/roles/cinder/tasks/check-containers.yml index 28357439d0..44a7f4eda8 100644 --- a/ansible/roles/cinder/tasks/check-containers.yml +++ b/ansible/roles/cinder/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check cinder containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/cinder/tasks/check.yml b/ansible/roles/cinder/tasks/check.yml index 3e457f5da5..994b9e2a8d 100644 --- a/ansible/roles/cinder/tasks/check.yml +++ b/ansible/roles/cinder/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Cinder containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/cinder/tasks/clone.yml b/ansible/roles/cinder/tasks/clone.yml index 50d12a5d30..9f658379bb 100644 --- a/ansible/roles/cinder/tasks/clone.yml +++ b/ansible/roles/cinder/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning cinder source repository for development become: true - git: + ansible.builtin.git: repo: "{{ cinder_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ cinder_dev_repos_pull }}" diff --git a/ansible/roles/cinder/tasks/config.yml b/ansible/roles/cinder/tasks/config.yml index 059488face..d97cd080f4 100644 --- a/ansible/roles/cinder/tasks/config.yml +++ b/ansible/roles/cinder/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,20 +10,20 @@ with_dict: "{{ cinder_services | select_services_enabled_and_mapped_to_host }}" - name: Configure external Huawei backend - include_tasks: external_huawei.yml + ansible.builtin.include_tasks: external_huawei.yml when: - cinder_backend_huawei | bool - cinder_backend_huawei_xml_files | length > 0 - inventory_hostname in groups['cinder-volume'] - name: Configure external Ceph backend - include_tasks: external_ceph.yml + ansible.builtin.include_tasks: external_ceph.yml when: - cinder_backend_ceph | bool - inventory_hostname in groups['cinder-volume'] or inventory_hostname in groups['cinder-backup'] - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -35,19 +35,19 @@ skip: true - name: Set cinder policy file - set_fact: + ansible.builtin.set_fact: cinder_policy_file: "{{ cinder_policy.results.0.stat.path | basename }}" cinder_policy_file_path: "{{ cinder_policy.results.0.stat.path }}" when: - cinder_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - cinder_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -58,7 +58,7 @@ vars: service: "{{ cinder_services['cinder-api'] }}" become: true - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/cinder-api/cinder-wsgi.conf" mode: "0660" @@ -71,7 +71,7 @@ - cinder_wsgi_provider == "apache" - name: "Configure uWSGI for Cinder" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ cinder_services }}" @@ -108,7 +108,7 @@ vars: service: "{{ cinder_services['cinder-volume'] }}" hostnqn: "nqn.2014-08.org.nvmexpress:uuid:{{ ansible_facts.hostname | to_uuid }}" - template: + ansible.builtin.template: src: "templates/hostnqn.j2" dest: "{{ node_config_directory }}/cinder-volume/hostnqn" mode: "0660" @@ -117,7 +117,7 @@ - name: Copying over existing policy file become: true - template: + ansible.builtin.template: src: "{{ cinder_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ cinder_policy_file }}" mode: "0660" @@ -129,7 +129,7 @@ vars: service: "{{ cinder_services['cinder-volume'] }}" become: true - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/cinder-volume/nfs_shares" mode: "0660" diff --git a/ansible/roles/cinder/tasks/config_validate.yml b/ansible/roles/cinder/tasks/config_validate.yml index f22620cdaf..95f9e2dcdc 100644 --- a/ansible/roles/cinder/tasks/config_validate.yml +++ b/ansible/roles/cinder/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate cinder configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ cinder_services }}" diff --git a/ansible/roles/cinder/tasks/copy-certs.yml b/ansible/roles/cinder/tasks/copy-certs.yml index eeb2c67952..78ce3a3044 100644 --- a/ansible/roles/cinder/tasks/copy-certs.yml +++ b/ansible/roles/cinder/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ cinder_services }}" diff --git a/ansible/roles/cinder/tasks/deploy-containers.yml b/ansible/roles/cinder/tasks/deploy-containers.yml index d66a46a336..2ec44e1d6e 100644 --- a/ansible/roles/cinder/tasks/deploy-containers.yml +++ b/ansible/roles/cinder/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check cinder containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/cinder/tasks/deploy.yml b/ansible/roles/cinder/tasks/deploy.yml index 972afb86d9..5db1bc2eb2 100644 --- a/ansible/roles/cinder/tasks/deploy.yml +++ b/ansible/roles/cinder/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register cinder in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure cinder - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cinder containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone cinder repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: cinder_dev_mode | bool - name: Bootstrap cinder service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/cinder/tasks/external_ceph.yml b/ansible/roles/cinder/tasks/external_ceph.yml index 71d71723e9..b6d70fd3f4 100644 --- a/ansible/roles/cinder/tasks/external_ceph.yml +++ b/ansible/roles/cinder/tasks/external_ceph.yml @@ -2,7 +2,7 @@ - name: Ensuring cinder service ceph config subdirs exists vars: service: "{{ cinder_services[item] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item }}/ceph" state: "directory" owner: "{{ config_owner_user }}" @@ -40,7 +40,7 @@ vars: keyring: "{{ item.cluster }}.client.{{ item.user }}.keyring" service: "{{ cinder_services['cinder-volume'] }}" - template: + ansible.builtin.template: src: "{{ node_custom_config }}/cinder/cinder-volume/{{ keyring }}" dest: "{{ node_config_directory }}/cinder-volume/ceph/{{ keyring }}" mode: "0660" @@ -54,7 +54,7 @@ vars: service: "{{ cinder_services['cinder-backup'] }}" keyring: "{{ item.cluster }}.client.{{ item.user }}.keyring" - template: + ansible.builtin.template: src: "{{ node_custom_config }}/cinder/cinder-backup/{{ keyring }}" dest: "{{ node_config_directory }}/cinder-backup/ceph/{{ keyring }}" mode: "0660" @@ -68,7 +68,7 @@ - name: Ensuring config directory has correct owner and permission become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item }}" recurse: true owner: "{{ config_owner_user }}" diff --git a/ansible/roles/cinder/tasks/external_huawei.yml b/ansible/roles/cinder/tasks/external_huawei.yml index a4ff781095..675576564d 100644 --- a/ansible/roles/cinder/tasks/external_huawei.yml +++ b/ansible/roles/cinder/tasks/external_huawei.yml @@ -1,6 +1,6 @@ --- - name: Copying over Huawei XML files - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/cinder/{{ item }}" dest: "{{ node_config_directory }}/cinder-volume/{{ item }}" mode: "0660" diff --git a/ansible/roles/cinder/tasks/loadbalancer.yml b/ansible/roles/cinder/tasks/loadbalancer.yml index b764a7a1c2..8e681a67bc 100644 --- a/ansible/roles/cinder/tasks/loadbalancer.yml +++ b/ansible/roles/cinder/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ cinder_services }}" diff --git a/ansible/roles/cinder/tasks/main.yml b/ansible/roles/cinder/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/cinder/tasks/main.yml +++ b/ansible/roles/cinder/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml index 5a7988e74f..ebaf913bf1 100644 --- a/ansible/roles/cinder/tasks/precheck.yml +++ b/ansible/roles/cinder/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck cinder configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ cinder_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Cinder API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ cinder_api_listen_port }}" connect_timeout: 1 @@ -29,7 +29,7 @@ - name: Checking at least one valid backend is enabled for Cinder run_once: true - fail: + ansible.builtin.fail: msg: "Please enable at least one backend when enabling Cinder" when: - not skip_cinder_backend_check | bool @@ -46,7 +46,7 @@ - name: Checking LVM volume group exists for Cinder become: true - command: "vgs {{ cinder_volume_group }}" + ansible.builtin.command: "vgs {{ cinder_volume_group }}" register: result changed_when: false failed_when: result is failed @@ -58,7 +58,7 @@ - name: Checking for coordination backend if Ceph backend is enabled run_once: true - fail: + ansible.builtin.fail: msg: "Please enable valkey or etcd when using Cinder Ceph backend" when: - not skip_cinder_backend_check | bool @@ -67,7 +67,7 @@ - groups['cinder-volume'] | length > 1 - name: Check if S3 configurations are defined - assert: + ansible.builtin.assert: that: - vars[item] is defined msg: "Cinder backup S3 backend is enabled, either the {{ item }} or {{ item | replace('cinder_backup_', '') }} variable must be defined." @@ -79,7 +79,7 @@ when: cinder_backup_driver == "s3" - name: Check if Lightbits configurations are defined - assert: + ansible.builtin.assert: that: - vars[item] is defined msg: "Cinder Lightbits backend is enabled, the {{ item }} variable must be defined." @@ -89,7 +89,7 @@ when: enable_cinder_backend_lightbits == "yes" - name: Check if cinder_cluster_name is configured for HA configurations - assert: + ansible.builtin.assert: that: - cinder_cluster_name != "" msg: | @@ -101,7 +101,7 @@ - groups['cinder-volume'] | length > 1 - name: Check if cinder_cluster_name is configured and configuration is non-HA - assert: + ansible.builtin.assert: that: - cinder_cluster_name == "" msg: | diff --git a/ansible/roles/cinder/tasks/pull.yml b/ansible/roles/cinder/tasks/pull.yml index 3f0559f602..0b826388e7 100644 --- a/ansible/roles/cinder/tasks/pull.yml +++ b/ansible/roles/cinder/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull cinder images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/cinder/tasks/reconfigure.yml b/ansible/roles/cinder/tasks/reconfigure.yml index 3968470a84..d4dad464a8 100644 --- a/ansible/roles/cinder/tasks/reconfigure.yml +++ b/ansible/roles/cinder/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy cinder - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/cinder/tasks/register.yml b/ansible/roles/cinder/tasks/register.yml index 5f49ed6c91..009d6ee2ac 100644 --- a/ansible/roles/cinder/tasks/register.yml +++ b/ansible/roles/cinder/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register cinder service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_cinder_auth }}" diff --git a/ansible/roles/cinder/tasks/stop.yml b/ansible/roles/cinder/tasks/stop.yml index 30f437af83..3abacaebf0 100644 --- a/ansible/roles/cinder/tasks/stop.yml +++ b/ansible/roles/cinder/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop cinder containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ cinder_services }}" diff --git a/ansible/roles/cinder/tasks/upgrade.yml b/ansible/roles/cinder/tasks/upgrade.yml index ec939fac14..5b395b1c04 100644 --- a/ansible/roles/cinder/tasks/upgrade.yml +++ b/ansible/roles/cinder/tasks/upgrade.yml @@ -2,23 +2,23 @@ # NOTE (duonghq): I break config into 2 phases to prevent new version # of service start if node or process in node crash accidentally. - name: Configure cinder - include_tasks: config.yml + ansible.builtin.include_tasks: config.yml when: inventory_hostname == groups["cinder-api"][0] - name: Run cinder bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Configure cinder - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cinder containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Reload cinder services - import_tasks: reload.yml + ansible.builtin.import_tasks: reload.yml - name: Running Cinder online schema migration vars: diff --git a/ansible/roles/cloudkitty/tasks/bootstrap.yml b/ansible/roles/cloudkitty/tasks/bootstrap.yml index 90ba5e7566..06e90dbc5a 100644 --- a/ansible/roles/cloudkitty/tasks/bootstrap.yml +++ b/ansible/roles/cloudkitty/tasks/bootstrap.yml @@ -102,4 +102,4 @@ - cloudkitty_index_opensearch.get('status') != 200 - name: Run cloudkitty bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/cloudkitty/tasks/check-containers.yml b/ansible/roles/cloudkitty/tasks/check-containers.yml index 21130233f9..24a674b62e 100644 --- a/ansible/roles/cloudkitty/tasks/check-containers.yml +++ b/ansible/roles/cloudkitty/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check cloudkitty containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/cloudkitty/tasks/check.yml b/ansible/roles/cloudkitty/tasks/check.yml index 205b2e096c..6f7f6756cf 100644 --- a/ansible/roles/cloudkitty/tasks/check.yml +++ b/ansible/roles/cloudkitty/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Cloudkitty containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/cloudkitty/tasks/clone.yml b/ansible/roles/cloudkitty/tasks/clone.yml index 217a7fa4d1..7a8cc1ecc0 100644 --- a/ansible/roles/cloudkitty/tasks/clone.yml +++ b/ansible/roles/cloudkitty/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning cloudkitty source repository for development become: true - git: + ansible.builtin.git: repo: "{{ cloudkitty_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ cloudkitty_dev_repos_pull }}" diff --git a/ansible/roles/cloudkitty/tasks/config.yml b/ansible/roles/cloudkitty/tasks/config.yml index d67928cbb0..1a3492b0a0 100644 --- a/ansible/roles/cloudkitty/tasks/config.yml +++ b/ansible/roles/cloudkitty/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,20 +22,20 @@ skip: true - name: Set cloudkitty policy file - set_fact: + ansible.builtin.set_fact: cloudkitty_policy_file: "{{ cloudkitty_policy.results.0.stat.path | basename }}" cloudkitty_policy_file_path: "{{ cloudkitty_policy.results.0.stat.path }}" when: - cloudkitty_policy.results | length > 0 - name: Check if custom metrics file exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/cloudkitty/{{ cloudkitty_custom_metrics_yaml_file }}" delegate_to: localhost register: cloudkitty_custom_metrics_file - name: Copying custom metrics file - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/cloudkitty/{{ cloudkitty_custom_metrics_yaml_file }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ cloudkitty_custom_metrics_yaml_file }}" mode: "0660" @@ -45,16 +45,16 @@ with_dict: "{{ cloudkitty_services | select_services_enabled_and_mapped_to_host }}" - name: Are we using {{ cloudkitty_custom_metrics_yaml_file }}? - set_fact: + ansible.builtin.set_fact: cloudkitty_custom_metrics_used: "{{ cloudkitty_custom_metrics_file.stat.exists }}" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - cloudkitty_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -79,7 +79,7 @@ - name: Copying over wsgi-cloudkitty.conf vars: service: "{{ cloudkitty_services['cloudkitty-api'] }}" - template: + ansible.builtin.template: src: "wsgi-cloudkitty.conf.j2" dest: "{{ node_config_directory }}/cloudkitty-api/wsgi-cloudkitty.conf" mode: "0660" @@ -87,7 +87,7 @@ when: service | service_enabled_and_mapped_to_host - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ cloudkitty_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ cloudkitty_policy_file }}" mode: "0660" diff --git a/ansible/roles/cloudkitty/tasks/config_validate.yml b/ansible/roles/cloudkitty/tasks/config_validate.yml index aff2fabea0..6c1a4e769f 100644 --- a/ansible/roles/cloudkitty/tasks/config_validate.yml +++ b/ansible/roles/cloudkitty/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate cloudkitty configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ cloudkitty_services }}" diff --git a/ansible/roles/cloudkitty/tasks/copy-certs.yml b/ansible/roles/cloudkitty/tasks/copy-certs.yml index 84ec218507..754fa1d04a 100644 --- a/ansible/roles/cloudkitty/tasks/copy-certs.yml +++ b/ansible/roles/cloudkitty/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ cloudkitty_services }}" diff --git a/ansible/roles/cloudkitty/tasks/deploy-containers.yml b/ansible/roles/cloudkitty/tasks/deploy-containers.yml index e02e640bdd..fd404ec43d 100644 --- a/ansible/roles/cloudkitty/tasks/deploy-containers.yml +++ b/ansible/roles/cloudkitty/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check cloudkitty containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/cloudkitty/tasks/deploy.yml b/ansible/roles/cloudkitty/tasks/deploy.yml index b28fbb5be0..fb3de84ce0 100644 --- a/ansible/roles/cloudkitty/tasks/deploy.yml +++ b/ansible/roles/cloudkitty/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register cloudkitty in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure cloudkitty - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cloudkitty containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone cloudkitty repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: cloudkitty_dev_mode | bool - name: Bootstrap cloudkitty service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/cloudkitty/tasks/loadbalancer.yml b/ansible/roles/cloudkitty/tasks/loadbalancer.yml index 44483ca7c2..6adac90fe8 100644 --- a/ansible/roles/cloudkitty/tasks/loadbalancer.yml +++ b/ansible/roles/cloudkitty/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ cloudkitty_services }}" diff --git a/ansible/roles/cloudkitty/tasks/main.yml b/ansible/roles/cloudkitty/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/cloudkitty/tasks/main.yml +++ b/ansible/roles/cloudkitty/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/cloudkitty/tasks/precheck.yml b/ansible/roles/cloudkitty/tasks/precheck.yml index 9a726ea83d..ac4004ef9a 100644 --- a/ansible/roles/cloudkitty/tasks/precheck.yml +++ b/ansible/roles/cloudkitty/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck cloudkitty configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ cloudkitty_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Cloudkitty API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ cloudkitty_api_port }}" connect_timeout: 1 diff --git a/ansible/roles/cloudkitty/tasks/pull.yml b/ansible/roles/cloudkitty/tasks/pull.yml index fd6d79a209..4819a6e4d7 100644 --- a/ansible/roles/cloudkitty/tasks/pull.yml +++ b/ansible/roles/cloudkitty/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull cloudkitty images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/cloudkitty/tasks/reconfigure.yml b/ansible/roles/cloudkitty/tasks/reconfigure.yml index 34908bc1f0..9b95be9d56 100644 --- a/ansible/roles/cloudkitty/tasks/reconfigure.yml +++ b/ansible/roles/cloudkitty/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy cloudkitty - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/cloudkitty/tasks/register.yml b/ansible/roles/cloudkitty/tasks/register.yml index 2e3b16204a..79afbeb114 100644 --- a/ansible/roles/cloudkitty/tasks/register.yml +++ b/ansible/roles/cloudkitty/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register cloudkitty service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_cloudkitty_auth }}" diff --git a/ansible/roles/cloudkitty/tasks/stop.yml b/ansible/roles/cloudkitty/tasks/stop.yml index 1ab434872a..78d44afd13 100644 --- a/ansible/roles/cloudkitty/tasks/stop.yml +++ b/ansible/roles/cloudkitty/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop cloudkitty containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ cloudkitty_services }}" diff --git a/ansible/roles/cloudkitty/tasks/upgrade.yml b/ansible/roles/cloudkitty/tasks/upgrade.yml index aeae00aed5..e75c705bf7 100644 --- a/ansible/roles/cloudkitty/tasks/upgrade.yml +++ b/ansible/roles/cloudkitty/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure cloudkitty - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cloudkitty containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run cloudkitty bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/collectd/tasks/check-containers.yml b/ansible/roles/collectd/tasks/check-containers.yml index 997d367e17..90141e7159 100644 --- a/ansible/roles/collectd/tasks/check-containers.yml +++ b/ansible/roles/collectd/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check collectd containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/collectd/tasks/check.yml b/ansible/roles/collectd/tasks/check.yml index 6235423a1e..dce56983c1 100644 --- a/ansible/roles/collectd/tasks/check.yml +++ b/ansible/roles/collectd/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Collectd containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/collectd/tasks/config.yml b/ansible/roles/collectd/tasks/config.yml index 1a261bed98..96b092b69a 100644 --- a/ansible/roles/collectd/tasks/config.yml +++ b/ansible/roles/collectd/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring collectd config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}" - name: Ensuring Plugin directory exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}/collectd.conf.d" state: "directory" owner: "{{ config_owner_user }}" @@ -20,7 +20,7 @@ with_dict: "{{ collectd_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -30,7 +30,7 @@ - name: Copying over collectd.conf for services vars: service: "{{ collectd_services['collectd'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/collectd/collectd.conf" mode: "0660" diff --git a/ansible/roles/collectd/tasks/deploy-containers.yml b/ansible/roles/collectd/tasks/deploy-containers.yml index 5b472d2cc3..4ccab0f91a 100644 --- a/ansible/roles/collectd/tasks/deploy-containers.yml +++ b/ansible/roles/collectd/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check collectd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/collectd/tasks/deploy.yml b/ansible/roles/collectd/tasks/deploy.yml index 6de0b6c049..03d7be477c 100644 --- a/ansible/roles/collectd/tasks/deploy.yml +++ b/ansible/roles/collectd/tasks/deploy.yml @@ -1,9 +1,9 @@ --- - name: Configure collectd - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check collectd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/collectd/tasks/main.yml b/ansible/roles/collectd/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/collectd/tasks/main.yml +++ b/ansible/roles/collectd/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/collectd/tasks/precheck.yml b/ansible/roles/collectd/tasks/precheck.yml index d7be68da8e..1bbecd9e2a 100644 --- a/ansible/roles/collectd/tasks/precheck.yml +++ b/ansible/roles/collectd/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck collectd configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ collectd_services }}" diff --git a/ansible/roles/collectd/tasks/pull.yml b/ansible/roles/collectd/tasks/pull.yml index 2335fd348e..64d12741c7 100644 --- a/ansible/roles/collectd/tasks/pull.yml +++ b/ansible/roles/collectd/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull collectd images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/collectd/tasks/reconfigure.yml b/ansible/roles/collectd/tasks/reconfigure.yml index 69139b87e1..17fe88a9ba 100644 --- a/ansible/roles/collectd/tasks/reconfigure.yml +++ b/ansible/roles/collectd/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy collectd - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/collectd/tasks/stop.yml b/ansible/roles/collectd/tasks/stop.yml index cce137ebcd..8ce76ae372 100644 --- a/ansible/roles/collectd/tasks/stop.yml +++ b/ansible/roles/collectd/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop collectd containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ collectd_services }}" diff --git a/ansible/roles/collectd/tasks/upgrade.yml b/ansible/roles/collectd/tasks/upgrade.yml index 6de0b6c049..03d7be477c 100644 --- a/ansible/roles/collectd/tasks/upgrade.yml +++ b/ansible/roles/collectd/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure collectd - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check collectd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/common/handlers/main.yml b/ansible/roles/common/handlers/main.yml index 137b4f9cd7..c0d148d5fc 100644 --- a/ansible/roles/common/handlers/main.yml +++ b/ansible/roles/common/handlers/main.yml @@ -18,5 +18,5 @@ - name: Initializing toolbox container using normal user become: true - command: "{{ kolla_container_engine }} exec -t {{ common_services['kolla-toolbox']['container_name'] }} ansible --version" + ansible.builtin.command: "{{ kolla_container_engine }} exec -t {{ common_services['kolla-toolbox']['container_name'] }} ansible --version" changed_when: false diff --git a/ansible/roles/common/tasks/bootstrap.yml b/ansible/roles/common/tasks/bootstrap.yml index fa853b1d1c..8224ced75f 100644 --- a/ansible/roles/common/tasks/bootstrap.yml +++ b/ansible/roles/common/tasks/bootstrap.yml @@ -9,7 +9,7 @@ - name: Link kolla_logs volume to /var/log/kolla become: true - file: + ansible.builtin.file: src: "{{ container_engine_volumes_path }}/kolla_logs/_data" path: /var/log/kolla state: link diff --git a/ansible/roles/common/tasks/check-containers.yml b/ansible/roles/common/tasks/check-containers.yml index ce562080f4..b450a891db 100644 --- a/ansible/roles/common/tasks/check-containers.yml +++ b/ansible/roles/common/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check common containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/common/tasks/check.yml b/ansible/roles/common/tasks/check.yml index b435981ef7..ea907300a1 100644 --- a/ansible/roles/common/tasks/check.yml +++ b/ansible/roles/common/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Common containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index c27614343d..aa962fc661 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -3,7 +3,7 @@ vars: service_name: "{{ item.0.service_name }}" service: "{{ common_services[service_name] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.1 }}" state: "directory" owner: "{{ config_owner_user }}" @@ -18,12 +18,12 @@ when: service | service_enabled_and_mapped_to_host - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - common_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -32,7 +32,7 @@ - name: Ensure RabbitMQ Erlang cookie exists become: true - template: + ansible.builtin.template: src: "rabbitmq-erlang.cookie.j2" dest: "{{ node_config_directory }}/kolla-toolbox/rabbitmq-erlang.cookie" mode: "0660" @@ -42,7 +42,7 @@ - name: Ensuring config directories have correct owner and permission become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" owner: "{{ config_owner_user }}" group: "{{ config_owner_group }}" @@ -53,7 +53,7 @@ with_dict: "{{ common_services | select_services_enabled_and_mapped_to_host }}" - name: Copy rabbitmq-env.conf to kolla toolbox - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/kolla-toolbox/rabbitmq-env.conf" mode: "0600" @@ -67,7 +67,7 @@ - enable_rabbitmq | bool - name: Copy rabbitmq erl_inetrc to kolla toolbox - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/kolla-toolbox/erl_inetrc" mode: "0600" diff --git a/ansible/roles/common/tasks/copy-certs.yml b/ansible/roles/common/tasks/copy-certs.yml index 2d7815b282..ab906e2245 100644 --- a/ansible/roles/common/tasks/copy-certs.yml +++ b/ansible/roles/common/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ common_services }}" diff --git a/ansible/roles/common/tasks/deploy-containers.yml b/ansible/roles/common/tasks/deploy-containers.yml index 47b6a19b09..a37ddafc0b 100644 --- a/ansible/roles/common/tasks/deploy-containers.yml +++ b/ansible/roles/common/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check common containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/common/tasks/deploy.yml b/ansible/roles/common/tasks/deploy.yml index 9304107f9d..df6770fab7 100644 --- a/ansible/roles/common/tasks/deploy.yml +++ b/ansible/roles/common/tasks/deploy.yml @@ -1,12 +1,12 @@ --- - name: Configure common - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check common containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap common service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/common/tasks/main.yml +++ b/ansible/roles/common/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/common/tasks/precheck.yml b/ansible/roles/common/tasks/precheck.yml index 82d5a1d156..d3b4b6440f 100644 --- a/ansible/roles/common/tasks/precheck.yml +++ b/ansible/roles/common/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck common configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ common_services }}" diff --git a/ansible/roles/common/tasks/pull.yml b/ansible/roles/common/tasks/pull.yml index 8f25f799a3..ae366b2984 100644 --- a/ansible/roles/common/tasks/pull.yml +++ b/ansible/roles/common/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull common images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/common/tasks/reconfigure.yml b/ansible/roles/common/tasks/reconfigure.yml index 05ca495a94..36714ba9f9 100644 --- a/ansible/roles/common/tasks/reconfigure.yml +++ b/ansible/roles/common/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy common - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/common/tasks/stop.yml b/ansible/roles/common/tasks/stop.yml index d554e5fb41..ead296fade 100644 --- a/ansible/roles/common/tasks/stop.yml +++ b/ansible/roles/common/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop common containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ common_services }}" diff --git a/ansible/roles/common/tasks/upgrade.yml b/ansible/roles/common/tasks/upgrade.yml index ab6f5d51b5..fde501e3d3 100644 --- a/ansible/roles/common/tasks/upgrade.yml +++ b/ansible/roles/common/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure common - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check common containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/container-engine-migration/tasks/check-migration.yml b/ansible/roles/container-engine-migration/tasks/check-migration.yml index 64db98cd5e..9e8ea69aac 100644 --- a/ansible/roles/container-engine-migration/tasks/check-migration.yml +++ b/ansible/roles/container-engine-migration/tasks/check-migration.yml @@ -1,11 +1,11 @@ --- - name: Gather package facts - package_facts: + ansible.builtin.package_facts: when: - "'packages' not in ansible_facts" - name: Fail when attempting to migrate to current container engine - fail: + ansible.builtin.fail: msg: -| Cannot migrate to the same container engine that is currently used. Packages from target_engine were found on the system. diff --git a/ansible/roles/container-engine-migration/tasks/install-target-engine.yml b/ansible/roles/container-engine-migration/tasks/install-target-engine.yml index 7f6aebb991..c1dc08338e 100644 --- a/ansible/roles/container-engine-migration/tasks/install-target-engine.yml +++ b/ansible/roles/container-engine-migration/tasks/install-target-engine.yml @@ -1,8 +1,8 @@ --- - name: Install target container engine - include_role: + ansible.builtin.include_role: name: openstack.kolla.{{ target_engine }} - name: Install target container engine SDK - include_role: + ansible.builtin.include_role: name: openstack.kolla.{{ target_engine }}_sdk diff --git a/ansible/roles/container-engine-migration/tasks/main.yml b/ansible/roles/container-engine-migration/tasks/main.yml index 16ca75b1c7..a5d504560f 100644 --- a/ansible/roles/container-engine-migration/tasks/main.yml +++ b/ansible/roles/container-engine-migration/tasks/main.yml @@ -1,12 +1,12 @@ --- - name: Import tasks from check-migration.yml - import_tasks: check-migration.yml + ansible.builtin.import_tasks: check-migration.yml - name: Import tasks from install-target-engine.yml - import_tasks: install-target-engine.yml + ansible.builtin.import_tasks: install-target-engine.yml - name: Import tasks from migrate-volumes.yml - import_tasks: migrate-volumes.yml + ansible.builtin.import_tasks: migrate-volumes.yml - name: Import tasks from uninstall-current-engine.yml - import_tasks: uninstall-current-engine.yml + ansible.builtin.import_tasks: uninstall-current-engine.yml diff --git a/ansible/roles/container-engine-migration/tasks/migrate-volumes.yml b/ansible/roles/container-engine-migration/tasks/migrate-volumes.yml index afbaeaa180..dbcf7e1182 100644 --- a/ansible/roles/container-engine-migration/tasks/migrate-volumes.yml +++ b/ansible/roles/container-engine-migration/tasks/migrate-volumes.yml @@ -7,7 +7,7 @@ register: containers - name: Import tasks from ovs-cleanup.yml - import_tasks: ovs-cleanup.yml + ansible.builtin.import_tasks: ovs-cleanup.yml when: - "'openvswitch_vswitchd' in containers.container_names" - neutron_plugin_agent == 'openvswitch' @@ -22,14 +22,14 @@ - name: Create directory for target container engine volumes become: true - file: + ansible.builtin.file: path: "{{ engine_data[target_engine].volumes_dir }}" state: directory mode: "{{ engine_data[target_engine].volumes_mode }}" - name: Find current container engine volumes become: true - find: + ansible.builtin.find: paths: "{{ engine_data[current_engine].volumes_dir }}" file_type: directory register: container_volumes @@ -54,11 +54,11 @@ source_path: "{{ item.path }}/_data" become: true changed_when: true - command: "mv -f {{ source_path }} {{ target_path }}" + ansible.builtin.command: "mv -f {{ source_path }} {{ target_path }}" with_items: "{{ container_volumes.files }}" - name: Cleanup volumes - file: + ansible.builtin.file: path: "{{ item.path }}" state: absent with_items: "{{ container_volumes.files }}" @@ -67,6 +67,6 @@ # to other instances in multinode deployment - name: Remove old Mnesia tables become: true - file: + ansible.builtin.file: path: "{{ engine_data[target_engine].volumes_dir }}/rabbitmq/_data/mnesia" state: absent diff --git a/ansible/roles/container-engine-migration/tasks/ovs-cleanup.yml b/ansible/roles/container-engine-migration/tasks/ovs-cleanup.yml index 0187185701..fc66649f29 100644 --- a/ansible/roles/container-engine-migration/tasks/ovs-cleanup.yml +++ b/ansible/roles/container-engine-migration/tasks/ovs-cleanup.yml @@ -2,7 +2,7 @@ - name: Remove OVS bridges from neutron become: true changed_when: true - command: > + ansible.builtin.command: > {{ current_engine }} exec -u root neutron_openvswitch_agent neutron-ovs-cleanup --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini @@ -11,6 +11,6 @@ - name: Remove OVS bridges become: true changed_when: true - command: > + ansible.builtin.command: > {{ current_engine }} exec openvswitch_vswitchd bash -c 'for br in `ovs-vsctl list-br`;do ovs-vsctl --if-exists del-br $br;done' diff --git a/ansible/roles/container-engine-migration/tasks/uninstall-current-engine.yml b/ansible/roles/container-engine-migration/tasks/uninstall-current-engine.yml index 2ceebd24f2..0abde2d96c 100644 --- a/ansible/roles/container-engine-migration/tasks/uninstall-current-engine.yml +++ b/ansible/roles/container-engine-migration/tasks/uninstall-current-engine.yml @@ -5,16 +5,16 @@ # is merged one day - name: Remove all containers and images become: true - script: ce-cleanup.sh "{{ current_engine }}" + ansible.builtin.script: ce-cleanup.sh "{{ current_engine }}" - name: Uninstall current container engine SDK - include_role: + ansible.builtin.include_role: name: "openstack.kolla.{{ current_engine }}_sdk" vars: package_action: "uninstall" - name: Uninstall current container engine - include_role: + ansible.builtin.include_role: name: "openstack.kolla.{{ current_engine }}" vars: package_action: "uninstall" diff --git a/ansible/roles/cron/tasks/check-containers.yml b/ansible/roles/cron/tasks/check-containers.yml index d5ab9d900f..4754976b69 100644 --- a/ansible/roles/cron/tasks/check-containers.yml +++ b/ansible/roles/cron/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check cron containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/cron/tasks/check.yml b/ansible/roles/cron/tasks/check.yml index c6eeb2833f..9c19b99a77 100644 --- a/ansible/roles/cron/tasks/check.yml +++ b/ansible/roles/cron/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Cron containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/cron/tasks/config.yml b/ansible/roles/cron/tasks/config.yml index f45908c04f..2bc2018f41 100644 --- a/ansible/roles/cron/tasks/config.yml +++ b/ansible/roles/cron/tasks/config.yml @@ -3,7 +3,7 @@ vars: service_name: "{{ 'cron' }}" service: "{{ cron_services[service_name] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ service_name }}" state: "directory" owner: "{{ config_owner_user }}" @@ -13,12 +13,12 @@ when: service | service_enabled_and_mapped_to_host - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - cron_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -77,7 +77,7 @@ - { name: "trove", enabled: "{{ enable_trove | bool }}" } - { name: "watcher", enabled: "{{ enable_watcher | bool }}" } - { name: "zun", enabled: "{{ enable_zun | bool }}" } - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/cron/logrotate.conf" mode: "0660" @@ -91,7 +91,7 @@ - name: Ensuring config directories have correct owner and permission become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" owner: "{{ config_owner_user }}" group: "{{ config_owner_group }}" diff --git a/ansible/roles/cron/tasks/copy-certs.yml b/ansible/roles/cron/tasks/copy-certs.yml index 3e43bc11b0..aaf407ec4b 100644 --- a/ansible/roles/cron/tasks/copy-certs.yml +++ b/ansible/roles/cron/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ cron_services }}" diff --git a/ansible/roles/cron/tasks/deploy-containers.yml b/ansible/roles/cron/tasks/deploy-containers.yml index 68f9103a0f..30f73255c0 100644 --- a/ansible/roles/cron/tasks/deploy-containers.yml +++ b/ansible/roles/cron/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check cron containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/cron/tasks/deploy.yml b/ansible/roles/cron/tasks/deploy.yml index 55d991c21a..aeaada5e28 100644 --- a/ansible/roles/cron/tasks/deploy.yml +++ b/ansible/roles/cron/tasks/deploy.yml @@ -1,12 +1,12 @@ --- - name: Configure cron - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cron containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap cron service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/cron/tasks/main.yml b/ansible/roles/cron/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/cron/tasks/main.yml +++ b/ansible/roles/cron/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/cron/tasks/precheck.yml b/ansible/roles/cron/tasks/precheck.yml index 8da0ec64e9..8d17e2e6d0 100644 --- a/ansible/roles/cron/tasks/precheck.yml +++ b/ansible/roles/cron/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck cron configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ cron_services }}" diff --git a/ansible/roles/cron/tasks/pull.yml b/ansible/roles/cron/tasks/pull.yml index 61cc8e7f8b..4b3840f933 100644 --- a/ansible/roles/cron/tasks/pull.yml +++ b/ansible/roles/cron/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull cron images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/cron/tasks/reconfigure.yml b/ansible/roles/cron/tasks/reconfigure.yml index 24ff29cf59..ffc5bd6838 100644 --- a/ansible/roles/cron/tasks/reconfigure.yml +++ b/ansible/roles/cron/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy cron - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/cron/tasks/stop.yml b/ansible/roles/cron/tasks/stop.yml index 969ac426d1..5935a4dfb1 100644 --- a/ansible/roles/cron/tasks/stop.yml +++ b/ansible/roles/cron/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop cron containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ cron_services }}" diff --git a/ansible/roles/cron/tasks/upgrade.yml b/ansible/roles/cron/tasks/upgrade.yml index 058748d2e2..020c2e06ca 100644 --- a/ansible/roles/cron/tasks/upgrade.yml +++ b/ansible/roles/cron/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure cron - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cron containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/cyborg/tasks/bootstrap.yml b/ansible/roles/cyborg/tasks/bootstrap.yml index 0c4400b79c..fea45fa2fb 100644 --- a/ansible/roles/cyborg/tasks/bootstrap.yml +++ b/ansible/roles/cyborg/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run cyborg bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/cyborg/tasks/check-containers.yml b/ansible/roles/cyborg/tasks/check-containers.yml index 0a5ddef5a0..88610342c1 100644 --- a/ansible/roles/cyborg/tasks/check-containers.yml +++ b/ansible/roles/cyborg/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check cyborg containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/cyborg/tasks/check.yml b/ansible/roles/cyborg/tasks/check.yml index b311ec09ee..b91e1c93b7 100644 --- a/ansible/roles/cyborg/tasks/check.yml +++ b/ansible/roles/cyborg/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Cyborg containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/cyborg/tasks/clone.yml b/ansible/roles/cyborg/tasks/clone.yml index 01704b56a3..58608ac7c9 100644 --- a/ansible/roles/cyborg/tasks/clone.yml +++ b/ansible/roles/cyborg/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning cyborg source repository for development become: true - git: + ansible.builtin.git: repo: "{{ cyborg_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ cyborg_dev_repos_pull }}" diff --git a/ansible/roles/cyborg/tasks/config.yml b/ansible/roles/cyborg/tasks/config.yml index 23de526c5d..7f9ff62140 100644 --- a/ansible/roles/cyborg/tasks/config.yml +++ b/ansible/roles/cyborg/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,14 +22,14 @@ skip: true - name: Set cyborg policy file - set_fact: + ansible.builtin.set_fact: cyborg_policy_file: "{{ cyborg_policy.results.0.stat.path | basename }}" cyborg_policy_file_path: "{{ cyborg_policy.results.0.stat.path }}" when: - cyborg_policy.results | length > 0 - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ cyborg_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ cyborg_policy_file }}" mode: "0660" @@ -39,12 +39,12 @@ with_dict: "{{ cyborg_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - cyborg_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" diff --git a/ansible/roles/cyborg/tasks/config_validate.yml b/ansible/roles/cyborg/tasks/config_validate.yml index 722904c2bf..97bbe9be32 100644 --- a/ansible/roles/cyborg/tasks/config_validate.yml +++ b/ansible/roles/cyborg/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate cyborg configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ cyborg_services }}" diff --git a/ansible/roles/cyborg/tasks/copy-certs.yml b/ansible/roles/cyborg/tasks/copy-certs.yml index 526bbb12de..9b7e0e362f 100644 --- a/ansible/roles/cyborg/tasks/copy-certs.yml +++ b/ansible/roles/cyborg/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ cyborg_services }}" diff --git a/ansible/roles/cyborg/tasks/deploy-containers.yml b/ansible/roles/cyborg/tasks/deploy-containers.yml index 3d2e1cdaaa..884523b4f4 100644 --- a/ansible/roles/cyborg/tasks/deploy-containers.yml +++ b/ansible/roles/cyborg/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check cyborg containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/cyborg/tasks/deploy.yml b/ansible/roles/cyborg/tasks/deploy.yml index 13742275e2..76a5daa019 100644 --- a/ansible/roles/cyborg/tasks/deploy.yml +++ b/ansible/roles/cyborg/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register cyborg in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure cyborg - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cyborg containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone cyborg repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: cyborg_dev_mode | bool - name: Bootstrap cyborg service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/cyborg/tasks/loadbalancer.yml b/ansible/roles/cyborg/tasks/loadbalancer.yml index 43475021a5..2ce52c6551 100644 --- a/ansible/roles/cyborg/tasks/loadbalancer.yml +++ b/ansible/roles/cyborg/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ cyborg_services }}" diff --git a/ansible/roles/cyborg/tasks/main.yml b/ansible/roles/cyborg/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/cyborg/tasks/main.yml +++ b/ansible/roles/cyborg/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/cyborg/tasks/precheck.yml b/ansible/roles/cyborg/tasks/precheck.yml index c1ae1098a3..0d3cfe4a1e 100644 --- a/ansible/roles/cyborg/tasks/precheck.yml +++ b/ansible/roles/cyborg/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck cyborg configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ cyborg_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for cyborg API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ cyborg_api_port }}" connect_timeout: 1 diff --git a/ansible/roles/cyborg/tasks/pull.yml b/ansible/roles/cyborg/tasks/pull.yml index 68d5ddda99..6c839b7dcc 100644 --- a/ansible/roles/cyborg/tasks/pull.yml +++ b/ansible/roles/cyborg/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull cyborg images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/cyborg/tasks/reconfigure.yml b/ansible/roles/cyborg/tasks/reconfigure.yml index 4966ca3252..d9b3070ef1 100644 --- a/ansible/roles/cyborg/tasks/reconfigure.yml +++ b/ansible/roles/cyborg/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy cyborg - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/cyborg/tasks/register.yml b/ansible/roles/cyborg/tasks/register.yml index 40c55971ed..161f6ff7d4 100644 --- a/ansible/roles/cyborg/tasks/register.yml +++ b/ansible/roles/cyborg/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register cyborg service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_cyborg_auth }}" diff --git a/ansible/roles/cyborg/tasks/stop.yml b/ansible/roles/cyborg/tasks/stop.yml index 23a1e96616..6c33d2e0ca 100644 --- a/ansible/roles/cyborg/tasks/stop.yml +++ b/ansible/roles/cyborg/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop cyborg containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ cyborg_services }}" diff --git a/ansible/roles/cyborg/tasks/upgrade.yml b/ansible/roles/cyborg/tasks/upgrade.yml index efb3c3c8af..f7a7e703a7 100644 --- a/ansible/roles/cyborg/tasks/upgrade.yml +++ b/ansible/roles/cyborg/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure cyborg - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check cyborg containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run cyborg bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/designate/tasks/backend_external.yml b/ansible/roles/designate/tasks/backend_external.yml index 75e3efe015..5e18ade786 100644 --- a/ansible/roles/designate/tasks/backend_external.yml +++ b/ansible/roles/designate/tasks/backend_external.yml @@ -1,6 +1,6 @@ --- - name: Copying over rndc.conf (designate_backend_external) - template: + ansible.builtin.template: src: "{{ node_custom_config }}/designate/rndc.conf" dest: "{{ node_config_directory }}/{{ item.key }}/rndc.conf" mode: "0660" @@ -11,7 +11,7 @@ with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over rndc.key (designate_backend_external) - template: + ansible.builtin.template: src: "{{ node_custom_config }}/designate/rndc.key" dest: "{{ node_config_directory }}/{{ item.key }}/rndc.key" mode: "0660" diff --git a/ansible/roles/designate/tasks/bootstrap.yml b/ansible/roles/designate/tasks/bootstrap.yml index 5507140599..e488ea48df 100644 --- a/ansible/roles/designate/tasks/bootstrap.yml +++ b/ansible/roles/designate/tasks/bootstrap.yml @@ -45,4 +45,4 @@ no_log: true - name: Run designate bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/designate/tasks/check-containers.yml b/ansible/roles/designate/tasks/check-containers.yml index 8cc9f28ea2..22bf1720f3 100644 --- a/ansible/roles/designate/tasks/check-containers.yml +++ b/ansible/roles/designate/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check designate containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/designate/tasks/check.yml b/ansible/roles/designate/tasks/check.yml index 357d69288f..dc4b389a02 100644 --- a/ansible/roles/designate/tasks/check.yml +++ b/ansible/roles/designate/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Designate containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/designate/tasks/clone.yml b/ansible/roles/designate/tasks/clone.yml index 67b28b18b1..dc8a8c2e89 100644 --- a/ansible/roles/designate/tasks/clone.yml +++ b/ansible/roles/designate/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning designate source repository for development become: true - git: + ansible.builtin.git: repo: "{{ designate_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ designate_dev_repos_pull }}" diff --git a/ansible/roles/designate/tasks/config.yml b/ansible/roles/designate/tasks/config.yml index a9aafe975b..873e60fff8 100644 --- a/ansible/roles/designate/tasks/config.yml +++ b/ansible/roles/designate/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,19 +22,19 @@ skip: true - name: Set designate policy file - set_fact: + ansible.builtin.set_fact: designate_policy_file: "{{ designate_policy.results.0.stat.path | basename }}" designate_policy_file_path: "{{ designate_policy.results.0.stat.path }}" when: - designate_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - designate_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -42,7 +42,7 @@ with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}" - name: Configure uWSGI for Designate - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ designate_services }}" @@ -77,7 +77,7 @@ - name: Copying over pools.yaml vars: service: "{{ designate_services['designate-worker'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/designate-worker/pools.yaml" mode: "0660" @@ -90,7 +90,7 @@ - name: Copying over named.conf vars: service: "{{ designate_services['designate-backend-bind9'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/designate-backend-bind9/named.conf" mode: "0660" @@ -105,7 +105,7 @@ - "{{ role_path }}/templates/named.conf.j2" - name: Copying over rndc.conf - template: + ansible.builtin.template: src: "rndc.conf.j2" dest: "{{ node_config_directory }}/{{ item.key }}/rndc.conf" mode: "0660" @@ -116,7 +116,7 @@ with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over rndc.key - template: + ansible.builtin.template: src: "rndc.key.j2" dest: "{{ node_config_directory }}/{{ item.key }}/rndc.key" mode: "0660" @@ -127,11 +127,11 @@ with_dict: "{{ designate_services | select_services_enabled_and_mapped_to_host }}" - name: Include tasks from backend_external.yml - include_tasks: backend_external.yml + ansible.builtin.include_tasks: backend_external.yml when: designate_backend_external == 'bind9' - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ designate_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ designate_policy_file }}" mode: "0660" diff --git a/ansible/roles/designate/tasks/config_validate.yml b/ansible/roles/designate/tasks/config_validate.yml index 6d48562cbc..b8ca4b0d36 100644 --- a/ansible/roles/designate/tasks/config_validate.yml +++ b/ansible/roles/designate/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate designate configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ designate_services }}" diff --git a/ansible/roles/designate/tasks/copy-certs.yml b/ansible/roles/designate/tasks/copy-certs.yml index bb2eafd476..f466e502e3 100644 --- a/ansible/roles/designate/tasks/copy-certs.yml +++ b/ansible/roles/designate/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ designate_services }}" diff --git a/ansible/roles/designate/tasks/deploy-containers.yml b/ansible/roles/designate/tasks/deploy-containers.yml index 81894f38af..8cb87179f3 100644 --- a/ansible/roles/designate/tasks/deploy-containers.yml +++ b/ansible/roles/designate/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check designate containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/designate/tasks/deploy.yml b/ansible/roles/designate/tasks/deploy.yml index 2e51bfe012..78b9662f59 100644 --- a/ansible/roles/designate/tasks/deploy.yml +++ b/ansible/roles/designate/tasks/deploy.yml @@ -1,22 +1,22 @@ --- - name: Register designate in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure designate - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check designate containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone designate repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: designate_dev_mode | bool - name: Bootstrap designate service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Import tasks from update_pools.yml - import_tasks: update_pools.yml + ansible.builtin.import_tasks: update_pools.yml diff --git a/ansible/roles/designate/tasks/loadbalancer.yml b/ansible/roles/designate/tasks/loadbalancer.yml index 5c71deb353..74c25401c6 100644 --- a/ansible/roles/designate/tasks/loadbalancer.yml +++ b/ansible/roles/designate/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ designate_services }}" diff --git a/ansible/roles/designate/tasks/main.yml b/ansible/roles/designate/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/designate/tasks/main.yml +++ b/ansible/roles/designate/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/designate/tasks/precheck.yml b/ansible/roles/designate/tasks/precheck.yml index 69d0319473..3e18646eab 100644 --- a/ansible/roles/designate/tasks/precheck.yml +++ b/ansible/roles/designate/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck designate configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ designate_services }}" @@ -19,7 +19,7 @@ register: container_facts - name: Checking free port for designate API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ designate_api_listen_port }}" connect_timeout: 1 @@ -30,7 +30,7 @@ - inventory_hostname in groups['designate-api'] - name: Checking free port for designate mdns - wait_for: + ansible.builtin.wait_for: host: "{{ 'dns' | kolla_address }}" port: "{{ designate_mdns_port }}" connect_timeout: 1 @@ -41,7 +41,7 @@ - inventory_hostname in groups['designate-mdns'] - name: Checking free port for designate backend bind9 port - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ designate_bind_port }}" connect_timeout: 1 @@ -53,7 +53,7 @@ - inventory_hostname in groups['designate-backend-bind9'] - name: Checking free port for designate backend rndc port - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ designate_rndc_port }}" connect_timeout: 1 diff --git a/ansible/roles/designate/tasks/pull.yml b/ansible/roles/designate/tasks/pull.yml index 1423aa8f71..e34391c586 100644 --- a/ansible/roles/designate/tasks/pull.yml +++ b/ansible/roles/designate/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull designate images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/designate/tasks/reconfigure.yml b/ansible/roles/designate/tasks/reconfigure.yml index 128d3afb35..bc667e97d5 100644 --- a/ansible/roles/designate/tasks/reconfigure.yml +++ b/ansible/roles/designate/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy designate - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/designate/tasks/register.yml b/ansible/roles/designate/tasks/register.yml index 98d5bbf98a..34bbbb0039 100644 --- a/ansible/roles/designate/tasks/register.yml +++ b/ansible/roles/designate/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register designate service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_designate_auth }}" diff --git a/ansible/roles/designate/tasks/stop.yml b/ansible/roles/designate/tasks/stop.yml index 0ef476cda2..d5f72c7e78 100644 --- a/ansible/roles/designate/tasks/stop.yml +++ b/ansible/roles/designate/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop designate containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ designate_services }}" diff --git a/ansible/roles/designate/tasks/update_pools.yml b/ansible/roles/designate/tasks/update_pools.yml index 6707c85de1..a229f86c71 100644 --- a/ansible/roles/designate/tasks/update_pools.yml +++ b/ansible/roles/designate/tasks/update_pools.yml @@ -2,6 +2,6 @@ - name: Non-destructive DNS pools update become: true changed_when: true - command: "{{ kolla_container_engine }} exec -t designate_worker designate-manage pool update" + ansible.builtin.command: "{{ kolla_container_engine }} exec -t designate_worker designate-manage pool update" run_once: true delegate_to: "{{ groups['designate-worker'][0] }}" diff --git a/ansible/roles/designate/tasks/upgrade.yml b/ansible/roles/designate/tasks/upgrade.yml index 077810f842..10bc9b2e90 100644 --- a/ansible/roles/designate/tasks/upgrade.yml +++ b/ansible/roles/designate/tasks/upgrade.yml @@ -1,15 +1,15 @@ --- - name: Configure designate - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check designate containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run designate bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Import tasks from update_pools.yml - import_tasks: update_pools.yml + ansible.builtin.import_tasks: update_pools.yml diff --git a/ansible/roles/destroy/tasks/cleanup_containers.yml b/ansible/roles/destroy/tasks/cleanup_containers.yml index 5d9b02a9ff..15ebc40a86 100644 --- a/ansible/roles/destroy/tasks/cleanup_containers.yml +++ b/ansible/roles/destroy/tasks/cleanup_containers.yml @@ -1,3 +1,3 @@ --- - name: Destroying all Kolla containers and volumes - script: ../tools/cleanup-containers "{{ kolla_container_engine }}" + ansible.builtin.script: ../tools/cleanup-containers "{{ kolla_container_engine }}" diff --git a/ansible/roles/destroy/tasks/cleanup_host.yml b/ansible/roles/destroy/tasks/cleanup_host.yml index 2b7087b9ec..b2657ed327 100644 --- a/ansible/roles/destroy/tasks/cleanup_host.yml +++ b/ansible/roles/destroy/tasks/cleanup_host.yml @@ -1,7 +1,7 @@ --- - name: Destroying Kolla host configuration become: true - script: ../tools/cleanup-host + ansible.builtin.script: ../tools/cleanup-host environment: enable_haproxy: "{{ enable_haproxy }}" glance_file_datadir_volume: "{{ glance_file_datadir_volume }}" @@ -22,18 +22,18 @@ - inventory_hostname in groups['octavia-health-manager'] block: - name: Disable octavia-interface service - service: + ansible.builtin.service: name: octavia-interface enabled: false state: stopped failed_when: false - name: Remove octavia-interface service file - file: + ansible.builtin.file: path: /etc/systemd/system/octavia-interface.service state: absent - name: Remove dhclient.conf - file: + ansible.builtin.file: path: /etc/dhcp/octavia-dhclient.conf state: absent diff --git a/ansible/roles/destroy/tasks/cleanup_images.yml b/ansible/roles/destroy/tasks/cleanup_images.yml index 1ed2eb6004..2c12060c7c 100644 --- a/ansible/roles/destroy/tasks/cleanup_images.yml +++ b/ansible/roles/destroy/tasks/cleanup_images.yml @@ -1,5 +1,5 @@ --- - name: Removing Kolla images - script: ../tools/cleanup-images --all -e "{{ kolla_container_engine }}" + ansible.builtin.script: ../tools/cleanup-images --all -e "{{ kolla_container_engine }}" when: - destroy_include_images | bool diff --git a/ansible/roles/destroy/tasks/main.yml b/ansible/roles/destroy/tasks/main.yml index a63902a85a..6a2c4e7935 100644 --- a/ansible/roles/destroy/tasks/main.yml +++ b/ansible/roles/destroy/tasks/main.yml @@ -1,12 +1,12 @@ --- - name: Include tasks from validate_docker_execute.yml - include_tasks: validate_docker_execute.yml + ansible.builtin.include_tasks: validate_docker_execute.yml - name: Include tasks from cleanup_containers.yml - include_tasks: cleanup_containers.yml + ansible.builtin.include_tasks: cleanup_containers.yml - name: Include tasks from cleanup_images.yml - include_tasks: cleanup_images.yml + ansible.builtin.include_tasks: cleanup_images.yml - name: Include tasks from cleanup_host.yml - include_tasks: cleanup_host.yml + ansible.builtin.include_tasks: cleanup_host.yml diff --git a/ansible/roles/destroy/tasks/validate_docker_execute.yml b/ansible/roles/destroy/tasks/validate_docker_execute.yml index ff17105a76..aa92444558 100644 --- a/ansible/roles/destroy/tasks/validate_docker_execute.yml +++ b/ansible/roles/destroy/tasks/validate_docker_execute.yml @@ -2,4 +2,4 @@ - name: Ensure the docker service is running environment: CONTAINER_ENGINE: "{{ kolla_container_engine }}" - script: ../tools/validate-docker-execute.sh + ansible.builtin.script: ../tools/validate-docker-execute.sh diff --git a/ansible/roles/etcd/handlers/main.yml b/ansible/roles/etcd/handlers/main.yml index b1bb605e90..f40050fe62 100644 --- a/ansible/roles/etcd/handlers/main.yml +++ b/ansible/roles/etcd/handlers/main.yml @@ -1,13 +1,13 @@ --- - name: Bootstrap etcd on new cluster - include_tasks: "bootstrap_cluster.yml" + ansible.builtin.include_tasks: "bootstrap_cluster.yml" when: - kolla_action != "config" listen: - Bootstrap etcd cluster - name: Look up the cluster leader - include_tasks: "lookup_leader.yml" + ansible.builtin.include_tasks: "lookup_leader.yml" listen: - Restart etcd container - Bootstrap etcd services @@ -15,7 +15,7 @@ - Check for deleted members - name: Bootstrap etcd on new services - include_tasks: "bootstrap_services.yml" + ansible.builtin.include_tasks: "bootstrap_services.yml" when: - groups.etcd_had_volume_False is defined - inventory_hostname in groups.etcd_had_volume_False @@ -25,7 +25,7 @@ # When upgrading an etcd cluster we have to do it one by one - name: Upgrade etcd non-leaders - include_tasks: "restart_services.yml" + ansible.builtin.include_tasks: "restart_services.yml" when: - inventory_hostname not in (groups.etcd_is_leader_True | default([])) - kolla_action == "upgrade" @@ -36,7 +36,7 @@ # When there is no upgrade we can restart 25% of the services without # losing quorum. - name: Rolling restart of etcd non-leaders - include_tasks: "restart_services.yml" + ansible.builtin.include_tasks: "restart_services.yml" when: - inventory_hostname not in (groups.etcd_is_leader_True | default([])) - groups.etcd.index(inventory_hostname) % 4 == item @@ -52,7 +52,7 @@ - 3 - name: Restart etcd leader - include_tasks: "restart_services.yml" + ansible.builtin.include_tasks: "restart_services.yml" when: - inventory_hostname in (groups.etcd_is_leader_True | default([])) listen: @@ -61,7 +61,7 @@ - Bootstrap etcd cluster - name: Remove deleted members - include_tasks: "remove_deleted_members.yml" + ansible.builtin.include_tasks: "remove_deleted_members.yml" when: - kolla_action != "config" listen: diff --git a/ansible/roles/etcd/tasks/bootstrap.yml b/ansible/roles/etcd/tasks/bootstrap.yml index 1e5d9fb213..67bbe00e7a 100644 --- a/ansible/roles/etcd/tasks/bootstrap.yml +++ b/ansible/roles/etcd/tasks/bootstrap.yml @@ -1,6 +1,6 @@ --- - name: Import tasks from lookup_cluster.yml - import_tasks: lookup_cluster.yml + ansible.builtin.import_tasks: lookup_cluster.yml # NOTE(jan.gutter): The following two tasks set facts that aren't really used. # They serve the purpose to trigger the handlers for bootstrapping: @@ -8,7 +8,7 @@ # If some volumes exist, add the new nodes to an existing cluster. - name: Determine whether a new cluster needs bootstrapping - set_fact: + ansible.builtin.set_fact: etcd_bootstrap_cluster: >- {%- set ns = namespace(cluster_members=[]) -%} {%- for host in groups['etcd'] -%} @@ -24,7 +24,7 @@ notify: Bootstrap etcd cluster - name: Determine when new services need bootstrapping - set_fact: + ansible.builtin.set_fact: etcd_bootstrap_services: >- {%- set ns = namespace(cluster_members=[]) -%} {%- for host in groups['etcd_had_volume_False'] -%} diff --git a/ansible/roles/etcd/tasks/bootstrap_cluster.yml b/ansible/roles/etcd/tasks/bootstrap_cluster.yml index bf9bbfee9b..e62ebfc0da 100644 --- a/ansible/roles/etcd/tasks/bootstrap_cluster.yml +++ b/ansible/roles/etcd/tasks/bootstrap_cluster.yml @@ -14,7 +14,7 @@ dimensions: "{{ service.dimensions }}" - name: Wait for etcd service port liveness - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ etcd_client_port }}" connect_timeout: 1 @@ -29,7 +29,7 @@ vars: service_name: "etcd" service: "{{ etcd_services[service_name] }}" - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec {{ service.container_name }} etcdctl endpoint health changed_when: false diff --git a/ansible/roles/etcd/tasks/bootstrap_services.yml b/ansible/roles/etcd/tasks/bootstrap_services.yml index 894633ed3c..b2bb463286 100644 --- a/ansible/roles/etcd/tasks/bootstrap_services.yml +++ b/ansible/roles/etcd/tasks/bootstrap_services.yml @@ -5,7 +5,7 @@ service: "{{ etcd_services[service_name] }}" become: true changed_when: true - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec {{ service.container_name }} etcdctl member add {{ ansible_facts.hostname }} --peer-urls={{ etcd_protocol }}://{{ 'api' | kolla_address(inventory_hostname) | put_address_in_context('url') }}:{{ etcd_peer_port }} @@ -26,7 +26,7 @@ dimensions: "{{ service.dimensions }}" - name: Wait for etcd service port liveness - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ etcd_client_port }}" connect_timeout: 1 diff --git a/ansible/roles/etcd/tasks/check-containers.yml b/ansible/roles/etcd/tasks/check-containers.yml index 058969fa79..cc80349bf1 100644 --- a/ansible/roles/etcd/tasks/check-containers.yml +++ b/ansible/roles/etcd/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check etcd containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/etcd/tasks/check.yml b/ansible/roles/etcd/tasks/check.yml index 323e0152ec..b409392664 100644 --- a/ansible/roles/etcd/tasks/check.yml +++ b/ansible/roles/etcd/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Etcd containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/etcd/tasks/config.yml b/ansible/roles/etcd/tasks/config.yml index 2d6efbf37d..a7de15fb83 100644 --- a/ansible/roles/etcd/tasks/config.yml +++ b/ansible/roles/etcd/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ etcd_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -18,6 +18,6 @@ with_dict: "{{ etcd_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - etcd_copy_certs | bool diff --git a/ansible/roles/etcd/tasks/copy-certs.yml b/ansible/roles/etcd/tasks/copy-certs.yml index 5530b6a8ee..5a447bcc3e 100644 --- a/ansible/roles/etcd/tasks/copy-certs.yml +++ b/ansible/roles/etcd/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ etcd_services }}" diff --git a/ansible/roles/etcd/tasks/deploy-containers.yml b/ansible/roles/etcd/tasks/deploy-containers.yml index fb5c7a780b..d98bc7af91 100644 --- a/ansible/roles/etcd/tasks/deploy-containers.yml +++ b/ansible/roles/etcd/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check etcd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/etcd/tasks/deploy.yml b/ansible/roles/etcd/tasks/deploy.yml index e1455f68cb..e102a68c47 100644 --- a/ansible/roles/etcd/tasks/deploy.yml +++ b/ansible/roles/etcd/tasks/deploy.yml @@ -1,12 +1,12 @@ --- - name: Configure etcd - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check etcd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap etcd service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/etcd/tasks/loadbalancer.yml b/ansible/roles/etcd/tasks/loadbalancer.yml index 07e1a3be44..cf745be1b8 100644 --- a/ansible/roles/etcd/tasks/loadbalancer.yml +++ b/ansible/roles/etcd/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ etcd_services }}" diff --git a/ansible/roles/etcd/tasks/lookup_cluster.yml b/ansible/roles/etcd/tasks/lookup_cluster.yml index bd95d573b0..989f3892ae 100644 --- a/ansible/roles/etcd/tasks/lookup_cluster.yml +++ b/ansible/roles/etcd/tasks/lookup_cluster.yml @@ -13,12 +13,12 @@ # data on it. - name: Divide hosts by their etcd volume availability - group_by: + ansible.builtin.group_by: key: etcd_had_volume_{{ etcd_volume is not changed }} changed_when: false - name: Establish whether the cluster has already existed - set_fact: + ansible.builtin.set_fact: etcd_cluster_exists: "{{ groups.etcd_had_volume_True is defined }}" changed_when: - etcd_remove_deleted_members | bool diff --git a/ansible/roles/etcd/tasks/lookup_leader.yml b/ansible/roles/etcd/tasks/lookup_leader.yml index aebd851a14..f74c5df6b7 100644 --- a/ansible/roles/etcd/tasks/lookup_leader.yml +++ b/ansible/roles/etcd/tasks/lookup_leader.yml @@ -8,7 +8,7 @@ # NOTE(jan.gutter): We need to set the ETCD environment vars here to # handle an upgrade scenario from older etcd containers. These can be # removed once the new workflow has been in place for a cycle or two. - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec -e ETCDCTL_API=3 -e ETCDCTL_ENDPOINTS="{{ etcd_client_internal_endpoint }}" @@ -30,12 +30,12 @@ etcd_leader_id: >- {{ etcd_endpoint_status[0]['Status']['leader'] | default('none') }} - group_by: + ansible.builtin.group_by: key: etcd_is_leader_{{ etcd_member_id == etcd_leader_id }} changed_when: false - name: Set the etcd cluster leader - set_fact: + ansible.builtin.set_fact: etcd_cluster_leader: "{{ groups.etcd_is_leader_True | sort | first }}" when: groups.etcd_is_leader_True is defined changed_when: false diff --git a/ansible/roles/etcd/tasks/main.yml b/ansible/roles/etcd/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/etcd/tasks/main.yml +++ b/ansible/roles/etcd/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/etcd/tasks/precheck.yml b/ansible/roles/etcd/tasks/precheck.yml index 5c02f47a71..215006bf65 100644 --- a/ansible/roles/etcd/tasks/precheck.yml +++ b/ansible/roles/etcd/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck etcd configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ etcd_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Etcd Peer - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ etcd_peer_port }}" connect_timeout: 1 @@ -28,7 +28,7 @@ - inventory_hostname in groups[etcd_services.etcd.group] - name: Checking free port for Etcd Client - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ etcd_client_port }}" connect_timeout: 1 diff --git a/ansible/roles/etcd/tasks/pull.yml b/ansible/roles/etcd/tasks/pull.yml index cd1f70475f..eb9adfd5d8 100644 --- a/ansible/roles/etcd/tasks/pull.yml +++ b/ansible/roles/etcd/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull etcd images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/etcd/tasks/reconfigure.yml b/ansible/roles/etcd/tasks/reconfigure.yml index f5f86bca90..fc7001c606 100644 --- a/ansible/roles/etcd/tasks/reconfigure.yml +++ b/ansible/roles/etcd/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy etcd - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/etcd/tasks/remove_deleted_members.yml b/ansible/roles/etcd/tasks/remove_deleted_members.yml index 6650ecea45..e8b6f9f955 100644 --- a/ansible/roles/etcd/tasks/remove_deleted_members.yml +++ b/ansible/roles/etcd/tasks/remove_deleted_members.yml @@ -4,7 +4,7 @@ service_name: "etcd" service: "{{ etcd_services[service_name] }}" become: true - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec {{ service.container_name }} etcdctl member list changed_when: false @@ -30,7 +30,7 @@ | json_query('members[].{key: name, value: ID}') | items2dict }} become: true changed_when: true - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec {{ service.container_name }} etcdctl member remove {{ '%x' % etcd_member_id[etcd_deleted_member] }} run_once: true diff --git a/ansible/roles/etcd/tasks/restart_services.yml b/ansible/roles/etcd/tasks/restart_services.yml index 622e1b467e..3f6991dcf0 100644 --- a/ansible/roles/etcd/tasks/restart_services.yml +++ b/ansible/roles/etcd/tasks/restart_services.yml @@ -14,7 +14,7 @@ environment: "{{ service.environment }}" - name: Wait for etcd service port liveness - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ etcd_client_port }}" connect_timeout: 1 @@ -29,7 +29,7 @@ vars: service_name: "etcd" service: "{{ etcd_services[service_name] }}" - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec {{ service.container_name }} etcdctl endpoint health changed_when: false diff --git a/ansible/roles/etcd/tasks/stop.yml b/ansible/roles/etcd/tasks/stop.yml index 6925508e42..734b509475 100644 --- a/ansible/roles/etcd/tasks/stop.yml +++ b/ansible/roles/etcd/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop etcd containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ etcd_services }}" diff --git a/ansible/roles/etcd/tasks/upgrade.yml b/ansible/roles/etcd/tasks/upgrade.yml index 247ce55e89..30debd98b1 100644 --- a/ansible/roles/etcd/tasks/upgrade.yml +++ b/ansible/roles/etcd/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure etcd - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check etcd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/fluentd/tasks/check-containers.yml b/ansible/roles/fluentd/tasks/check-containers.yml index e567793360..20c2f222ba 100644 --- a/ansible/roles/fluentd/tasks/check-containers.yml +++ b/ansible/roles/fluentd/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check fluentd containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/fluentd/tasks/check.yml b/ansible/roles/fluentd/tasks/check.yml index 0e67a9435b..a5a1011830 100644 --- a/ansible/roles/fluentd/tasks/check.yml +++ b/ansible/roles/fluentd/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking fluentd containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/fluentd/tasks/config.yml b/ansible/roles/fluentd/tasks/config.yml index 3a4115a35c..50e54a7ec2 100644 --- a/ansible/roles/fluentd/tasks/config.yml +++ b/ansible/roles/fluentd/tasks/config.yml @@ -3,7 +3,7 @@ vars: service_name: "fluentd" service: "{{ fluentd_services[service_name] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ service_name }}" state: "directory" owner: "{{ config_owner_user }}" @@ -13,13 +13,13 @@ when: service | service_enabled_and_mapped_to_host - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - kolla_copy_ca_into_containers | bool - name: Ensure /var/log/journal exists on EL systems become: true - file: + ansible.builtin.file: path: /var/log/journal state: directory owner: root @@ -28,7 +28,7 @@ when: kolla_base_distro in ['centos', 'rocky'] - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -36,7 +36,7 @@ with_dict: "{{ fluentd_services | select_services_enabled_and_mapped_to_host }}" - name: Find custom fluentd input config files - find: + ansible.builtin.find: path: "{{ node_custom_config }}/fluentd/input" pattern: "*.conf" run_once: true @@ -44,7 +44,7 @@ delegate_to: localhost - name: Find custom fluentd filter config files - find: + ansible.builtin.find: path: "{{ node_custom_config }}/fluentd/filter" pattern: "*.conf" run_once: true @@ -52,7 +52,7 @@ delegate_to: localhost - name: Find custom fluentd format config files - find: + ansible.builtin.find: path: "{{ node_custom_config }}/fluentd/format" pattern: "*.conf" run_once: true @@ -60,7 +60,7 @@ delegate_to: localhost - name: Find custom fluentd output config files - find: + ansible.builtin.find: path: "{{ node_custom_config }}/fluentd/output" pattern: "*.conf" run_once: true @@ -126,7 +126,7 @@ - name: "conf/output/03-opensearch.conf.j2" enabled: "{{ log_direct_to_opensearch }}" customised_output_files: "{{ find_custom_fluentd_outputs.files | map(attribute='path') | list }}" - template: + ansible.builtin.template: src: "fluentd.conf.j2" dest: "{{ node_config_directory }}/fluentd/fluentd.conf" mode: "0660" @@ -134,7 +134,7 @@ - name: Ensuring config directories have correct owner and permission become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" owner: "{{ config_owner_user }}" group: "{{ config_owner_group }}" diff --git a/ansible/roles/fluentd/tasks/copy-certs.yml b/ansible/roles/fluentd/tasks/copy-certs.yml index 6f7b9b7a00..ce9c9b7f81 100644 --- a/ansible/roles/fluentd/tasks/copy-certs.yml +++ b/ansible/roles/fluentd/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ fluentd_services }}" diff --git a/ansible/roles/fluentd/tasks/deploy-containers.yml b/ansible/roles/fluentd/tasks/deploy-containers.yml index 37ee856abc..f4d144f1a1 100644 --- a/ansible/roles/fluentd/tasks/deploy-containers.yml +++ b/ansible/roles/fluentd/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check fluentd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/fluentd/tasks/deploy.yml b/ansible/roles/fluentd/tasks/deploy.yml index b12d9b19e8..3a77106d3c 100644 --- a/ansible/roles/fluentd/tasks/deploy.yml +++ b/ansible/roles/fluentd/tasks/deploy.yml @@ -1,12 +1,12 @@ --- - name: Configure fluentd - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check fluentd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap fluentd service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/fluentd/tasks/main.yml b/ansible/roles/fluentd/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/fluentd/tasks/main.yml +++ b/ansible/roles/fluentd/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/fluentd/tasks/precheck.yml b/ansible/roles/fluentd/tasks/precheck.yml index 3776cfed5e..815c6b62f1 100644 --- a/ansible/roles/fluentd/tasks/precheck.yml +++ b/ansible/roles/fluentd/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck fluentd configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ fluentd_services }}" diff --git a/ansible/roles/fluentd/tasks/pull.yml b/ansible/roles/fluentd/tasks/pull.yml index e3f9f5a97b..06eacb0420 100644 --- a/ansible/roles/fluentd/tasks/pull.yml +++ b/ansible/roles/fluentd/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull fluentd images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/fluentd/tasks/reconfigure.yml b/ansible/roles/fluentd/tasks/reconfigure.yml index 6ae01e0b02..0ed2867094 100644 --- a/ansible/roles/fluentd/tasks/reconfigure.yml +++ b/ansible/roles/fluentd/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy fluentd - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/fluentd/tasks/stop.yml b/ansible/roles/fluentd/tasks/stop.yml index 788546bc90..a1ef64a664 100644 --- a/ansible/roles/fluentd/tasks/stop.yml +++ b/ansible/roles/fluentd/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop fluentd containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ fluentd_services }}" diff --git a/ansible/roles/fluentd/tasks/upgrade.yml b/ansible/roles/fluentd/tasks/upgrade.yml index 1de3f9c991..f73d9ab110 100644 --- a/ansible/roles/fluentd/tasks/upgrade.yml +++ b/ansible/roles/fluentd/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure fluentd - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check fluentd containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/glance/tasks/bootstrap.yml b/ansible/roles/glance/tasks/bootstrap.yml index 40301f5315..b8a73e3180 100644 --- a/ansible/roles/glance/tasks/bootstrap.yml +++ b/ansible/roles/glance/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run glance bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/glance/tasks/check-containers.yml b/ansible/roles/glance/tasks/check-containers.yml index 34bbda71ea..c36f3d2cd9 100644 --- a/ansible/roles/glance/tasks/check-containers.yml +++ b/ansible/roles/glance/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check glance containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/glance/tasks/check.yml b/ansible/roles/glance/tasks/check.yml index f01d997378..023eb6cd1c 100644 --- a/ansible/roles/glance/tasks/check.yml +++ b/ansible/roles/glance/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Glance containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/glance/tasks/clone.yml b/ansible/roles/glance/tasks/clone.yml index da9072fbee..f628b60082 100644 --- a/ansible/roles/glance/tasks/clone.yml +++ b/ansible/roles/glance/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning source repositories for development become: true - git: + ansible.builtin.git: repo: "{{ glance_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ glance_dev_repos_pull }}" diff --git a/ansible/roles/glance/tasks/config.yml b/ansible/roles/glance/tasks/config.yml index 7c3559beab..7fa92b2605 100644 --- a/ansible/roles/glance/tasks/config.yml +++ b/ansible/roles/glance/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,12 +10,12 @@ with_dict: "{{ glance_services | select_services_enabled_and_mapped_to_host }}" - name: Include tasks from external_ceph.yml - include_tasks: external_ceph.yml + ansible.builtin.include_tasks: external_ceph.yml when: - glance_backend_ceph | bool - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -27,19 +27,19 @@ skip: true - name: Set glance policy file - set_fact: + ansible.builtin.set_fact: glance_policy_file: "{{ glance_policy.results.0.stat.path | basename }}" glance_policy_file_path: "{{ glance_policy.results.0.stat.path }}" when: - glance_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - glance_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -47,7 +47,7 @@ with_dict: "{{ glance_services | select_services_enabled_and_mapped_to_host }}" - name: "Configure uWSGI for Glance" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ glance_services }}" @@ -98,7 +98,7 @@ - name: Copying over glance-image-import.conf vars: service: "{{ glance_services['glance-api'] }}" - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/glance/glance-image-import.conf" dest: "{{ node_config_directory }}/glance-api/glance-image-import.conf" mode: "0660" @@ -110,7 +110,7 @@ - name: Copying over property-protections-rules.conf vars: service: "{{ glance_services['glance-api'] }}" - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/glance/property-protections-rules.conf" dest: "{{ node_config_directory }}/glance-api/property-protections-rules.conf" mode: "0660" @@ -122,7 +122,7 @@ - name: Copying over existing policy file vars: service: "{{ glance_services['glance-api'] }}" - template: + ansible.builtin.template: src: "{{ glance_policy_file_path }}" dest: "{{ node_config_directory }}/glance-api/{{ glance_policy_file }}" mode: "0660" diff --git a/ansible/roles/glance/tasks/config_validate.yml b/ansible/roles/glance/tasks/config_validate.yml index 44571bd968..930a5bb069 100644 --- a/ansible/roles/glance/tasks/config_validate.yml +++ b/ansible/roles/glance/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate glance configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ glance_services }}" diff --git a/ansible/roles/glance/tasks/copy-certs.yml b/ansible/roles/glance/tasks/copy-certs.yml index f2bab6ab5f..3637f6f4ef 100644 --- a/ansible/roles/glance/tasks/copy-certs.yml +++ b/ansible/roles/glance/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ glance_services }}" diff --git a/ansible/roles/glance/tasks/deploy-containers.yml b/ansible/roles/glance/tasks/deploy-containers.yml index 865740ed61..4feb8c8b4a 100644 --- a/ansible/roles/glance/tasks/deploy-containers.yml +++ b/ansible/roles/glance/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check glance containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/glance/tasks/deploy.yml b/ansible/roles/glance/tasks/deploy.yml index 53df550b79..c1939a3a8e 100644 --- a/ansible/roles/glance/tasks/deploy.yml +++ b/ansible/roles/glance/tasks/deploy.yml @@ -1,20 +1,20 @@ --- - name: Register glance in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure glance - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check glance containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone glance repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: - glance_dev_mode | bool - name: Bootstrap glance service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/glance/tasks/external_ceph.yml b/ansible/roles/glance/tasks/external_ceph.yml index d33cb1e58f..18ed72c7a9 100644 --- a/ansible/roles/glance/tasks/external_ceph.yml +++ b/ansible/roles/glance/tasks/external_ceph.yml @@ -2,7 +2,7 @@ - name: Ensuring glance service ceph config subdir exists vars: service: "{{ glance_services['glance-api'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/glance-api/ceph" state: "directory" owner: "{{ config_owner_user }}" @@ -25,7 +25,7 @@ - name: Copy over ceph Glance keyrings vars: keyring: "{{ item.cluster }}.client.{{ item.user }}.keyring" - template: + ansible.builtin.template: src: "{{ node_custom_config }}/glance/{{ keyring }}" dest: "{{ node_config_directory }}/glance-api/ceph/{{ keyring }}" mode: "0660" @@ -34,7 +34,7 @@ when: inventory_hostname in groups['glance-api'] - name: Ensuring config directory has correct owner and permission - file: + ansible.builtin.file: path: "{{ node_config_directory }}/glance-api" recurse: true owner: "{{ config_owner_user }}" diff --git a/ansible/roles/glance/tasks/legacy_upgrade.yml b/ansible/roles/glance/tasks/legacy_upgrade.yml index d881e01283..994031cfef 100644 --- a/ansible/roles/glance/tasks/legacy_upgrade.yml +++ b/ansible/roles/glance/tasks/legacy_upgrade.yml @@ -1,12 +1,12 @@ --- - name: Import tasks from config.yml - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Import tasks from check-containers.yml - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Import tasks from bootstrap_service.yml - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/glance/tasks/loadbalancer.yml b/ansible/roles/glance/tasks/loadbalancer.yml index 4c8add36ac..ebfa43ec45 100644 --- a/ansible/roles/glance/tasks/loadbalancer.yml +++ b/ansible/roles/glance/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ glance_services }}" diff --git a/ansible/roles/glance/tasks/main.yml b/ansible/roles/glance/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/glance/tasks/main.yml +++ b/ansible/roles/glance/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/glance/tasks/precheck.yml b/ansible/roles/glance/tasks/precheck.yml index f52191a100..731021f314 100644 --- a/ansible/roles/glance/tasks/precheck.yml +++ b/ansible/roles/glance/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck glance configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ glance_services }}" @@ -18,7 +18,7 @@ - name: Checking free port for Glance API vars: service: "{{ glance_services['glance-api'] }}" - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ glance_api_listen_port }}" connect_timeout: 1 @@ -29,7 +29,7 @@ - container_facts.containers['glance_api'] is not defined - name: Check if S3 configurations are defined - assert: + ansible.builtin.assert: that: - vars[item] is defined msg: "Glance S3 backend is enabled, either the {{ item }} or {{ item | replace('glance_backend_', '') }} variable must be defined." diff --git a/ansible/roles/glance/tasks/pull.yml b/ansible/roles/glance/tasks/pull.yml index 12bd4aa26d..98261c76d4 100644 --- a/ansible/roles/glance/tasks/pull.yml +++ b/ansible/roles/glance/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull glance images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/glance/tasks/reconfigure.yml b/ansible/roles/glance/tasks/reconfigure.yml index 73ec196c18..ef275758bd 100644 --- a/ansible/roles/glance/tasks/reconfigure.yml +++ b/ansible/roles/glance/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy glance - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/glance/tasks/register.yml b/ansible/roles/glance/tasks/register.yml index 7962750adf..bd6398c093 100644 --- a/ansible/roles/glance/tasks/register.yml +++ b/ansible/roles/glance/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register glance service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_glance_auth }}" diff --git a/ansible/roles/glance/tasks/rolling_upgrade.yml b/ansible/roles/glance/tasks/rolling_upgrade.yml index d148e0eeb3..4e443382b4 100644 --- a/ansible/roles/glance/tasks/rolling_upgrade.yml +++ b/ansible/roles/glance/tasks/rolling_upgrade.yml @@ -1,15 +1,15 @@ --- - name: Start Glance upgrade - set_fact: + ansible.builtin.set_fact: glance_upgrading: true # Upgrade first node (NEW NODE in the Glance documentation) - name: Include tasks from config.yml - include_tasks: config.yml + ansible.builtin.include_tasks: config.yml when: inventory_hostname == glance_api_hosts[0] - name: Include tasks from stop_service.yml - include_tasks: stop_service.yml + ansible.builtin.include_tasks: stop_service.yml when: inventory_hostname == glance_api_hosts[0] - name: Enable log_bin_trust_function_creators function @@ -76,14 +76,14 @@ # Upgrade remaining node - name: Include tasks from config.yml - include_tasks: config.yml + ansible.builtin.include_tasks: config.yml when: inventory_hostname != glance_api_hosts[0] - name: Import tasks from check-containers.yml - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Running Glance database contract container vars: @@ -125,5 +125,5 @@ - not use_preconfigured_databases | bool - name: Finish Glance upgrade - set_fact: + ansible.builtin.set_fact: glance_upgrading: false diff --git a/ansible/roles/glance/tasks/stop.yml b/ansible/roles/glance/tasks/stop.yml index adfea2e6df..cf1591ecec 100644 --- a/ansible/roles/glance/tasks/stop.yml +++ b/ansible/roles/glance/tasks/stop.yml @@ -9,7 +9,7 @@ ignore_missing: true - name: Stop glance containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ glance_services }}" diff --git a/ansible/roles/glance/tasks/upgrade.yml b/ansible/roles/glance/tasks/upgrade.yml index 9cb7bde7ea..07d1fc1e77 100644 --- a/ansible/roles/glance/tasks/upgrade.yml +++ b/ansible/roles/glance/tasks/upgrade.yml @@ -9,9 +9,9 @@ ignore_missing: true - name: Include tasks from rolling_upgrade.yml - include_tasks: rolling_upgrade.yml + ansible.builtin.include_tasks: rolling_upgrade.yml when: glance_enable_rolling_upgrade | bool - name: Include tasks from legacy_upgrade.yml - include_tasks: legacy_upgrade.yml + ansible.builtin.include_tasks: legacy_upgrade.yml when: not glance_enable_rolling_upgrade | bool diff --git a/ansible/roles/gnocchi/tasks/bootstrap.yml b/ansible/roles/gnocchi/tasks/bootstrap.yml index 14f8b06513..a27911ff39 100644 --- a/ansible/roles/gnocchi/tasks/bootstrap.yml +++ b/ansible/roles/gnocchi/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run gnocchi bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/gnocchi/tasks/check-containers.yml b/ansible/roles/gnocchi/tasks/check-containers.yml index 14c918ba82..e157a71b85 100644 --- a/ansible/roles/gnocchi/tasks/check-containers.yml +++ b/ansible/roles/gnocchi/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check gnocchi containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/gnocchi/tasks/check.yml b/ansible/roles/gnocchi/tasks/check.yml index 0c11217b07..21c7d6ad4e 100644 --- a/ansible/roles/gnocchi/tasks/check.yml +++ b/ansible/roles/gnocchi/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Gnocchi containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/gnocchi/tasks/config.yml b/ansible/roles/gnocchi/tasks/config.yml index 71f141ff4b..b895d0a0f8 100644 --- a/ansible/roles/gnocchi/tasks/config.yml +++ b/ansible/roles/gnocchi/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,12 +10,12 @@ with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}" - name: Include tasks from external_ceph.yml - include_tasks: external_ceph.yml + ansible.builtin.include_tasks: external_ceph.yml when: - gnocchi_backend_storage == 'ceph' - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -27,19 +27,19 @@ skip: true - name: Set gnocchi policy file - set_fact: + ansible.builtin.set_fact: gnocchi_policy_file: "{{ gnocchi_policy.results.0.stat.path | basename }}" gnocchi_policy_file_path: "{{ gnocchi_policy.results.0.stat.path }}" when: - gnocchi_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - gnocchi_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -64,7 +64,7 @@ - name: Copying over wsgi-gnocchi.conf vars: service: "{{ gnocchi_services['gnocchi-api'] }}" - template: + ansible.builtin.template: src: "wsgi-gnocchi.conf.j2" dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf" mode: "0660" @@ -76,7 +76,7 @@ - "gnocchi-api" - name: "Configure uWSGI for Gnocchi" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ gnocchi_services }}" @@ -91,7 +91,7 @@ - service | service_enabled_and_mapped_to_host - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ gnocchi_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ gnocchi_policy_file }}" mode: "0660" diff --git a/ansible/roles/gnocchi/tasks/config_validate.yml b/ansible/roles/gnocchi/tasks/config_validate.yml index 14119fdf4b..6e70cca6fb 100644 --- a/ansible/roles/gnocchi/tasks/config_validate.yml +++ b/ansible/roles/gnocchi/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate gnocchi configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ gnocchi_services }}" diff --git a/ansible/roles/gnocchi/tasks/copy-certs.yml b/ansible/roles/gnocchi/tasks/copy-certs.yml index d43554f389..428dba9224 100644 --- a/ansible/roles/gnocchi/tasks/copy-certs.yml +++ b/ansible/roles/gnocchi/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ gnocchi_services }}" diff --git a/ansible/roles/gnocchi/tasks/deploy-containers.yml b/ansible/roles/gnocchi/tasks/deploy-containers.yml index c475c2c3d5..53be549be2 100644 --- a/ansible/roles/gnocchi/tasks/deploy-containers.yml +++ b/ansible/roles/gnocchi/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check gnocchi containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/gnocchi/tasks/deploy.yml b/ansible/roles/gnocchi/tasks/deploy.yml index 8ef17472a3..1b206b8fee 100644 --- a/ansible/roles/gnocchi/tasks/deploy.yml +++ b/ansible/roles/gnocchi/tasks/deploy.yml @@ -1,15 +1,15 @@ --- - name: Register gnocchi in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure gnocchi - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check gnocchi containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap gnocchi service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/gnocchi/tasks/external_ceph.yml b/ansible/roles/gnocchi/tasks/external_ceph.yml index 79357605b7..05a6204d6f 100644 --- a/ansible/roles/gnocchi/tasks/external_ceph.yml +++ b/ansible/roles/gnocchi/tasks/external_ceph.yml @@ -1,6 +1,6 @@ --- - name: Ensuring gnocchi service ceph config subdir exists - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}/ceph" state: "directory" owner: "{{ config_owner_user }}" @@ -20,7 +20,7 @@ with_dict: "{{ gnocchi_services | select_services_enabled_and_mapped_to_host }}" - name: Copy over ceph Gnocchi keyrings - template: + ansible.builtin.template: src: "{{ node_custom_config }}/gnocchi/{{ ceph_cluster }}.client.{{ ceph_gnocchi_user }}.keyring" dest: "{{ node_config_directory }}/{{ item.key }}/ceph/{{ ceph_cluster }}.client.{{ ceph_gnocchi_user }}.keyring" mode: "0660" @@ -29,7 +29,7 @@ - name: Ensuring config directory has correct owner and permission become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" recurse: true owner: "{{ config_owner_user }}" diff --git a/ansible/roles/gnocchi/tasks/loadbalancer.yml b/ansible/roles/gnocchi/tasks/loadbalancer.yml index be4016020d..35ebc8ebb2 100644 --- a/ansible/roles/gnocchi/tasks/loadbalancer.yml +++ b/ansible/roles/gnocchi/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ gnocchi_services }}" diff --git a/ansible/roles/gnocchi/tasks/main.yml b/ansible/roles/gnocchi/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/gnocchi/tasks/main.yml +++ b/ansible/roles/gnocchi/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/gnocchi/tasks/precheck.yml b/ansible/roles/gnocchi/tasks/precheck.yml index 8168cc090e..f3a8815601 100644 --- a/ansible/roles/gnocchi/tasks/precheck.yml +++ b/ansible/roles/gnocchi/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck gnocchi configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ gnocchi_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Gnocchi API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ gnocchi_api_listen_port }}" connect_timeout: 1 diff --git a/ansible/roles/gnocchi/tasks/pull.yml b/ansible/roles/gnocchi/tasks/pull.yml index 57ba3c5d09..59ae3183f1 100644 --- a/ansible/roles/gnocchi/tasks/pull.yml +++ b/ansible/roles/gnocchi/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull gnocchi images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/gnocchi/tasks/reconfigure.yml b/ansible/roles/gnocchi/tasks/reconfigure.yml index de47954e9a..6e05dd4ca7 100644 --- a/ansible/roles/gnocchi/tasks/reconfigure.yml +++ b/ansible/roles/gnocchi/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy gnocchi - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/gnocchi/tasks/register.yml b/ansible/roles/gnocchi/tasks/register.yml index 2de3c0c629..ee69339fa1 100644 --- a/ansible/roles/gnocchi/tasks/register.yml +++ b/ansible/roles/gnocchi/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register gnocchi service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_gnocchi_auth }}" diff --git a/ansible/roles/gnocchi/tasks/stop.yml b/ansible/roles/gnocchi/tasks/stop.yml index c0bf0a8a79..a9fc7551ad 100644 --- a/ansible/roles/gnocchi/tasks/stop.yml +++ b/ansible/roles/gnocchi/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop gnocchi containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ gnocchi_services }}" diff --git a/ansible/roles/gnocchi/tasks/upgrade.yml b/ansible/roles/gnocchi/tasks/upgrade.yml index 7d9d61dfd8..c6ecd77aff 100644 --- a/ansible/roles/gnocchi/tasks/upgrade.yml +++ b/ansible/roles/gnocchi/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure gnocchi - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check gnocchi containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run gnocchi bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/grafana/defaults/main.yml b/ansible/roles/grafana/defaults/main.yml index 05c0608838..b98d6e7272 100644 --- a/ansible/roles/grafana/defaults/main.yml +++ b/ansible/roles/grafana/defaults/main.yml @@ -66,6 +66,21 @@ grafana_data_sources: version: "2.11.1" timeField: "@timestamp" logLevelField: "log_level" + alertmanager: + enabled: "{{ enable_prometheus_alertmanager | bool }}" + data: + name: "Alertmanager" + type: "alertmanager" + access: "proxy" + url: "{{ prometheus_alertmanager_internal_endpoint }}" + jsonData: + implementation: "prometheus" + alertmanager: true + timeInterval: "30s" + basicAuth: true + basicAuthUser: "{{ prometheus_alertmanager_user }}" + secureJsonData: + basicAuthPassword: "{{ prometheus_alertmanager_password }}" ########## # Grafana diff --git a/ansible/roles/grafana/tasks/check-containers.yml b/ansible/roles/grafana/tasks/check-containers.yml index 482a4ccb13..710b804320 100644 --- a/ansible/roles/grafana/tasks/check-containers.yml +++ b/ansible/roles/grafana/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check grafana containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/grafana/tasks/check.yml b/ansible/roles/grafana/tasks/check.yml index 536695ad2c..4834da011a 100644 --- a/ansible/roles/grafana/tasks/check.yml +++ b/ansible/roles/grafana/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Grafana containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/grafana/tasks/config.yml b/ansible/roles/grafana/tasks/config.yml index 9a5ee7dbe2..d294514324 100644 --- a/ansible/roles/grafana/tasks/config.yml +++ b/ansible/roles/grafana/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}" - name: Check if extra configuration file exists - find: + ansible.builtin.find: path: "{{ node_custom_config }}/grafana/" excludes: - "prometheus.yaml" @@ -21,12 +21,12 @@ register: check_extra_conf_grafana - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - grafana_copy_certs | bool - name: Copying over config.json files - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -46,9 +46,18 @@ become: true with_dict: "{{ grafana_services | select_services_enabled_and_mapped_to_host }}" +- name: Copying over ldap.toml + ansible.builtin.template: + src: "{{ node_custom_config }}/grafana/ldap.toml" + dest: "{{ node_config_directory }}/grafana/ldap.toml" + mode: "0660" + become: true + when: + - grafana_ldap_enabled | bool + - name: Copying over extra configuration file become: true - template: + ansible.builtin.template: src: "{{ item.path }}" dest: "{{ node_config_directory }}/grafana/{{ item.path | basename }}" mode: "0660" @@ -60,7 +69,7 @@ - name: Configuring Prometheus as data source for Grafana vars: service: "{{ grafana_services['grafana'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/grafana/prometheus.yaml" mode: "0660" @@ -76,7 +85,7 @@ - name: Configuring dashboards provisioning vars: service: "{{ grafana_services['grafana'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/grafana/provisioning.yaml" mode: "0660" @@ -88,7 +97,7 @@ - "{{ role_path }}/templates/provisioning.yaml.j2" - name: Check if the folder for custom grafana dashboards exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/grafana/dashboards" delegate_to: localhost register: grafana_custom_dashboards_folder @@ -98,7 +107,7 @@ become: true vars: service: "{{ grafana_services['grafana'] }}" - file: + ansible.builtin.file: state: absent path: "{{ node_config_directory }}/grafana/dashboards/" when: @@ -108,7 +117,7 @@ - name: Copying over custom dashboards vars: service: "{{ grafana_services['grafana'] }}" - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/grafana/dashboards" dest: "{{ node_config_directory }}/grafana/" mode: "0660" diff --git a/ansible/roles/grafana/tasks/copy-certs.yml b/ansible/roles/grafana/tasks/copy-certs.yml index 24abec227f..b5edcad3b8 100644 --- a/ansible/roles/grafana/tasks/copy-certs.yml +++ b/ansible/roles/grafana/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ grafana_services }}" diff --git a/ansible/roles/grafana/tasks/deploy-containers.yml b/ansible/roles/grafana/tasks/deploy-containers.yml index fc5bcdb75b..0e42a162d5 100644 --- a/ansible/roles/grafana/tasks/deploy-containers.yml +++ b/ansible/roles/grafana/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check grafana containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/grafana/tasks/deploy.yml b/ansible/roles/grafana/tasks/deploy.yml index eb5a459b14..dcb4b27458 100644 --- a/ansible/roles/grafana/tasks/deploy.yml +++ b/ansible/roles/grafana/tasks/deploy.yml @@ -1,15 +1,15 @@ --- - name: Configure grafana - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check grafana containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap grafana service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Import tasks from post_config.yml - import_tasks: post_config.yml + ansible.builtin.import_tasks: post_config.yml diff --git a/ansible/roles/grafana/tasks/loadbalancer.yml b/ansible/roles/grafana/tasks/loadbalancer.yml index fb9dffd221..351d2de60e 100644 --- a/ansible/roles/grafana/tasks/loadbalancer.yml +++ b/ansible/roles/grafana/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ grafana_services }}" diff --git a/ansible/roles/grafana/tasks/main.yml b/ansible/roles/grafana/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/grafana/tasks/main.yml +++ b/ansible/roles/grafana/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/grafana/tasks/precheck.yml b/ansible/roles/grafana/tasks/precheck.yml index 1ffd7aa0bc..14cef04c44 100644 --- a/ansible/roles/grafana/tasks/precheck.yml +++ b/ansible/roles/grafana/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck grafana configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ grafana_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Grafana server - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ grafana_server_port }}" connect_timeout: 1 diff --git a/ansible/roles/grafana/tasks/pull.yml b/ansible/roles/grafana/tasks/pull.yml index 7f7ec16869..c1bcf01ecd 100644 --- a/ansible/roles/grafana/tasks/pull.yml +++ b/ansible/roles/grafana/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull grafana images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/grafana/tasks/reconfigure.yml b/ansible/roles/grafana/tasks/reconfigure.yml index 1c5fd9032f..6221874335 100644 --- a/ansible/roles/grafana/tasks/reconfigure.yml +++ b/ansible/roles/grafana/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy grafana - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/grafana/tasks/stop.yml b/ansible/roles/grafana/tasks/stop.yml index 75902fb736..90aa198248 100644 --- a/ansible/roles/grafana/tasks/stop.yml +++ b/ansible/roles/grafana/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop grafana containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ grafana_services }}" diff --git a/ansible/roles/grafana/tasks/upgrade.yml b/ansible/roles/grafana/tasks/upgrade.yml index 872e7e3a45..81ada9615e 100644 --- a/ansible/roles/grafana/tasks/upgrade.yml +++ b/ansible/roles/grafana/tasks/upgrade.yml @@ -13,10 +13,10 @@ register: grafana_differs - name: Configure grafana - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check grafana containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml # NOTE(dszumski): We don't want old Grafana instances running after # a new instance has updated the DB schema. Since the first instance @@ -32,4 +32,4 @@ - grafana_differs['result'] - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/grafana/templates/grafana.ini.j2 b/ansible/roles/grafana/templates/grafana.ini.j2 index 1b46f18a4a..763915796c 100644 --- a/ansible/roles/grafana/templates/grafana.ini.j2 +++ b/ansible/roles/grafana/templates/grafana.ini.j2 @@ -34,3 +34,10 @@ admin_password = {{ grafana_admin_password }} [plugins] plugin_admin_enabled = false public_key_retrieval_disabled = true + +{% if grafana_ldap_enabled | bool %} +[auth.ldap] +enabled = true +config_file = /etc/grafana/ldap.toml +allow_sign_up = true +{% endif %} diff --git a/ansible/roles/grafana/templates/grafana.json.j2 b/ansible/roles/grafana/templates/grafana.json.j2 index b98c53c790..a9d6445bf0 100644 --- a/ansible/roles/grafana/templates/grafana.json.j2 +++ b/ansible/roles/grafana/templates/grafana.json.j2 @@ -42,7 +42,14 @@ "owner": "grafana", "perm": "0755", "optional": true - }{% if kolla_copy_ca_into_containers | bool %}, + }{% if grafana_ldap_enabled | bool %}, + { + "source": "{{ container_config_directory }}/ldap.toml", + "dest": "/etc/grafana/ldap.toml", + "owner": "grafana", + "perm": "0600" + }{% endif %} + {% if kolla_copy_ca_into_containers | bool %}, { "source": "{{ container_config_directory }}/ca-certificates", "dest": "/var/lib/kolla/share/ca-certificates", diff --git a/ansible/roles/hacluster/tasks/bootstrap.yml b/ansible/roles/hacluster/tasks/bootstrap.yml index 9d788e3ec3..4a8b0708d8 100644 --- a/ansible/roles/hacluster/tasks/bootstrap.yml +++ b/ansible/roles/hacluster/tasks/bootstrap.yml @@ -1,6 +1,6 @@ --- - name: Ensure config directories exist - file: + ansible.builtin.file: path: "{{ node_custom_config }}/{{ item }}" mode: "0755" state: directory @@ -13,21 +13,21 @@ - hacluster-pacemaker - name: Check if Corosync authkey file exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/hacluster-corosync/authkey" delegate_to: localhost run_once: true register: hacluster_corosync_authkey_file - name: Check if Pacemaker authkey file exists - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/hacluster-pacemaker/authkey" delegate_to: localhost run_once: true register: hacluster_pacemaker_authkey_file - name: Generating Corosync authkey file - command: "dd if=/dev/urandom of={{ node_custom_config }}/hacluster-corosync/authkey bs=4096 count=1" + ansible.builtin.command: "dd if=/dev/urandom of={{ node_custom_config }}/hacluster-corosync/authkey bs=4096 count=1" delegate_to: localhost changed_when: false check_mode: false @@ -35,7 +35,7 @@ when: not hacluster_corosync_authkey_file.stat.exists - name: Generating Pacemaker authkey file - command: "dd if=/dev/urandom of={{ node_custom_config }}/hacluster-pacemaker/authkey bs=4096 count=1" + ansible.builtin.command: "dd if=/dev/urandom of={{ node_custom_config }}/hacluster-pacemaker/authkey bs=4096 count=1" delegate_to: localhost changed_when: false check_mode: false diff --git a/ansible/roles/hacluster/tasks/bootstrap_service.yml b/ansible/roles/hacluster/tasks/bootstrap_service.yml index a21df36de5..b6b296dd85 100644 --- a/ansible/roles/hacluster/tasks/bootstrap_service.yml +++ b/ansible/roles/hacluster/tasks/bootstrap_service.yml @@ -3,7 +3,8 @@ vars: service: "{{ hacluster_services['hacluster-pacemaker'] }}" changed_when: true - command: "{{ kolla_container_engine }} exec {{ service.container_name }} crm_attribute --type crm_config --name stonith-enabled --update false" + ansible.builtin.command: + cmd: "{{ kolla_container_engine }} exec {{ service.container_name }} crm_attribute --type crm_config --name stonith-enabled --update false" run_once: true become: true delegate_to: "{{ groups[service.group][0] }}" @@ -13,7 +14,7 @@ pacemaker_service: "{{ hacluster_services['hacluster-pacemaker'] }}" service: "{{ hacluster_services['hacluster-pacemaker-remote'] }}" changed_when: true - shell: > + ansible.builtin.shell: > {{ kolla_container_engine }} exec {{ pacemaker_service.container_name }} cibadmin --modify --scope resources -X ' diff --git a/ansible/roles/hacluster/tasks/check-containers.yml b/ansible/roles/hacluster/tasks/check-containers.yml index fe9640c3b3..814926308a 100644 --- a/ansible/roles/hacluster/tasks/check-containers.yml +++ b/ansible/roles/hacluster/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check hacluster containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/hacluster/tasks/check.yml b/ansible/roles/hacluster/tasks/check.yml index 971a17abcf..bdcd0e7bf5 100644 --- a/ansible/roles/hacluster/tasks/check.yml +++ b/ansible/roles/hacluster/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Hacluster containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/hacluster/tasks/config.yml b/ansible/roles/hacluster/tasks/config.yml index 584167dfe6..9abd92f0ff 100644 --- a/ansible/roles/hacluster/tasks/config.yml +++ b/ansible/roles/hacluster/tasks/config.yml @@ -1,7 +1,7 @@ --- - name: Ensuring config directories exist become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -11,7 +11,7 @@ - name: Copying over config.json files for services become: true - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -21,7 +21,7 @@ - name: Copying over corosync.conf into hacluster-corosync vars: service: "{{ hacluster_services['hacluster-corosync'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/hacluster-corosync/corosync.conf" mode: "0660" @@ -35,7 +35,7 @@ - name: Copying over Corosync authkey file vars: service: "{{ hacluster_services['hacluster-corosync'] }}" - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ node_config_directory }}/hacluster-corosync/authkey" mode: "0600" @@ -48,7 +48,7 @@ - name: Copying over Pacemaker authkey file vars: service: "{{ hacluster_services['hacluster-pacemaker'] }}" - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ node_config_directory }}//hacluster-pacemaker/authkey" mode: "0600" @@ -61,7 +61,7 @@ - name: Copying over Pacemaker authkey file into hacluster-pacemaker-remote vars: service: "{{ hacluster_services['hacluster-pacemaker-remote'] }}" - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ node_config_directory }}/hacluster-pacemaker-remote/authkey" mode: "0600" diff --git a/ansible/roles/hacluster/tasks/deploy-containers.yml b/ansible/roles/hacluster/tasks/deploy-containers.yml index 4597b2b1d9..e48283500f 100644 --- a/ansible/roles/hacluster/tasks/deploy-containers.yml +++ b/ansible/roles/hacluster/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check hacluster containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/hacluster/tasks/deploy.yml b/ansible/roles/hacluster/tasks/deploy.yml index e9395069a3..007c965406 100644 --- a/ansible/roles/hacluster/tasks/deploy.yml +++ b/ansible/roles/hacluster/tasks/deploy.yml @@ -1,15 +1,15 @@ --- - name: Bootstrap hacluster service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Configure hacluster - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check hacluster containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Import tasks from bootstrap_service.yml - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/hacluster/tasks/main.yml b/ansible/roles/hacluster/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/hacluster/tasks/main.yml +++ b/ansible/roles/hacluster/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/hacluster/tasks/precheck.yml b/ansible/roles/hacluster/tasks/precheck.yml index b05443b4bb..f071f15403 100644 --- a/ansible/roles/hacluster/tasks/precheck.yml +++ b/ansible/roles/hacluster/tasks/precheck.yml @@ -16,7 +16,7 @@ # NOTE(yoctozepto): The below is a slight simplification because # pacemaker_remoted always listens on all addresses (wildcard listen). - name: Check free port for Pacemaker Remote - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ hacluster_pacemaker_remote_port }}" connect_timeout: 1 diff --git a/ansible/roles/hacluster/tasks/pull.yml b/ansible/roles/hacluster/tasks/pull.yml index 87074afcf8..d56e711472 100644 --- a/ansible/roles/hacluster/tasks/pull.yml +++ b/ansible/roles/hacluster/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull hacluster images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/hacluster/tasks/reconfigure.yml b/ansible/roles/hacluster/tasks/reconfigure.yml index 332b5d43f7..633c23d99b 100644 --- a/ansible/roles/hacluster/tasks/reconfigure.yml +++ b/ansible/roles/hacluster/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy hacluster - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/hacluster/tasks/stop.yml b/ansible/roles/hacluster/tasks/stop.yml index 6d6741e5af..28c8fea119 100644 --- a/ansible/roles/hacluster/tasks/stop.yml +++ b/ansible/roles/hacluster/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop hacluster services - import_role: + ansible.builtin.import_role: role: service-stop vars: project_services: "{{ hacluster_services }}" diff --git a/ansible/roles/hacluster/tasks/upgrade.yml b/ansible/roles/hacluster/tasks/upgrade.yml index bdcead398a..8d5ca3fefc 100644 --- a/ansible/roles/hacluster/tasks/upgrade.yml +++ b/ansible/roles/hacluster/tasks/upgrade.yml @@ -1,3 +1,3 @@ --- - name: Import tasks from deploy.yml - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/haproxy-config/tasks/main.yml b/ansible/roles/haproxy-config/tasks/main.yml index b0f88b9c41..70348a7d17 100644 --- a/ansible/roles/haproxy-config/tasks/main.yml +++ b/ansible/roles/haproxy-config/tasks/main.yml @@ -9,7 +9,7 @@ - "{{ node_custom_config }}/haproxy-config/{{ haproxy_service_template }}" - "templates/{{ haproxy_service_template }}" template_file: "{{ query('first_found', haproxy_templates) | first }}" - template: + ansible.builtin.template: src: "{{ template_file }}" dest: "{{ node_config_directory }}/haproxy/services.d/{{ item.key }}.cfg" mode: "0660" @@ -23,7 +23,7 @@ - name: "Add configuration when using single external frontend for {{ project_name }}" vars: service: "{{ item.value }}" - blockinfile: + ansible.builtin.blockinfile: create: true path: "{{ node_config_directory }}/haproxy/external-frontend-map" insertafter: EOF diff --git a/ansible/roles/heat/tasks/bootstrap.yml b/ansible/roles/heat/tasks/bootstrap.yml index e4f24202b3..6bb824c975 100644 --- a/ansible/roles/heat/tasks/bootstrap.yml +++ b/ansible/roles/heat/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run heat bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/heat/tasks/check-containers.yml b/ansible/roles/heat/tasks/check-containers.yml index 3299586877..582df3a063 100644 --- a/ansible/roles/heat/tasks/check-containers.yml +++ b/ansible/roles/heat/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check heat containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/heat/tasks/check.yml b/ansible/roles/heat/tasks/check.yml index 3bf605b705..32dc5bfcef 100644 --- a/ansible/roles/heat/tasks/check.yml +++ b/ansible/roles/heat/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Heat containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/heat/tasks/clone.yml b/ansible/roles/heat/tasks/clone.yml index 5fc5f8c02e..6e38fc03ba 100644 --- a/ansible/roles/heat/tasks/clone.yml +++ b/ansible/roles/heat/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning source repositories for development become: true - git: + ansible.builtin.git: repo: "{{ heat_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ heat_dev_repos_pull }}" diff --git a/ansible/roles/heat/tasks/config.yml b/ansible/roles/heat/tasks/config.yml index 3b0261885e..3e2c488cb5 100644 --- a/ansible/roles/heat/tasks/config.yml +++ b/ansible/roles/heat/tasks/config.yml @@ -1,7 +1,7 @@ --- - name: Ensuring config directories exist become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ heat_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,20 +22,20 @@ skip: true - name: Set heat policy file - set_fact: + ansible.builtin.set_fact: heat_policy_file: "{{ heat_policy.results.0.stat.path | basename }}" heat_policy_file_path: "{{ heat_policy.results.0.stat.path }}" when: - heat_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - heat_copy_certs | bool - name: Copying over config.json files for services become: true - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -58,7 +58,7 @@ - name: Copying over existing policy file become: true - template: + ansible.builtin.template: src: "{{ heat_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ heat_policy_file }}" mode: "0660" @@ -69,7 +69,7 @@ - name: Copying over heat-api wsgi config vars: service: "{{ heat_services['heat-api'] }}" - template: + ansible.builtin.template: src: "{{ role_path }}/templates/wsgi-heat-api.conf.j2" dest: "{{ node_config_directory }}/heat-api/wsgi-heat-api.conf" mode: "0660" @@ -79,7 +79,7 @@ - heat_wsgi_provider == "apache" - name: Configure uWSGI for heat-api - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ heat_services }}" @@ -100,7 +100,7 @@ - name: Copying over heat-api-cfn wsgi config vars: service: "{{ heat_services['heat-api-cfn'] }}" - template: + ansible.builtin.template: src: "{{ role_path }}/templates/wsgi-heat-api-cfn.conf.j2" dest: "{{ node_config_directory }}/heat-api-cfn/wsgi-heat-api-cfn.conf" mode: "0660" @@ -110,7 +110,7 @@ - heat_wsgi_provider == "apache" - name: Configure uWSGI for heat-api-cfn - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ heat_services }}" diff --git a/ansible/roles/heat/tasks/config_validate.yml b/ansible/roles/heat/tasks/config_validate.yml index 26e7faa026..47b4b16508 100644 --- a/ansible/roles/heat/tasks/config_validate.yml +++ b/ansible/roles/heat/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate heat configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ heat_services }}" diff --git a/ansible/roles/heat/tasks/copy-certs.yml b/ansible/roles/heat/tasks/copy-certs.yml index c13b4a8c31..fee6f5b8b6 100644 --- a/ansible/roles/heat/tasks/copy-certs.yml +++ b/ansible/roles/heat/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ heat_services }}" diff --git a/ansible/roles/heat/tasks/deploy-containers.yml b/ansible/roles/heat/tasks/deploy-containers.yml index 1626f5b479..a302b55f4e 100644 --- a/ansible/roles/heat/tasks/deploy-containers.yml +++ b/ansible/roles/heat/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check heat containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/heat/tasks/deploy.yml b/ansible/roles/heat/tasks/deploy.yml index cc480e6803..c52699b0d7 100644 --- a/ansible/roles/heat/tasks/deploy.yml +++ b/ansible/roles/heat/tasks/deploy.yml @@ -1,20 +1,20 @@ --- - name: Register heat in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure heat - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check heat containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone heat repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: - heat_dev_mode | bool - name: Bootstrap heat service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/heat/tasks/loadbalancer.yml b/ansible/roles/heat/tasks/loadbalancer.yml index 2c45e31deb..21ef7de73d 100644 --- a/ansible/roles/heat/tasks/loadbalancer.yml +++ b/ansible/roles/heat/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ heat_services }}" diff --git a/ansible/roles/heat/tasks/main.yml b/ansible/roles/heat/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/heat/tasks/main.yml +++ b/ansible/roles/heat/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/heat/tasks/precheck.yml b/ansible/roles/heat/tasks/precheck.yml index f8835df7f5..184550af7c 100644 --- a/ansible/roles/heat/tasks/precheck.yml +++ b/ansible/roles/heat/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck heat configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ heat_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Heat API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ heat_api_listen_port }}" connect_timeout: 1 @@ -28,7 +28,7 @@ - inventory_hostname in groups['heat-api'] - name: Checking free port for Heat API CFN - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ heat_api_cfn_listen_port }}" connect_timeout: 1 diff --git a/ansible/roles/heat/tasks/pull.yml b/ansible/roles/heat/tasks/pull.yml index 748dd203be..4a025a2a61 100644 --- a/ansible/roles/heat/tasks/pull.yml +++ b/ansible/roles/heat/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull heat images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/heat/tasks/reconfigure.yml b/ansible/roles/heat/tasks/reconfigure.yml index ed3792c6c0..4eea873514 100644 --- a/ansible/roles/heat/tasks/reconfigure.yml +++ b/ansible/roles/heat/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy heat - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/heat/tasks/register.yml b/ansible/roles/heat/tasks/register.yml index f82cad14e9..b7e680dfcd 100644 --- a/ansible/roles/heat/tasks/register.yml +++ b/ansible/roles/heat/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register heat service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_heat_auth }}" diff --git a/ansible/roles/heat/tasks/stop.yml b/ansible/roles/heat/tasks/stop.yml index 1630ec554c..8165bc1969 100644 --- a/ansible/roles/heat/tasks/stop.yml +++ b/ansible/roles/heat/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop heat containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ heat_services }}" diff --git a/ansible/roles/heat/tasks/upgrade.yml b/ansible/roles/heat/tasks/upgrade.yml index d10c4968c4..4e4638589f 100644 --- a/ansible/roles/heat/tasks/upgrade.yml +++ b/ansible/roles/heat/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure heat - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check heat containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run heat bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/horizon/tasks/bootstrap.yml b/ansible/roles/horizon/tasks/bootstrap.yml index 84147bdf65..7fc1cbf905 100644 --- a/ansible/roles/horizon/tasks/bootstrap.yml +++ b/ansible/roles/horizon/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run horizon bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/horizon/tasks/check-containers.yml b/ansible/roles/horizon/tasks/check-containers.yml index 0b2f2dfb20..d0fca9f49d 100644 --- a/ansible/roles/horizon/tasks/check-containers.yml +++ b/ansible/roles/horizon/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check horizon containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/horizon/tasks/check.yml b/ansible/roles/horizon/tasks/check.yml index fc0f18450a..d607eb774c 100644 --- a/ansible/roles/horizon/tasks/check.yml +++ b/ansible/roles/horizon/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Horizon containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/horizon/tasks/clone.yml b/ansible/roles/horizon/tasks/clone.yml index 19ded83ee4..5cc6a66256 100644 --- a/ansible/roles/horizon/tasks/clone.yml +++ b/ansible/roles/horizon/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning Horizon source repositories for development become: true - git: + ansible.builtin.git: repo: "{{ horizon_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ horizon_dev_repos_pull }}" diff --git a/ansible/roles/horizon/tasks/config.yml b/ansible/roles/horizon/tasks/config.yml index 73a4605c69..8065779cf9 100644 --- a/ansible/roles/horizon/tasks/config.yml +++ b/ansible/roles/horizon/tasks/config.yml @@ -1,7 +1,7 @@ --- - name: Ensuring config directories exist become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,11 +10,11 @@ with_dict: "{{ horizon_services | select_services_enabled_and_mapped_to_host }}" - name: Set empty custom policy - set_fact: + ansible.builtin.set_fact: custom_policy: [] - name: Include tasks from policy_item.yml - include_tasks: policy_item.yml + ansible.builtin.include_tasks: policy_item.yml vars: project_name: "{{ item.name }}" when: item.enabled | bool @@ -42,7 +42,7 @@ become: true vars: service: "{{ horizon_services['horizon'] }}" - template: + ansible.builtin.template: src: "horizon.json.j2" dest: "{{ node_config_directory }}/horizon/config.json" mode: "0660" @@ -52,7 +52,7 @@ become: true vars: service: "{{ horizon_services['horizon'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/horizon/horizon.conf" mode: "0660" @@ -65,7 +65,7 @@ - horizon_wsgi_provider == "apache" - name: "Configure uWSGI for Horizon" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ horizon_services }}" @@ -86,7 +86,7 @@ become: true vars: service: "{{ horizon_services['horizon'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/horizon/_9998-kolla-settings.py" mode: "0660" @@ -100,7 +100,7 @@ become: true vars: service: "{{ horizon_services['horizon'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/horizon/_9999-custom-settings.py" mode: "0660" @@ -114,7 +114,7 @@ become: true vars: service: "{{ horizon_services['horizon'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/horizon/{{ item | basename }}" mode: "0660" @@ -125,7 +125,7 @@ become: true vars: service: "{{ horizon_services['horizon'] }}" - copy: + ansible.builtin.copy: src: "{{ node_custom_config }}/horizon/themes/{{ item.name }}" dest: "{{ node_config_directory }}/horizon/themes/" mode: "0660" @@ -135,6 +135,6 @@ with_items: "{{ horizon_custom_themes }}" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - horizon_copy_certs | bool diff --git a/ansible/roles/horizon/tasks/copy-certs.yml b/ansible/roles/horizon/tasks/copy-certs.yml index 89c9d88d11..9bf42df2e6 100644 --- a/ansible/roles/horizon/tasks/copy-certs.yml +++ b/ansible/roles/horizon/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ horizon_services }}" diff --git a/ansible/roles/horizon/tasks/deploy-containers.yml b/ansible/roles/horizon/tasks/deploy-containers.yml index 4068eb35fe..c5aaa1b111 100644 --- a/ansible/roles/horizon/tasks/deploy-containers.yml +++ b/ansible/roles/horizon/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check horizon containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/horizon/tasks/deploy.yml b/ansible/roles/horizon/tasks/deploy.yml index 6e9088203d..0a827f1a85 100644 --- a/ansible/roles/horizon/tasks/deploy.yml +++ b/ansible/roles/horizon/tasks/deploy.yml @@ -1,18 +1,18 @@ --- - name: Configure horizon - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check horizon containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone horizon repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: - horizon_dev_mode | bool - name: Include tasks from bootstrap.yml - include_tasks: bootstrap.yml + ansible.builtin.include_tasks: bootstrap.yml when: horizon_backend_database | bool - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/horizon/tasks/loadbalancer.yml b/ansible/roles/horizon/tasks/loadbalancer.yml index 908fe3dba9..385146b3c2 100644 --- a/ansible/roles/horizon/tasks/loadbalancer.yml +++ b/ansible/roles/horizon/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ horizon_services }}" diff --git a/ansible/roles/horizon/tasks/main.yml b/ansible/roles/horizon/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/horizon/tasks/main.yml +++ b/ansible/roles/horizon/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/horizon/tasks/policy_item.yml b/ansible/roles/horizon/tasks/policy_item.yml index ab3b222e38..8d8b34e873 100644 --- a/ansible/roles/horizon/tasks/policy_item.yml +++ b/ansible/roles/horizon/tasks/policy_item.yml @@ -1,10 +1,10 @@ --- - name: Update policy file name - set_fact: + ansible.builtin.set_fact: supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.+)', project_name + '_\\1') | list }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ fullpath }}" delegate_to: localhost run_once: true @@ -18,7 +18,7 @@ loop_var: fullpath - name: Update custom policy file name - set_fact: + ansible.builtin.set_fact: custom_policy: "{{ custom_policy + [overwritten_files.results.0.stat.path] }}" when: - overwritten_files.results | length > 0 diff --git a/ansible/roles/horizon/tasks/precheck.yml b/ansible/roles/horizon/tasks/precheck.yml index 7036ba654b..16d41e7d2b 100644 --- a/ansible/roles/horizon/tasks/precheck.yml +++ b/ansible/roles/horizon/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck horizon configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ horizon_services }}" @@ -18,7 +18,7 @@ - name: Checking free port for Horizon vars: horizon: "{{ horizon_services['horizon'] }}" - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ horizon_listen_port }}" connect_timeout: 1 diff --git a/ansible/roles/horizon/tasks/pull.yml b/ansible/roles/horizon/tasks/pull.yml index 78f8cea641..4f42c0f2a5 100644 --- a/ansible/roles/horizon/tasks/pull.yml +++ b/ansible/roles/horizon/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull horizon images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/horizon/tasks/reconfigure.yml b/ansible/roles/horizon/tasks/reconfigure.yml index caf4c42f65..e7f5d1f528 100644 --- a/ansible/roles/horizon/tasks/reconfigure.yml +++ b/ansible/roles/horizon/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy horizon - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/horizon/tasks/stop.yml b/ansible/roles/horizon/tasks/stop.yml index d0b26b1035..daae0703ea 100644 --- a/ansible/roles/horizon/tasks/stop.yml +++ b/ansible/roles/horizon/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop horizon containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ horizon_services }}" diff --git a/ansible/roles/horizon/tasks/upgrade.yml b/ansible/roles/horizon/tasks/upgrade.yml index 91caff1b69..b74651d3e1 100644 --- a/ansible/roles/horizon/tasks/upgrade.yml +++ b/ansible/roles/horizon/tasks/upgrade.yml @@ -1,18 +1,18 @@ --- - name: Configure horizon - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check horizon containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Include tasks from clone.yml - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: - horizon_dev_mode | bool - name: Include tasks from bootstrap_service.yml - include_tasks: bootstrap_service.yml + ansible.builtin.include_tasks: bootstrap_service.yml when: horizon_backend_database | bool - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/ironic/defaults/main.yml b/ansible/roles/ironic/defaults/main.yml index e9e2163fe4..c7f746cb24 100644 --- a/ansible/roles/ironic/defaults/main.yml +++ b/ansible/roles/ironic/defaults/main.yml @@ -362,3 +362,23 @@ ironic_copy_certs: "{{ kolla_copy_ca_into_containers | bool or ironic_enable_tls # WSGI ############ ironic_wsgi_provider: "uwsgi" + +############ +# NTP +############ +# If set, pass this NTP server via the kernel command line to IPA +ironic_ntp_server: "" + +#################### +# Kernel Parameters +#################### +ironic_kernel_append_params_default: + - "nofb" + - "nomodeset" + - "vga=normal" + - "console=tty0" + - "console=ttyS0,{{ ironic_console_serial_speed }}" + - "{% if ironic_ntp_server is not none and ironic_ntp_server | length > 0 %}ipa-ntp-server={{ ironic_ntp_server }}{% endif %}" + +ironic_kernel_append_params_extras: [] +ironic_kernel_append_params: "{{ (ironic_kernel_append_params_default + ironic_kernel_append_params_extras) | select() | join(' ') }}" diff --git a/ansible/roles/ironic/tasks/bootstrap.yml b/ansible/roles/ironic/tasks/bootstrap.yml index b87cd4c1e1..4a0a99d3c5 100644 --- a/ansible/roles/ironic/tasks/bootstrap.yml +++ b/ansible/roles/ironic/tasks/bootstrap.yml @@ -50,4 +50,4 @@ - inventory_hostname in groups[item.group] - name: Run ironic bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/ironic/tasks/check-containers.yml b/ansible/roles/ironic/tasks/check-containers.yml index e76f8be159..855325a5ed 100644 --- a/ansible/roles/ironic/tasks/check-containers.yml +++ b/ansible/roles/ironic/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check ironic containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/ironic/tasks/check.yml b/ansible/roles/ironic/tasks/check.yml index 876452eeb2..066f1cd7ee 100644 --- a/ansible/roles/ironic/tasks/check.yml +++ b/ansible/roles/ironic/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Ironic containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/ironic/tasks/clone.yml b/ansible/roles/ironic/tasks/clone.yml index 3b9cd387fb..7fbdc4c1c8 100644 --- a/ansible/roles/ironic/tasks/clone.yml +++ b/ansible/roles/ironic/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning ironic source repository for development become: true - git: + ansible.builtin.git: repo: "{{ ironic_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ ironic_dev_repos_pull }}" diff --git a/ansible/roles/ironic/tasks/config-host.yml b/ansible/roles/ironic/tasks/config-host.yml index 6181f7ccd7..d72f9651b6 100644 --- a/ansible/roles/ironic/tasks/config-host.yml +++ b/ansible/roles/ironic/tasks/config-host.yml @@ -1,6 +1,6 @@ --- - name: Load and persist iscsi_tcp module - import_role: + ansible.builtin.import_role: name: module-load vars: modules: diff --git a/ansible/roles/ironic/tasks/config.yml b/ansible/roles/ironic/tasks/config.yml index 5504103d59..85018a33f8 100644 --- a/ansible/roles/ironic/tasks/config.yml +++ b/ansible/roles/ironic/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ ironic_services | select_services_enabled_and_mapped_to_host }}" - name: Check if Ironic policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,19 +22,19 @@ skip: true - name: Set ironic policy file - set_fact: + ansible.builtin.set_fact: ironic_policy_file: "{{ ironic_policy.results.0.stat.path | basename }}" ironic_policy_file_path: "{{ ironic_policy.results.0.stat.path }}" when: - ironic_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - ironic_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -61,7 +61,7 @@ - name: Copying over dnsmasq.conf vars: service: "{{ ironic_services['ironic-dnsmasq'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/ironic-dnsmasq/dnsmasq.conf" mode: "0660" @@ -75,7 +75,7 @@ - name: Copying pxelinux.cfg default vars: service: "{{ ironic_services['ironic-tftp'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/ironic-tftp/default" mode: "0660" @@ -93,7 +93,7 @@ - name: Copying ironic-agent kernel and initramfs (PXE) vars: service: "{{ ironic_services['ironic-tftp'] }}" - copy: + ansible.builtin.copy: src: "{{ ironic_agent_files_directory }}/ironic/{{ item }}" dest: "{{ node_config_directory }}/ironic-tftp/{{ item }}" mode: "0660" @@ -110,7 +110,7 @@ - name: Copying ironic-agent kernel and initramfs (iPXE) vars: service: "{{ ironic_services['ironic-http'] }}" - copy: + ansible.builtin.copy: src: "{{ ironic_agent_files_directory }}/ironic/{{ item }}" dest: "{{ node_config_directory }}/ironic-http/{{ item }}" mode: "0660" @@ -126,7 +126,7 @@ - name: Copying ipa.ipxe vars: service: "{{ ironic_services['ironic-http'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/ironic-http/ipa.ipxe" mode: "0660" @@ -143,7 +143,7 @@ - name: Copying ironic-http-httpd.conf vars: service: "{{ ironic_services['ironic-http'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/ironic-http/httpd.conf" mode: "0660" @@ -156,7 +156,7 @@ - name: Copying over ironic-prometheus-exporter-wsgi.conf vars: service: "{{ ironic_services['ironic-prometheus-exporter'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/ironic-prometheus-exporter/ironic-prometheus-exporter-wsgi.conf" mode: "0660" @@ -172,7 +172,7 @@ services_require_policy_json: - ironic-api - ironic-conductor - template: + ansible.builtin.template: src: "{{ ironic_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ ironic_policy_file }}" mode: "0660" @@ -185,7 +185,7 @@ - name: Copying over ironic-api-wsgi.conf vars: service: "{{ ironic_services['ironic-api'] }}" - template: + ansible.builtin.template: src: "ironic-api-wsgi.conf.j2" dest: "{{ node_config_directory }}/ironic-api/ironic-api-wsgi.conf" mode: "0660" @@ -195,7 +195,7 @@ - ironic_wsgi_provider == "apache" - name: "Configure uWSGI for ironic-api" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ ironic_services }}" diff --git a/ansible/roles/ironic/tasks/config_validate.yml b/ansible/roles/ironic/tasks/config_validate.yml index b01a53d250..6023580bcb 100644 --- a/ansible/roles/ironic/tasks/config_validate.yml +++ b/ansible/roles/ironic/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate ironic configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ ironic_services }}" diff --git a/ansible/roles/ironic/tasks/copy-certs.yml b/ansible/roles/ironic/tasks/copy-certs.yml index c7c611e065..0446b6f27d 100644 --- a/ansible/roles/ironic/tasks/copy-certs.yml +++ b/ansible/roles/ironic/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ ironic_services }}" diff --git a/ansible/roles/ironic/tasks/deploy-containers.yml b/ansible/roles/ironic/tasks/deploy-containers.yml index eb627bcdc1..7f84e0df50 100644 --- a/ansible/roles/ironic/tasks/deploy-containers.yml +++ b/ansible/roles/ironic/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check ironic containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/ironic/tasks/deploy.yml b/ansible/roles/ironic/tasks/deploy.yml index e9266c4220..9df48585a8 100644 --- a/ansible/roles/ironic/tasks/deploy.yml +++ b/ansible/roles/ironic/tasks/deploy.yml @@ -1,23 +1,23 @@ --- - name: Register ironic in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml when: ironic_enable_keystone_integration | bool - name: Import tasks from config-host.yml - import_tasks: config-host.yml + ansible.builtin.import_tasks: config-host.yml - name: Configure ironic - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check ironic containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone ironic repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: ironic_dev_mode | bool - name: Bootstrap ironic service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/ironic/tasks/loadbalancer.yml b/ansible/roles/ironic/tasks/loadbalancer.yml index 6454ec172d..d9ff6f1e4b 100644 --- a/ansible/roles/ironic/tasks/loadbalancer.yml +++ b/ansible/roles/ironic/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ ironic_services }}" diff --git a/ansible/roles/ironic/tasks/main.yml b/ansible/roles/ironic/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/ironic/tasks/main.yml +++ b/ansible/roles/ironic/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/ironic/tasks/precheck.yml b/ansible/roles/ironic/tasks/precheck.yml index b8ecb249bf..f3c2c5b4d4 100644 --- a/ansible/roles/ironic/tasks/precheck.yml +++ b/ansible/roles/ironic/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck ironic configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ ironic_services }}" @@ -19,7 +19,7 @@ register: container_facts - name: Checking free port for Ironic API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ ironic_api_listen_port }}" connect_timeout: 1 @@ -30,7 +30,7 @@ - inventory_hostname in groups['ironic-api'] - name: Checking free port for Ironic HTTP server - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ ironic_http_port }}" connect_timeout: 1 @@ -41,7 +41,7 @@ - inventory_hostname in groups['ironic-http'] - name: Checking free port for Ironic Prometheus Exporter - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ ironic_prometheus_exporter_port }}" connect_timeout: 1 @@ -53,7 +53,7 @@ - inventory_hostname in groups['ironic-conductor'] - name: Checking ironic-agent files exist for Ironic - stat: + ansible.builtin.stat: path: "{{ ironic_agent_files_directory }}/ironic/{{ item }}" delegate_to: localhost run_once: true @@ -69,7 +69,7 @@ - "ironic-agent.initramfs" - name: Ensure ironic_dnsmasq_dhcp_ranges is configured - fail: + ansible.builtin.fail: msg: > ironic_dnsmasq_dhcp_ranges must be a list connection: local diff --git a/ansible/roles/ironic/tasks/pull.yml b/ansible/roles/ironic/tasks/pull.yml index d72c228489..7cdb02b7ea 100644 --- a/ansible/roles/ironic/tasks/pull.yml +++ b/ansible/roles/ironic/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull ironic images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/ironic/tasks/reconfigure.yml b/ansible/roles/ironic/tasks/reconfigure.yml index 7ab0cee404..321242aad1 100644 --- a/ansible/roles/ironic/tasks/reconfigure.yml +++ b/ansible/roles/ironic/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy ironic - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/ironic/tasks/register.yml b/ansible/roles/ironic/tasks/register.yml index a5e6130a8a..c9defabbef 100644 --- a/ansible/roles/ironic/tasks/register.yml +++ b/ansible/roles/ironic/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register ironic service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_ironic_auth }}" diff --git a/ansible/roles/ironic/tasks/stop.yml b/ansible/roles/ironic/tasks/stop.yml index 78dae8616e..a8f0bd2ff5 100644 --- a/ansible/roles/ironic/tasks/stop.yml +++ b/ansible/roles/ironic/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop ironic containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ ironic_services }}" diff --git a/ansible/roles/ironic/tasks/upgrade.yml b/ansible/roles/ironic/tasks/upgrade.yml index 650fa046e9..83b7fa0d72 100644 --- a/ansible/roles/ironic/tasks/upgrade.yml +++ b/ansible/roles/ironic/tasks/upgrade.yml @@ -35,7 +35,7 @@ - name: Create ironic_dhcp_hosts volume become: true changed_when: true - command: "{{ kolla_container_engine }} volume create ironic_dhcp_hosts" + ansible.builtin.command: "{{ kolla_container_engine }} volume create ironic_dhcp_hosts" when: container_volume_facts.volumes['ironic_dhcp_hosts'] is not defined - name: Migrate data from ironic_inspector_dhcp_hosts volume @@ -45,7 +45,7 @@ volumes_dir: >- {{ '/var/lib/docker/volumes' if kolla_container_engine == 'docker' else '/var/lib/containers/storage/volumes' }} - command: >- + ansible.builtin.command: >- mv {{ volumes_dir }}/ironic_inspector_dhcp_hosts/_data/ {{ volumes_dir }}/ironic_dhcp_hosts/_data when: container_volume_facts.volumes['ironic_inspector_dhcp_hosts'] is defined @@ -82,16 +82,16 @@ - not ironic_upgrade_skip_wait_check | bool - name: Import tasks from config.yml - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Import tasks from check-containers.yml - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Import tasks from bootstrap_service.yml - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Running Ironic online data migration vars: @@ -118,7 +118,7 @@ - name: Remove ironic_inspector_dhcp_hosts volume become: true changed_when: true - command: "{{ kolla_container_engine }} volume rm ironic_inspector_dhcp_hosts" + ansible.builtin.command: "{{ kolla_container_engine }} volume rm ironic_inspector_dhcp_hosts" when: - enable_ironic_dnsmasq | bool - container_volume_facts.volumes['ironic_inspector_dhcp_hosts'] is defined diff --git a/ansible/roles/ironic/templates/ironic.conf.j2 b/ansible/roles/ironic/templates/ironic.conf.j2 index 7ed1a9e9de..9cc4fd78e8 100644 --- a/ansible/roles/ironic/templates/ironic.conf.j2 +++ b/ansible/roles/ironic/templates/ironic.conf.j2 @@ -178,7 +178,7 @@ deploy_logs_storage_backend = local deploy_logs_collect = always [pxe] -kernel_append_params = nofb nomodeset vga=normal console=tty0 console=ttyS0,{{ ironic_console_serial_speed }} +kernel_append_params = {{ ironic_kernel_append_params }} tftp_root = /var/lib/ironic/tftpboot tftp_master_path = /var/lib/ironic/master_images tftp_server = {{ api_interface_address }} diff --git a/ansible/roles/iscsi/tasks/check-containers.yml b/ansible/roles/iscsi/tasks/check-containers.yml index a34efd551e..b2756ca779 100644 --- a/ansible/roles/iscsi/tasks/check-containers.yml +++ b/ansible/roles/iscsi/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check iscsi containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/iscsi/tasks/check.yml b/ansible/roles/iscsi/tasks/check.yml index 8b29740ebf..da255bd96b 100644 --- a/ansible/roles/iscsi/tasks/check.yml +++ b/ansible/roles/iscsi/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking iSCSI containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/iscsi/tasks/config-host.yml b/ansible/roles/iscsi/tasks/config-host.yml index 302c39f46f..2cf066e1a6 100644 --- a/ansible/roles/iscsi/tasks/config-host.yml +++ b/ansible/roles/iscsi/tasks/config-host.yml @@ -1,6 +1,6 @@ --- - name: Load and persist configfs module - import_role: + ansible.builtin.import_role: name: module-load vars: modules: diff --git a/ansible/roles/iscsi/tasks/config.yml b/ansible/roles/iscsi/tasks/config.yml index a47ddfbaf6..6851b9eaaf 100644 --- a/ansible/roles/iscsi/tasks/config.yml +++ b/ansible/roles/iscsi/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ iscsi_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" diff --git a/ansible/roles/iscsi/tasks/deploy-containers.yml b/ansible/roles/iscsi/tasks/deploy-containers.yml index d3e1b78e81..2d021c04cb 100644 --- a/ansible/roles/iscsi/tasks/deploy-containers.yml +++ b/ansible/roles/iscsi/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check iscsi containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/iscsi/tasks/deploy.yml b/ansible/roles/iscsi/tasks/deploy.yml index 9a4bd0ae7f..517b747770 100644 --- a/ansible/roles/iscsi/tasks/deploy.yml +++ b/ansible/roles/iscsi/tasks/deploy.yml @@ -1,12 +1,12 @@ --- - name: Import tasks from config-host.yml - import_tasks: config-host.yml + ansible.builtin.import_tasks: config-host.yml - name: Configure iscsi - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check iscsi containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/iscsi/tasks/main.yml b/ansible/roles/iscsi/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/iscsi/tasks/main.yml +++ b/ansible/roles/iscsi/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/iscsi/tasks/precheck.yml b/ansible/roles/iscsi/tasks/precheck.yml index 8e1b9bdae1..cc9ff2ebac 100644 --- a/ansible/roles/iscsi/tasks/precheck.yml +++ b/ansible/roles/iscsi/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck iscsi configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ iscsi_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for iscsi - wait_for: + ansible.builtin.wait_for: host: "{{ tgtd_interface_address }}" port: "{{ iscsi_port }}" connect_timeout: 1 @@ -29,7 +29,7 @@ - iscsi_services.iscsid.enabled | bool - name: Check supported platforms for tgtd - assert: + ansible.builtin.assert: that: ansible_facts.os_family != 'RedHat' fail_msg: > The SCSI target daemon tgtd is not supported on CentOS/RHEL diff --git a/ansible/roles/iscsi/tasks/pull.yml b/ansible/roles/iscsi/tasks/pull.yml index 334b0206b6..c0a59b304a 100644 --- a/ansible/roles/iscsi/tasks/pull.yml +++ b/ansible/roles/iscsi/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull iscsi images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/iscsi/tasks/reconfigure.yml b/ansible/roles/iscsi/tasks/reconfigure.yml index be803665f3..698e6cddbb 100644 --- a/ansible/roles/iscsi/tasks/reconfigure.yml +++ b/ansible/roles/iscsi/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy iscsi - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/iscsi/tasks/stop.yml b/ansible/roles/iscsi/tasks/stop.yml index d18f07d13b..4694e66eb3 100644 --- a/ansible/roles/iscsi/tasks/stop.yml +++ b/ansible/roles/iscsi/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop iscsi containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ iscsi_services }}" diff --git a/ansible/roles/iscsi/tasks/upgrade.yml b/ansible/roles/iscsi/tasks/upgrade.yml index bdcead398a..8d5ca3fefc 100644 --- a/ansible/roles/iscsi/tasks/upgrade.yml +++ b/ansible/roles/iscsi/tasks/upgrade.yml @@ -1,3 +1,3 @@ --- - name: Import tasks from deploy.yml - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/keystone/tasks/bootstrap.yml b/ansible/roles/keystone/tasks/bootstrap.yml index b5cd3fb029..d7710d2159 100644 --- a/ansible/roles/keystone/tasks/bootstrap.yml +++ b/ansible/roles/keystone/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run keystone bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/keystone/tasks/bootstrap_service.yml b/ansible/roles/keystone/tasks/bootstrap_service.yml index f76d8f787d..270b70bb2f 100644 --- a/ansible/roles/keystone/tasks/bootstrap_service.yml +++ b/ansible/roles/keystone/tasks/bootstrap_service.yml @@ -14,14 +14,14 @@ # * the keystone_fernet volume exists but no container # Probably what we care about is the existence of Fernet key 0. - name: Group nodes where keystone_fernet is running - group_by: + ansible.builtin.group_by: key: keystone_fernet_running_{{ container_facts.containers['keystone_fernet'] is defined }} changed_when: false # NOTE(mgoddard): If we bootstrap Fernet keys on an existing cluster, this # would overwrite existing keys, and invalidate tokens created from them. - name: Fail if any hosts need bootstrapping and not all hosts targeted - fail: + ansible.builtin.fail: msg: > Some hosts ({{ groups['keystone_fernet_running_False'] | join(', ') }}) need Fernet key bootstrapping, but not all Keystone hosts are in the target diff --git a/ansible/roles/keystone/tasks/check-containers.yml b/ansible/roles/keystone/tasks/check-containers.yml index 535c3f001c..20da053738 100644 --- a/ansible/roles/keystone/tasks/check-containers.yml +++ b/ansible/roles/keystone/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check keystone containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/keystone/tasks/check.yml b/ansible/roles/keystone/tasks/check.yml index 2aa3f49b1d..01db1aeeef 100644 --- a/ansible/roles/keystone/tasks/check.yml +++ b/ansible/roles/keystone/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Keystone containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/keystone/tasks/clone.yml b/ansible/roles/keystone/tasks/clone.yml index fd1d368349..98fd2479a1 100644 --- a/ansible/roles/keystone/tasks/clone.yml +++ b/ansible/roles/keystone/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning keystone source repository for development become: true - git: + ansible.builtin.git: repo: "{{ keystone_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ keystone_dev_repos_pull }}" diff --git a/ansible/roles/keystone/tasks/config-federation-oidc.yml b/ansible/roles/keystone/tasks/config-federation-oidc.yml index d663f6234f..d113b367a9 100644 --- a/ansible/roles/keystone/tasks/config-federation-oidc.yml +++ b/ansible/roles/keystone/tasks/config-federation-oidc.yml @@ -3,7 +3,7 @@ become: true vars: keystone: "{{ keystone_services['keystone'] }}" - file: + ansible.builtin.file: state: absent path: "{{ item }}" when: @@ -16,7 +16,7 @@ - name: Create OpenID configuration directories vars: keystone: "{{ keystone_services['keystone'] }}" - file: + ansible.builtin.file: dest: "{{ item }}" state: "directory" mode: "0770" @@ -29,7 +29,7 @@ - inventory_hostname in groups[keystone.group] - name: Find OpenID Identity Providers metadata files locally - find: + ansible.builtin.find: paths: "{{ item.metadata_folder }}" patterns: "*" recurse: false @@ -44,7 +44,7 @@ vars: keystone: "{{ keystone_services['keystone'] }}" become: true - template: + ansible.builtin.template: src: "{{ item.path }}" dest: "{{ keystone_host_federation_oidc_metadata_folder }}/{{ item.path | basename }}" mode: "0660" @@ -56,7 +56,7 @@ vars: keystone: "{{ keystone_services['keystone'] }}" become: true - copy: + ansible.builtin.copy: src: "{{ item.certificate_file }}" dest: "{{ keystone_host_federation_oidc_idp_certificate_folder }}" mode: "0660" @@ -70,7 +70,7 @@ vars: keystone: "{{ keystone_services['keystone'] }}" become: true - copy: + ansible.builtin.copy: src: "{{ item.file }}" dest: "{{ keystone_host_federation_oidc_attribute_mappings_folder }}/{{ item.file | basename }}" mode: "0660" @@ -82,7 +82,7 @@ become: true vars: keystone: "{{ keystone_services['keystone'] }}" - find: + ansible.builtin.find: path: "{{ keystone_host_federation_oidc_idp_certificate_folder }}" pattern: "*.pem" register: certificates_path @@ -92,7 +92,7 @@ - name: Setting the certificates variable vars: keystone: "{{ keystone_services['keystone'] }}" - set_fact: + ansible.builtin.set_fact: keystone_federation_openid_certificate_key_ids: >- {{ certificates_path.files | @@ -105,7 +105,7 @@ - name: Copying modOIDC error page template vars: keystone: "{{ keystone_services.keystone }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ keystone_host_federation_base_folder }}/modoidc-error-page.html" mode: "0660" diff --git a/ansible/roles/keystone/tasks/config.yml b/ansible/roles/keystone/tasks/config.yml index e247a470db..2170135ddb 100644 --- a/ansible/roles/keystone/tasks/config.yml +++ b/ansible/roles/keystone/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,26 +22,26 @@ skip: true - name: Set keystone policy file - set_fact: + ansible.builtin.set_fact: keystone_policy_file: "{{ keystone_policy.results.0.stat.path | basename }}" keystone_policy_file_path: "{{ keystone_policy.results.0.stat.path }}" when: - keystone_policy.results | length > 0 - name: Check if Keystone domain-specific config is supplied - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/keystone/domains" delegate_to: localhost run_once: true register: keystone_domain_directory - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - keystone_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -68,7 +68,7 @@ - name: Copying keystone-startup script for keystone vars: service: "{{ keystone_services['keystone'] }}" - template: + ansible.builtin.template: src: "keystone-startup.sh.j2" dest: "{{ node_config_directory }}/keystone/keystone-startup.sh" mode: "0660" @@ -78,7 +78,7 @@ - name: Create Keystone domain-specific config directory vars: service: "{{ keystone_services['keystone'] }}" - file: + ansible.builtin.file: dest: "{{ node_config_directory }}/keystone/domains/" state: "directory" mode: "0770" @@ -88,7 +88,7 @@ - keystone_domain_directory.stat.exists - name: Get file list in custom domains folder - find: + ansible.builtin.find: path: "{{ node_custom_config }}/keystone/domains" recurse: false file_type: file @@ -99,7 +99,7 @@ - name: Copying Keystone Domain specific settings vars: service: "{{ keystone_services['keystone'] }}" - template: + ansible.builtin.template: src: "{{ item.path }}" dest: "{{ node_config_directory }}/keystone/domains/" mode: "0660" @@ -111,7 +111,7 @@ with_items: "{{ keystone_domains.files | default([]) }}" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ keystone_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ keystone_policy_file }}" mode: "0660" @@ -122,14 +122,14 @@ with_dict: "{{ keystone_services | select_services_enabled_and_mapped_to_host }}" - name: Include tasks from config-federation-oidc.yml - include_tasks: config-federation-oidc.yml + ansible.builtin.include_tasks: config-federation-oidc.yml when: - keystone_enable_federation_openid | bool - name: Copying over wsgi-keystone.conf vars: service: "{{ keystone_services['keystone'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/keystone/wsgi-keystone.conf" mode: "0660" @@ -143,7 +143,7 @@ - "wsgi-keystone.conf.j2" - name: "Configure uWSGI for Keystone" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ keystone_services }}" @@ -168,7 +168,7 @@ - name: Copying over httpd-keystone.conf vars: service: "{{ keystone_services['keystone-httpd'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/keystone-httpd/httpd-keystone.conf" mode: "0660" @@ -184,7 +184,7 @@ - name: Checking whether keystone-paste.ini file exists vars: service: "{{ keystone_services['keystone'] }}" - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/keystone/keystone-paste.ini" delegate_to: localhost run_once: true @@ -194,7 +194,7 @@ - name: Copying over keystone-paste.ini vars: service: "{{ keystone_services['keystone'] }}" - template: + ansible.builtin.template: src: "{{ node_custom_config }}/keystone/keystone-paste.ini" dest: "{{ node_config_directory }}/keystone/keystone-paste.ini" mode: "0660" @@ -204,7 +204,7 @@ - check_keystone_paste_ini.stat.exists - name: Generate the required cron jobs for the node - command: > + ansible.builtin.command: > {{ ansible_playbook_python }} {{ role_path }}/files/fernet_rotate_cron_generator.py -t {{ (fernet_key_rotation_interval | int) // 60 }} -i {{ groups['keystone'].index(inventory_hostname) }} @@ -216,14 +216,14 @@ delegate_to: localhost - name: Set fact with the generated cron jobs for building the crontab later - set_fact: + ansible.builtin.set_fact: cron_jobs: "{{ (cron_jobs_json.stdout | from_json).cron_jobs }}" ignore_errors: "{{ ansible_check_mode }}" - name: Copying files for keystone-fernet vars: service: "{{ keystone_services['keystone-fernet'] }}" - template: + ansible.builtin.template: src: "{{ item.src }}" dest: "{{ node_config_directory }}/keystone-fernet/{{ item.dest }}" mode: "0660" @@ -242,7 +242,7 @@ - name: Copying files for keystone-ssh vars: service: "{{ keystone_services['keystone-ssh'] }}" - template: + ansible.builtin.template: src: "{{ item.src }}" dest: "{{ node_config_directory }}/keystone-ssh/{{ item.dest }}" mode: "0660" diff --git a/ansible/roles/keystone/tasks/config_validate.yml b/ansible/roles/keystone/tasks/config_validate.yml index c008b29422..d1cb636f3d 100644 --- a/ansible/roles/keystone/tasks/config_validate.yml +++ b/ansible/roles/keystone/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate keystone configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ keystone_services }}" diff --git a/ansible/roles/keystone/tasks/copy-certs.yml b/ansible/roles/keystone/tasks/copy-certs.yml index 7fd52ba30a..3537cf898d 100644 --- a/ansible/roles/keystone/tasks/copy-certs.yml +++ b/ansible/roles/keystone/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ keystone_services }}" diff --git a/ansible/roles/keystone/tasks/deploy-containers.yml b/ansible/roles/keystone/tasks/deploy-containers.yml index d57f3b9069..f9abe0a23e 100644 --- a/ansible/roles/keystone/tasks/deploy-containers.yml +++ b/ansible/roles/keystone/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check keystone containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/keystone/tasks/deploy.yml b/ansible/roles/keystone/tasks/deploy.yml index e96f4043b8..11dd6582a2 100644 --- a/ansible/roles/keystone/tasks/deploy.yml +++ b/ansible/roles/keystone/tasks/deploy.yml @@ -1,28 +1,28 @@ --- - name: Configure keystone - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check keystone containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone keystone repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: - keystone_dev_mode | bool - name: Bootstrap keystone service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Include tasks from distribute_fernet.yml - include_tasks: distribute_fernet.yml + ansible.builtin.include_tasks: distribute_fernet.yml - name: Register keystone in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Include tasks from register_identity_providers.yml - include_tasks: register_identity_providers.yml + ansible.builtin.include_tasks: register_identity_providers.yml when: - enable_keystone_federation | bool diff --git a/ansible/roles/keystone/tasks/distribute_fernet.yml b/ansible/roles/keystone/tasks/distribute_fernet.yml index 7320aa1ba0..a780cf8dad 100644 --- a/ansible/roles/keystone/tasks/distribute_fernet.yml +++ b/ansible/roles/keystone/tasks/distribute_fernet.yml @@ -1,6 +1,6 @@ --- - name: Waiting for Keystone SSH port to be UP - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ keystone_ssh_port }}" connect_timeout: 1 @@ -12,7 +12,7 @@ - name: Run key distribution become: true changed_when: true - command: "{{ kolla_container_engine }} exec -t {{ keystone_services['keystone-fernet']['container_name'] }} /usr/bin/fernet-push.sh" + ansible.builtin.command: "{{ kolla_container_engine }} exec -t {{ keystone_services['keystone-fernet']['container_name'] }} /usr/bin/fernet-push.sh" run_once: true delegate_to: >- {% if groups['keystone_fernet_running'] is defined -%} diff --git a/ansible/roles/keystone/tasks/loadbalancer.yml b/ansible/roles/keystone/tasks/loadbalancer.yml index ec0c78bf58..272e2dc3b8 100644 --- a/ansible/roles/keystone/tasks/loadbalancer.yml +++ b/ansible/roles/keystone/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ keystone_services }}" diff --git a/ansible/roles/keystone/tasks/main.yml b/ansible/roles/keystone/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/keystone/tasks/main.yml +++ b/ansible/roles/keystone/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/keystone/tasks/precheck.yml b/ansible/roles/keystone/tasks/precheck.yml index 707e1954c3..57c9ec9ca6 100644 --- a/ansible/roles/keystone/tasks/precheck.yml +++ b/ansible/roles/keystone/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck keystone configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ keystone_services }}" @@ -18,7 +18,7 @@ register: container_facts - name: Checking free port for Keystone Public - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ keystone_public_listen_port }}" connect_timeout: 1 @@ -31,7 +31,7 @@ - name: Checking free port for Keystone SSH vars: keystone_ssh: "{{ keystone_services['keystone-ssh'] }}" - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ keystone_ssh_port }}" connect_timeout: 1 @@ -44,7 +44,7 @@ - name: Checking fernet_token_expiry run_once: true - assert: + ansible.builtin.assert: that: - fernet_token_expiry is number # Check that it is not a floating point number diff --git a/ansible/roles/keystone/tasks/pull.yml b/ansible/roles/keystone/tasks/pull.yml index 56806a2b50..008d7030f1 100644 --- a/ansible/roles/keystone/tasks/pull.yml +++ b/ansible/roles/keystone/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull keystone images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/keystone/tasks/reconfigure.yml b/ansible/roles/keystone/tasks/reconfigure.yml index f6e6d05835..ba00aa5f5a 100644 --- a/ansible/roles/keystone/tasks/reconfigure.yml +++ b/ansible/roles/keystone/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy keystone - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/keystone/tasks/register.yml b/ansible/roles/keystone/tasks/register.yml index 681e5be501..c5d730b94f 100644 --- a/ansible/roles/keystone/tasks/register.yml +++ b/ansible/roles/keystone/tasks/register.yml @@ -1,7 +1,7 @@ --- - name: Creating admin project, user, role, service, and endpoint become: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec keystone kolla_keystone_bootstrap {{ openstack_auth.username }} {{ openstack_auth.password }} {{ openstack_auth.project_name }} admin {{ keystone_internal_url }} {{ keystone_public_url }} {{ item }} @@ -12,7 +12,7 @@ with_items: "{{ multiple_regions_names }}" - name: Register keystone service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_keystone_auth }}" diff --git a/ansible/roles/keystone/tasks/register_identity_providers.yml b/ansible/roles/keystone/tasks/register_identity_providers.yml index 63597fbfd2..475b8f38ad 100644 --- a/ansible/roles/keystone/tasks/register_identity_providers.yml +++ b/ansible/roles/keystone/tasks/register_identity_providers.yml @@ -1,6 +1,6 @@ --- - name: List configured attribute mappings (that can be used by IdPs) - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -18,12 +18,12 @@ register: existing_mappings_register - name: Register existing mappings - set_fact: + ansible.builtin.set_fact: existing_mappings: "{{ existing_mappings_register.stdout_lines | map('trim') | list }}" - name: Remove unmanaged attribute mappings changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -60,7 +60,7 @@ - name: Register attribute mappings in OpenStack become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -82,7 +82,7 @@ - name: Update existing attribute mappings in OpenStack become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -103,7 +103,7 @@ - name: List configured IdPs become: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -120,13 +120,13 @@ register: existing_idps_register - name: Register existing idps - set_fact: + ansible.builtin.set_fact: existing_idps: "{{ existing_idps_register.stdout.split('\n') | map('trim') | list }}" - name: Remove unmanaged identity providers become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -147,7 +147,7 @@ - name: Register Identity Providers in OpenStack become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -171,7 +171,7 @@ - name: Update Identity Providers in OpenStack according to Kolla-Ansible configurations become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -194,7 +194,7 @@ - name: Configure attribute mappings for each Identity Provider. (We expect the mappings to be configured by the operator) become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} @@ -217,7 +217,7 @@ - name: Update attribute mappings for each Identity Provider. (We expect the mappings to be configured by the operator). become: true changed_when: true - command: > + ansible.builtin.command: > {{ kolla_container_engine }} exec -t keystone openstack --os-auth-url={{ openstack_auth.auth_url }} --os-password={{ openstack_auth.password }} diff --git a/ansible/roles/keystone/tasks/stop.yml b/ansible/roles/keystone/tasks/stop.yml index b66c33e608..67926e549e 100644 --- a/ansible/roles/keystone/tasks/stop.yml +++ b/ansible/roles/keystone/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop keystone containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ keystone_services }}" diff --git a/ansible/roles/keystone/tasks/upgrade.yml b/ansible/roles/keystone/tasks/upgrade.yml index 316177fca5..fb40cf7f73 100644 --- a/ansible/roles/keystone/tasks/upgrade.yml +++ b/ansible/roles/keystone/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure keystone - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check keystone containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Enable log_bin_trust_function_creators function become: true @@ -25,18 +25,18 @@ - name: Init keystone database upgrade changed_when: true - command: /bin/true + ansible.builtin.command: /bin/true notify: Init keystone database upgrade when: inventory_hostname == groups['keystone'][0] - name: Finish keystone database upgrade changed_when: true - command: /bin/true + ansible.builtin.command: /bin/true notify: Finish keystone database upgrade when: inventory_hostname == groups['keystone'][-1] - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers - name: Disable log_bin_trust_function_creators function become: true diff --git a/ansible/roles/kuryr/tasks/check-containers.yml b/ansible/roles/kuryr/tasks/check-containers.yml index 1720e608c7..8de17dc336 100644 --- a/ansible/roles/kuryr/tasks/check-containers.yml +++ b/ansible/roles/kuryr/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check kuryr containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/kuryr/tasks/check.yml b/ansible/roles/kuryr/tasks/check.yml index 7067817b95..bea4512cc0 100644 --- a/ansible/roles/kuryr/tasks/check.yml +++ b/ansible/roles/kuryr/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Kuryr containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/kuryr/tasks/clone.yml b/ansible/roles/kuryr/tasks/clone.yml index b8e013bab4..8eaead5d06 100644 --- a/ansible/roles/kuryr/tasks/clone.yml +++ b/ansible/roles/kuryr/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning kuryr source repository for development become: true - git: + ansible.builtin.git: repo: "{{ kuryr_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ kuryr_dev_repos_pull }}" @@ -9,7 +9,7 @@ - name: Cloning kuryr-libnetwork source repository for development become: true - git: + ansible.builtin.git: repo: "{{ kuryr_libnetwork_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ libnetwork_project_name }}" update: "{{ kuryr_dev_repos_pull }}" diff --git a/ansible/roles/kuryr/tasks/config.yml b/ansible/roles/kuryr/tasks/config.yml index da67042186..f1f8ad1909 100644 --- a/ansible/roles/kuryr/tasks/config.yml +++ b/ansible/roles/kuryr/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ kuryr_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,19 +22,19 @@ skip: true - name: Set kuryr policy file - set_fact: + ansible.builtin.set_fact: kuryr_policy_file: "{{ kuryr_policy.results.0.stat.path | basename }}" kuryr_policy_file_path: "{{ kuryr_policy.results.0.stat.path }}" when: - kuryr_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - kuryr_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -59,7 +59,7 @@ - name: Copying over kuryr.spec vars: service: "{{ kuryr_services['kuryr'] }}" - template: + ansible.builtin.template: src: "kuryr.spec.j2" dest: "{{ node_config_directory }}/{{ item }}/kuryr.spec" mode: "0660" @@ -69,7 +69,7 @@ - "kuryr" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ kuryr_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ kuryr_policy_file }}" mode: "0660" diff --git a/ansible/roles/kuryr/tasks/config_validate.yml b/ansible/roles/kuryr/tasks/config_validate.yml index 173191d5f4..47d6a66219 100644 --- a/ansible/roles/kuryr/tasks/config_validate.yml +++ b/ansible/roles/kuryr/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate kuryr configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ kuryr_services }}" diff --git a/ansible/roles/kuryr/tasks/copy-certs.yml b/ansible/roles/kuryr/tasks/copy-certs.yml index c41ed0da94..90781daed1 100644 --- a/ansible/roles/kuryr/tasks/copy-certs.yml +++ b/ansible/roles/kuryr/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ kuryr_services }}" diff --git a/ansible/roles/kuryr/tasks/deploy-containers.yml b/ansible/roles/kuryr/tasks/deploy-containers.yml index f4fe47550b..764417502b 100644 --- a/ansible/roles/kuryr/tasks/deploy-containers.yml +++ b/ansible/roles/kuryr/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check kuryr containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/kuryr/tasks/deploy.yml b/ansible/roles/kuryr/tasks/deploy.yml index 610899aafc..6a4dfc7dc0 100644 --- a/ansible/roles/kuryr/tasks/deploy.yml +++ b/ansible/roles/kuryr/tasks/deploy.yml @@ -1,17 +1,17 @@ --- - name: Register kuryr in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure kuryr - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check kuryr containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone kuryr repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: - kuryr_dev_mode | bool - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/kuryr/tasks/main.yml b/ansible/roles/kuryr/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/kuryr/tasks/main.yml +++ b/ansible/roles/kuryr/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/kuryr/tasks/precheck.yml b/ansible/roles/kuryr/tasks/precheck.yml index 647c444c8c..4741081358 100644 --- a/ansible/roles/kuryr/tasks/precheck.yml +++ b/ansible/roles/kuryr/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck kuryr configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ kuryr_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Kuryr - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ kuryr_port }}" connect_timeout: 1 diff --git a/ansible/roles/kuryr/tasks/pull.yml b/ansible/roles/kuryr/tasks/pull.yml index eb15fd582d..7b81e14746 100644 --- a/ansible/roles/kuryr/tasks/pull.yml +++ b/ansible/roles/kuryr/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull kuryr images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/kuryr/tasks/reconfigure.yml b/ansible/roles/kuryr/tasks/reconfigure.yml index b73505a9b0..5d261b6686 100644 --- a/ansible/roles/kuryr/tasks/reconfigure.yml +++ b/ansible/roles/kuryr/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy kuryr - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/kuryr/tasks/register.yml b/ansible/roles/kuryr/tasks/register.yml index c98c8d56a0..483792787e 100644 --- a/ansible/roles/kuryr/tasks/register.yml +++ b/ansible/roles/kuryr/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register kuryr service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_kuryr_auth }}" diff --git a/ansible/roles/kuryr/tasks/stop.yml b/ansible/roles/kuryr/tasks/stop.yml index 7a57f7b989..1cd93b148c 100644 --- a/ansible/roles/kuryr/tasks/stop.yml +++ b/ansible/roles/kuryr/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop kuryr containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ kuryr_services }}" diff --git a/ansible/roles/kuryr/tasks/upgrade.yml b/ansible/roles/kuryr/tasks/upgrade.yml index defa84b742..57b441eb2b 100644 --- a/ansible/roles/kuryr/tasks/upgrade.yml +++ b/ansible/roles/kuryr/tasks/upgrade.yml @@ -1,9 +1,9 @@ --- - name: Configure kuryr - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check kuryr containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/letsencrypt/tasks/check-containers.yml b/ansible/roles/letsencrypt/tasks/check-containers.yml index 9b13827942..c1234c6747 100644 --- a/ansible/roles/letsencrypt/tasks/check-containers.yml +++ b/ansible/roles/letsencrypt/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check letsencrypt containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/letsencrypt/tasks/check.yml b/ansible/roles/letsencrypt/tasks/check.yml index dd3b331e28..de87a45cb8 100644 --- a/ansible/roles/letsencrypt/tasks/check.yml +++ b/ansible/roles/letsencrypt/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking LetsEncrypt containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/letsencrypt/tasks/config.yml b/ansible/roles/letsencrypt/tasks/config.yml index f26de83096..80d782c9a9 100644 --- a/ansible/roles/letsencrypt/tasks/config.yml +++ b/ansible/roles/letsencrypt/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ letsencrypt_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -21,7 +21,7 @@ vars: service: "{{ letsencrypt_services['letsencrypt-webserver'] }}" become: true - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/letsencrypt-webserver/letsencrypt-webserver.conf" mode: "0660" @@ -34,7 +34,7 @@ - name: Copying files for letsencrypt-lego vars: service: "{{ letsencrypt_services['letsencrypt-lego'] }}" - template: + ansible.builtin.template: src: "{{ item.src }}" dest: "{{ node_config_directory }}/letsencrypt-lego/{{ item.dest }}" mode: "0660" @@ -46,6 +46,6 @@ when: service | service_enabled_and_mapped_to_host - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - letsencrypt_copy_certs | bool diff --git a/ansible/roles/letsencrypt/tasks/copy-certs.yml b/ansible/roles/letsencrypt/tasks/copy-certs.yml index 567b23612e..f1a8d66a65 100644 --- a/ansible/roles/letsencrypt/tasks/copy-certs.yml +++ b/ansible/roles/letsencrypt/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ letsencrypt_services }}" diff --git a/ansible/roles/letsencrypt/tasks/deploy-containers.yml b/ansible/roles/letsencrypt/tasks/deploy-containers.yml index 1e6490cb50..f59ac3f519 100644 --- a/ansible/roles/letsencrypt/tasks/deploy-containers.yml +++ b/ansible/roles/letsencrypt/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check letsencrypt containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/letsencrypt/tasks/deploy.yml b/ansible/roles/letsencrypt/tasks/deploy.yml index 467fe75c8d..38de873a9e 100644 --- a/ansible/roles/letsencrypt/tasks/deploy.yml +++ b/ansible/roles/letsencrypt/tasks/deploy.yml @@ -1,9 +1,9 @@ --- - name: Configure letsencrypt - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check letsencrypt containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/letsencrypt/tasks/loadbalancer.yml b/ansible/roles/letsencrypt/tasks/loadbalancer.yml index a9a2a5c4bc..1467bd3bc6 100644 --- a/ansible/roles/letsencrypt/tasks/loadbalancer.yml +++ b/ansible/roles/letsencrypt/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ letsencrypt_services }}" diff --git a/ansible/roles/letsencrypt/tasks/main.yml b/ansible/roles/letsencrypt/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/letsencrypt/tasks/main.yml +++ b/ansible/roles/letsencrypt/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/letsencrypt/tasks/precheck.yml b/ansible/roles/letsencrypt/tasks/precheck.yml index f0a5ff9d16..14d5c4dd57 100644 --- a/ansible/roles/letsencrypt/tasks/precheck.yml +++ b/ansible/roles/letsencrypt/tasks/precheck.yml @@ -11,7 +11,7 @@ - name: Checking free port for LetsEncrypt server vars: service: "{{ letsencrypt_services['letsencrypt-webserver'] }}" - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ letsencrypt_webserver_port }}" connect_timeout: 1 @@ -25,7 +25,7 @@ run_once: true vars: replace: "valid" - assert: + ansible.builtin.assert: that: letsencrypt_email | regex_replace('.*@.*$', replace) == "valid" fail_msg: "Letsencrypt contact email value didn't pass validation." when: @@ -34,7 +34,7 @@ - name: Validating letsencrypt EAB variables run_once: true - assert: + ansible.builtin.assert: that: - letsencrypt_eab_key_id != "" - letsencrypt_eab_hmac != "" diff --git a/ansible/roles/letsencrypt/tasks/pull.yml b/ansible/roles/letsencrypt/tasks/pull.yml index 8baa866621..ebfe4b6883 100644 --- a/ansible/roles/letsencrypt/tasks/pull.yml +++ b/ansible/roles/letsencrypt/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull letsencrypt images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/letsencrypt/tasks/reconfigure.yml b/ansible/roles/letsencrypt/tasks/reconfigure.yml index bd031f31da..e02e9942cd 100644 --- a/ansible/roles/letsencrypt/tasks/reconfigure.yml +++ b/ansible/roles/letsencrypt/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy letsencrypt - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/letsencrypt/tasks/stop.yml b/ansible/roles/letsencrypt/tasks/stop.yml index 12fc7f8738..e5e72a9829 100644 --- a/ansible/roles/letsencrypt/tasks/stop.yml +++ b/ansible/roles/letsencrypt/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop letsencrypt services - import_role: + ansible.builtin.import_role: role: service-stop vars: project_services: "{{ letsencrypt_services }}" diff --git a/ansible/roles/letsencrypt/tasks/upgrade.yml b/ansible/roles/letsencrypt/tasks/upgrade.yml index bdcead398a..8d5ca3fefc 100644 --- a/ansible/roles/letsencrypt/tasks/upgrade.yml +++ b/ansible/roles/letsencrypt/tasks/upgrade.yml @@ -1,3 +1,3 @@ --- - name: Import tasks from deploy.yml - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/loadbalancer-config/tasks/main.yml b/ansible/roles/loadbalancer-config/tasks/main.yml index 3e82e0b358..5c2e25943b 100644 --- a/ansible/roles/loadbalancer-config/tasks/main.yml +++ b/ansible/roles/loadbalancer-config/tasks/main.yml @@ -1,10 +1,10 @@ --- - name: Import haproxy-config role - import_role: + ansible.builtin.import_role: name: haproxy-config when: haproxy_config_install | bool - name: Import proxysql-config role - import_role: + ansible.builtin.import_role: name: proxysql-config when: enable_proxysql | bool diff --git a/ansible/roles/loadbalancer/handlers/main.yml b/ansible/roles/loadbalancer/handlers/main.yml index 6753f8350e..49fbf2a372 100644 --- a/ansible/roles/loadbalancer/handlers/main.yml +++ b/ansible/roles/loadbalancer/handlers/main.yml @@ -10,7 +10,7 @@ vars: version: "{{ '6' if api_address_family == 'ipv6' else '4' }}" become: true - command: ip -{{ version }} -o addr show dev {{ api_interface }} + ansible.builtin.command: ip -{{ version }} -o addr show dev {{ api_interface }} register: ip_addr_output changed_when: false when: @@ -23,7 +23,7 @@ - name: Group HA nodes by status vars: re_safe_address: "{{ kolla_internal_vip_address | regex_escape }}" - group_by: + ansible.builtin.group_by: key: kolla_ha_is_master_{{ ip_addr_output.stdout is regex('\b' + re_safe_address + '\b') }} changed_when: false when: @@ -113,7 +113,7 @@ - Wait for backup haproxy to start - name: Wait for backup haproxy to start - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ haproxy_monitor_port }}" any_errors_fatal: true @@ -148,7 +148,7 @@ - Wait for backup proxysql to start - name: Wait for backup proxysql to start - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ proxysql_admin_port }}" any_errors_fatal: true @@ -249,7 +249,7 @@ - Wait for master haproxy to start - name: Wait for master haproxy to start - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ haproxy_monitor_port }}" @@ -279,7 +279,7 @@ - Wait for master proxysql to start - name: Wait for master proxysql to start - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ proxysql_admin_port }}" @@ -310,7 +310,7 @@ vars: service_name: "haproxy" service: "{{ loadbalancer_services[service_name] }}" - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ haproxy_monitor_port }}" when: @@ -322,7 +322,7 @@ vars: service_name: "proxysql" service: "{{ loadbalancer_services[service_name] }}" - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ proxysql_admin_port }}" when: diff --git a/ansible/roles/loadbalancer/tasks/check-containers.yml b/ansible/roles/loadbalancer/tasks/check-containers.yml index 7fa8a48417..27b4d25b1d 100644 --- a/ansible/roles/loadbalancer/tasks/check-containers.yml +++ b/ansible/roles/loadbalancer/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check loadbalancer containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/loadbalancer/tasks/check.yml b/ansible/roles/loadbalancer/tasks/check.yml index 4ed4b9409f..115276f5ba 100644 --- a/ansible/roles/loadbalancer/tasks/check.yml +++ b/ansible/roles/loadbalancer/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Loadbalancer containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/loadbalancer/tasks/config-host.yml b/ansible/roles/loadbalancer/tasks/config-host.yml index 6c8cc05878..d5ef2b30f7 100644 --- a/ansible/roles/loadbalancer/tasks/config-host.yml +++ b/ansible/roles/loadbalancer/tasks/config-host.yml @@ -1,12 +1,12 @@ --- - name: Check IPv6 support - command: /usr/sbin/sysctl -n net.ipv6.conf.all.disable_ipv6 + ansible.builtin.command: /usr/sbin/sysctl -n net.ipv6.conf.all.disable_ipv6 register: ipv6_disabled changed_when: false - name: Setting sysctl values - include_role: + ansible.builtin.include_role: name: sysctl vars: settings: @@ -18,7 +18,7 @@ - set_sysctl | bool - name: Load and persist keepalived module - import_role: + ansible.builtin.import_role: name: module-load vars: modules: diff --git a/ansible/roles/loadbalancer/tasks/config.yml b/ansible/roles/loadbalancer/tasks/config.yml index 99f34c4f29..cf18404786 100644 --- a/ansible/roles/loadbalancer/tasks/config.yml +++ b/ansible/roles/loadbalancer/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -12,7 +12,7 @@ - name: Ensuring haproxy service config subdir exists vars: service: "{{ loadbalancer_services['haproxy'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/haproxy/services.d" state: "directory" owner: "{{ config_owner_user }}" @@ -24,7 +24,7 @@ - name: Ensuring proxysql service config subdirectories exist vars: service: "{{ loadbalancer_services['proxysql'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/proxysql/{{ item }}" state: "directory" owner: "{{ config_owner_user }}" @@ -39,7 +39,7 @@ - name: Ensuring keepalived checks subdir exists vars: service: "{{ loadbalancer_services['keepalived'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/keepalived/checks" state: "directory" owner: "{{ config_owner_user }}" @@ -51,7 +51,7 @@ - name: Remove mariadb.cfg if proxysql enabled vars: service: "{{ loadbalancer_services['keepalived'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/haproxy/services.d/mariadb.cfg" state: absent become: true @@ -62,7 +62,7 @@ - name: Removing checks for services which are disabled vars: service: "{{ loadbalancer_services['keepalived'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/keepalived/checks/check_alive_{{ item.key }}.sh" state: absent become: true @@ -78,7 +78,7 @@ - name: Copying checks for services which are enabled vars: service: "{{ loadbalancer_services['keepalived'] }}" - template: + ansible.builtin.template: src: "keepalived/check_alive_{{ item.key }}.sh.j2" dest: "{{ node_config_directory }}/keepalived/checks/check_alive_{{ item.key }}.sh" mode: "0770" @@ -93,7 +93,7 @@ - service | service_enabled_and_mapped_to_host - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}/{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -103,7 +103,7 @@ - name: Copying over haproxy.cfg vars: service: "{{ loadbalancer_services['haproxy'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/haproxy/haproxy.cfg" mode: "0660" @@ -117,7 +117,7 @@ - name: Copying over proxysql config vars: service: "{{ loadbalancer_services['proxysql'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/proxysql/proxysql.yaml" mode: "0660" @@ -131,7 +131,7 @@ - name: Copying over haproxy single external frontend config vars: service: "{{ loadbalancer_services['haproxy'] }}" - template: + ansible.builtin.template: src: "haproxy/haproxy_external_frontend.cfg.j2" dest: "{{ node_config_directory }}/haproxy/services.d/external-frontend.cfg" mode: "0660" @@ -143,7 +143,7 @@ - name: Copying over custom haproxy services configuration vars: service: "{{ loadbalancer_services['haproxy'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/haproxy/services.d/" mode: "0660" @@ -155,7 +155,7 @@ - name: Copying over keepalived.conf vars: service: "{{ loadbalancer_services['keepalived'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/keepalived/keepalived.conf" mode: "0660" @@ -167,14 +167,14 @@ - "keepalived/keepalived.conf.j2" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - loadbalancer_copy_certs | bool - name: Copying over haproxy start script vars: service: "{{ loadbalancer_services['haproxy'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/haproxy/haproxy_run.sh" mode: "0770" @@ -188,7 +188,7 @@ - name: Copying over proxysql start script vars: service: "{{ loadbalancer_services['proxysql'] }}" - template: + ansible.builtin.template: src: "{{ item }}" dest: "{{ node_config_directory }}/proxysql/proxysql_run.sh" mode: "0770" @@ -202,7 +202,7 @@ - name: Copying files for haproxy-ssh vars: service: "{{ loadbalancer_services['haproxy-ssh'] }}" - template: + ansible.builtin.template: src: "{{ item.src }}" dest: "{{ node_config_directory }}/haproxy-ssh/{{ item.dest }}" mode: "0600" diff --git a/ansible/roles/loadbalancer/tasks/config_validate.yml b/ansible/roles/loadbalancer/tasks/config_validate.yml index 361d853093..290a876474 100644 --- a/ansible/roles/loadbalancer/tasks/config_validate.yml +++ b/ansible/roles/loadbalancer/tasks/config_validate.yml @@ -3,7 +3,7 @@ vars: service: "{{ loadbalancer_services['haproxy'] }}" changed_when: false - command: >- + ansible.builtin.command: >- {{ kolla_container_engine }} exec -i haproxy haproxy -c -f /etc/haproxy/haproxy.cfg -f /etc/haproxy/services.d/ register: haproxy_config_validation_result @@ -16,7 +16,7 @@ - name: Assert haproxy config is valid vars: service: "{{ loadbalancer_services['haproxy'] }}" - assert: + ansible.builtin.assert: that: - haproxy_config_validation_result.rc == 0 fail_msg: >- diff --git a/ansible/roles/loadbalancer/tasks/copy-certs.yml b/ansible/roles/loadbalancer/tasks/copy-certs.yml index 56780e9565..0bf3307f7f 100644 --- a/ansible/roles/loadbalancer/tasks/copy-certs.yml +++ b/ansible/roles/loadbalancer/tasks/copy-certs.yml @@ -2,7 +2,7 @@ - name: Copying over haproxy.pem vars: service: "{{ loadbalancer_services['haproxy'] }}" - copy: + ansible.builtin.copy: src: "{{ kolla_external_fqdn_cert }}" dest: "{{ node_config_directory }}/haproxy/{{ item }}" mode: "0660" @@ -18,7 +18,7 @@ - name: Copying over haproxy-internal.pem vars: service: "{{ loadbalancer_services['haproxy'] }}" - copy: + ansible.builtin.copy: src: "{{ kolla_internal_fqdn_cert }}" dest: "{{ node_config_directory }}/haproxy/{{ item }}" mode: "0660" @@ -34,7 +34,7 @@ - name: Copying over proxysql-cert.pem vars: service: "{{ loadbalancer_services['proxysql'] }}" - copy: + ansible.builtin.copy: src: "{{ kolla_certificates_dir }}/proxysql-cert.pem" dest: "{{ node_config_directory }}/proxysql/proxysql-cert.pem" mode: "0660" @@ -47,7 +47,7 @@ - name: Copying over proxysql-key.pem vars: service: "{{ loadbalancer_services['proxysql'] }}" - copy: + ansible.builtin.copy: src: "{{ kolla_certificates_dir }}/proxysql-key.pem" dest: "{{ node_config_directory }}/proxysql/proxysql-key.pem" mode: "0660" @@ -58,7 +58,7 @@ - not kolla_externally_managed_cert | bool - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ loadbalancer_services }}" diff --git a/ansible/roles/loadbalancer/tasks/deploy-containers.yml b/ansible/roles/loadbalancer/tasks/deploy-containers.yml index 24a6dd0139..ce5afa41b5 100644 --- a/ansible/roles/loadbalancer/tasks/deploy-containers.yml +++ b/ansible/roles/loadbalancer/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check loadbalancer containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/loadbalancer/tasks/deploy.yml b/ansible/roles/loadbalancer/tasks/deploy.yml index 7fc3e5787c..7e8415748b 100644 --- a/ansible/roles/loadbalancer/tasks/deploy.yml +++ b/ansible/roles/loadbalancer/tasks/deploy.yml @@ -1,12 +1,12 @@ --- - name: Import tasks from config-host.yml - import_tasks: config-host.yml + ansible.builtin.import_tasks: config-host.yml - name: Configure loadbalancer - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check loadbalancer containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml # NOTE(yoctozepto): haproxy role handlers should not be flushed early. # site.yml handles all haproxy things in a dedicated play. diff --git a/ansible/roles/loadbalancer/tasks/main.yml b/ansible/roles/loadbalancer/tasks/main.yml index 915bf9c7cf..6019b4e8e3 100644 --- a/ansible/roles/loadbalancer/tasks/main.yml +++ b/ansible/roles/loadbalancer/tasks/main.yml @@ -1,4 +1,4 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" when: inventory_hostname in groups['loadbalancer'] diff --git a/ansible/roles/loadbalancer/tasks/precheck.yml b/ansible/roles/loadbalancer/tasks/precheck.yml index b997c671e4..f9b7a63c89 100644 --- a/ansible/roles/loadbalancer/tasks/precheck.yml +++ b/ansible/roles/loadbalancer/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck loadbalancer configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ loadbalancer_services }}" @@ -19,7 +19,7 @@ register: container_facts - name: Group hosts by whether they are running keepalived - group_by: + ansible.builtin.group_by: key: "keepalived_running_{{ container_facts.containers['keepalived'] is defined }}" changed_when: false check_mode: false @@ -28,7 +28,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Group hosts by whether they are running HAProxy - group_by: + ansible.builtin.group_by: key: "haproxy_running_{{ container_facts.containers['haproxy'] is defined }}" changed_when: false check_mode: false @@ -37,7 +37,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Group hosts by whether they are running ProxySQL - group_by: + ansible.builtin.group_by: key: "proxysql_running_{{ container_facts.containers['proxysql'] is defined }}" changed_when: false check_mode: false @@ -51,7 +51,7 @@ # the haproxy group are included in the batch. This may not be the case if # using --limit or --serial. all_hosts_in_batch: "{{ groups['loadbalancer'] | difference(ansible_play_batch) | list | length == 0 }}" - set_fact: + ansible.builtin.set_fact: keepalived_vip_prechecks: "{{ all_hosts_in_batch and groups['keepalived_running_True'] is not defined }}" haproxy_vip_prechecks: "{{ all_hosts_in_batch and groups['haproxy_running_True'] is not defined }}" proxysql_vip_prechecks: "{{ all_hosts_in_batch and groups['proxysql_running_True'] is not defined }}" @@ -64,7 +64,7 @@ block: - name: Checking if external haproxy certificate exists run_once: true - stat: + ansible.builtin.stat: path: "{{ kolla_external_fqdn_cert }}" delegate_to: localhost register: haproxy_cert_file @@ -72,7 +72,7 @@ - name: Assert that external haproxy certificate exists run_once: true - assert: + ansible.builtin.assert: that: haproxy_cert_file.stat.exists fail_msg: "External haproxy certificate file is not found. It is configured via 'kolla_external_fqdn_cert'" @@ -84,7 +84,7 @@ block: - name: Checking if internal haproxy certificate exists run_once: true - stat: + ansible.builtin.stat: path: "{{ kolla_internal_fqdn_cert }}" delegate_to: localhost register: haproxy_internal_cert_file @@ -92,19 +92,19 @@ - name: Assert that internal haproxy certificate exists run_once: true - assert: + ansible.builtin.assert: that: haproxy_internal_cert_file.stat.exists fail_msg: "Internal haproxy certificate file is not found. It is configured via 'kolla_internal_fqdn_cert'" - name: Checking the kolla_external_vip_interface is present - assert: + ansible.builtin.assert: that: kolla_external_vip_interface in ansible_facts.interfaces fail_msg: "Please check the kolla_external_vip_interface property - interface {{ kolla_external_vip_interface }} not found" when: - haproxy_enable_external_vip | bool - name: Checking the kolla_external_vip_interface is active - assert: + ansible.builtin.assert: that: hostvars[inventory_hostname].ansible_facts[kolla_external_vip_interface | replace('-', '_')]['active'] fail_msg: "Please check the kolla_external_vip_interface settings - interface {{ kolla_external_vip_interface }} is not active" when: @@ -112,7 +112,7 @@ # NOTE(hrw): let assume that each supported host OS has ping with ipv4/v6 support - name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node - command: "ping -c 3 {{ item }}" + ansible.builtin.command: "ping -c 3 {{ item }}" register: ping_output changed_when: false failed_when: ping_output.rc != 1 @@ -126,7 +126,7 @@ - enable_haproxy | bool - name: Checking free port for HAProxy stats - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ haproxy_stats_port }}" connect_timeout: 1 @@ -138,7 +138,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Checking free port for HAProxy monitor (api interface) - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ haproxy_monitor_port }}" connect_timeout: 1 @@ -150,7 +150,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Checking free port for HAProxy monitor (vip interface) - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ haproxy_monitor_port }}" connect_timeout: 1 @@ -163,7 +163,7 @@ - api_interface_address != kolla_internal_vip_address - name: Checking free port for ProxySQL admin (api interface) - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ proxysql_admin_port }}" connect_timeout: 1 @@ -175,7 +175,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Checking free port for ProxySQL admin (vip interface) - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ proxysql_admin_port }}" connect_timeout: 1 @@ -188,7 +188,7 @@ - api_interface_address != kolla_internal_vip_address - name: Checking free port for ProxySQL prometheus exporter (api interface) - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ proxysql_prometheus_exporter_port }}" connect_timeout: 1 @@ -201,7 +201,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Checking free port for ProxySQL prometheus exporter (vip interface) - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ proxysql_prometheus_exporter_port }}" connect_timeout: 1 @@ -217,7 +217,7 @@ # FIXME(yoctozepto): this req seems arbitrary, they need not be, just routable is fine - name: Checking if kolla_internal_vip_address is in the same network as api_interface on all nodes become: true - command: ip -o addr show dev {{ api_interface }} + ansible.builtin.command: ip -o addr show dev {{ api_interface }} register: ip_addr_output changed_when: false failed_when: >- @@ -232,18 +232,19 @@ - name: Getting haproxy stat become: true - shell: echo "show stat" | {{ kolla_container_engine }} exec -i haproxy socat unix-connect:/var/lib/kolla/haproxy/haproxy.sock stdio # noqa risky-shell-pipe + ansible.builtin.shell: + cmd: echo "show stat" | {{ kolla_container_engine }} exec -i haproxy socat unix-connect:/var/lib/kolla/haproxy/haproxy.sock stdio # noqa risky-shell-pipe register: haproxy_stat_shell changed_when: false check_mode: false when: container_facts.containers['haproxy'] is defined - name: Setting haproxy stat fact - set_fact: + ansible.builtin.set_fact: haproxy_stat: "{{ haproxy_stat_shell.stdout | default('') }}" - name: Checking free port for Aodh API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ aodh_api_port }}" connect_timeout: 1 @@ -256,7 +257,7 @@ - haproxy_vip_prechecks - name: Checking free port for Barbican API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ barbican_api_port }}" connect_timeout: 1 @@ -269,7 +270,7 @@ - haproxy_vip_prechecks - name: Checking free port for Blazar API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ blazar_api_port }}" connect_timeout: 1 @@ -282,7 +283,7 @@ - haproxy_vip_prechecks - name: Checking free port for Ceph RadosGW HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ ceph_rgw_port }}" connect_timeout: 1 @@ -296,7 +297,7 @@ - haproxy_vip_prechecks - name: Checking free port for Cinder API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ cinder_api_port }}" connect_timeout: 1 @@ -309,7 +310,7 @@ - haproxy_vip_prechecks - name: Checking free port for Cloudkitty API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ cloudkitty_api_port }}" connect_timeout: 1 @@ -322,7 +323,7 @@ - haproxy_vip_prechecks - name: Checking free port for Cyborg API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ cyborg_api_port }}" connect_timeout: 1 @@ -335,7 +336,7 @@ - haproxy_vip_prechecks - name: Checking free port for Designate API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ designate_api_port }}" connect_timeout: 1 @@ -348,7 +349,7 @@ - haproxy_vip_prechecks - name: Checking free port for Glance API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ glance_api_port }}" connect_timeout: 1 @@ -361,7 +362,7 @@ - haproxy_vip_prechecks - name: Checking free port for Gnocchi API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ gnocchi_api_port }}" connect_timeout: 1 @@ -374,7 +375,7 @@ - haproxy_vip_prechecks - name: Checking free port for Grafana server HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ grafana_server_port }}" connect_timeout: 1 @@ -387,7 +388,7 @@ - haproxy_vip_prechecks - name: Checking free port for Heat API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ heat_api_port }}" connect_timeout: 1 @@ -400,7 +401,7 @@ - haproxy_vip_prechecks - name: Checking free port for Heat API CFN HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ heat_api_cfn_port }}" connect_timeout: 1 @@ -413,7 +414,7 @@ - haproxy_vip_prechecks - name: Checking free port for Horizon HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ horizon_port }}" connect_timeout: 1 @@ -426,7 +427,7 @@ - haproxy_vip_prechecks - name: Checking free port for Ironic API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ ironic_api_port }}" connect_timeout: 1 @@ -439,7 +440,7 @@ - haproxy_vip_prechecks - name: Checking free port for Keystone Internal HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ keystone_public_port }}" connect_timeout: 1 @@ -452,7 +453,7 @@ - haproxy_vip_prechecks - name: Checking free port for Keystone Public HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_external_vip_address }}" port: "{{ keystone_public_port }}" connect_timeout: 1 @@ -466,7 +467,7 @@ - haproxy_vip_prechecks - name: Checking free port for Magnum API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ magnum_api_port }}" connect_timeout: 1 @@ -479,7 +480,7 @@ - haproxy_vip_prechecks - name: Checking free port for Manila API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ manila_api_port }}" connect_timeout: 1 @@ -492,7 +493,7 @@ - haproxy_vip_prechecks - name: Checking free port for MariaDB HAProxy/ProxySQL - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ database_port }}" connect_timeout: 1 @@ -505,7 +506,7 @@ - haproxy_vip_prechecks or proxysql_vip_prechecks - name: Checking free port for Masakari API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ masakari_api_port }}" connect_timeout: 1 @@ -518,7 +519,7 @@ - haproxy_vip_prechecks - name: Checking free port for Mistral API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ mistral_api_port }}" connect_timeout: 1 @@ -531,7 +532,7 @@ - haproxy_vip_prechecks - name: Checking free port for Neutron Server HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ neutron_server_port }}" connect_timeout: 1 @@ -544,7 +545,7 @@ - haproxy_vip_prechecks - name: Checking free port for Nova API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ nova_api_port }}" connect_timeout: 1 @@ -557,7 +558,7 @@ - haproxy_vip_prechecks - name: Checking free port for Nova Metadata HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ nova_metadata_port }}" connect_timeout: 1 @@ -570,7 +571,7 @@ - haproxy_vip_prechecks - name: Checking free port for Nova NoVNC HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ nova_novncproxy_port }}" connect_timeout: 1 @@ -584,7 +585,7 @@ - haproxy_vip_prechecks - name: Checking free port for Nova Serial Proxy HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ nova_serialproxy_port }}" connect_timeout: 1 @@ -598,7 +599,7 @@ - haproxy_vip_prechecks - name: Checking free port for Nova Spice HTML5 HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ nova_spicehtml5proxy_port }}" connect_timeout: 1 @@ -612,7 +613,7 @@ - haproxy_vip_prechecks - name: Checking free port for Nova Placement API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ placement_api_port }}" connect_timeout: 1 @@ -625,7 +626,7 @@ - haproxy_vip_prechecks - name: Checking free port for Octavia API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ octavia_api_port }}" connect_timeout: 1 @@ -638,7 +639,7 @@ - haproxy_vip_prechecks - name: Checking free port for OpenSearch HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ opensearch_port }}" connect_timeout: 1 @@ -651,7 +652,7 @@ - haproxy_vip_prechecks - name: Checking free port for OpenSearch Dashboards HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ opensearch_dashboards_port }}" connect_timeout: 1 @@ -664,7 +665,7 @@ - haproxy_vip_prechecks - name: Checking free port for RabbitMQ Management HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ rabbitmq_management_port }}" connect_timeout: 1 @@ -677,7 +678,7 @@ - haproxy_vip_prechecks - name: Checking free port for Tacker Server HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ tacker_server_port }}" connect_timeout: 1 @@ -690,7 +691,7 @@ - haproxy_vip_prechecks - name: Checking free port for Trove API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ trove_api_port }}" connect_timeout: 1 @@ -703,7 +704,7 @@ - haproxy_vip_prechecks - name: Checking free port for Watcher API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ watcher_api_port }}" connect_timeout: 1 @@ -716,7 +717,7 @@ - haproxy_vip_prechecks - name: Checking free port for Zun API HAProxy - wait_for: + ansible.builtin.wait_for: host: "{{ kolla_internal_vip_address }}" port: "{{ zun_api_port }}" connect_timeout: 1 @@ -734,7 +735,7 @@ block: - name: Check if firewalld is running # noqa command-instead-of-module become: true - command: + ansible.builtin.command: cmd: "systemctl is-active firewalld" register: firewalld_is_active changed_when: false @@ -742,7 +743,7 @@ check_mode: false - name: Fail if firewalld is not running - fail: + ansible.builtin.fail: msg: >- firewalld is not running. Please install and configure firewalld. diff --git a/ansible/roles/loadbalancer/tasks/pull.yml b/ansible/roles/loadbalancer/tasks/pull.yml index 45c1e90852..bcdb3956ab 100644 --- a/ansible/roles/loadbalancer/tasks/pull.yml +++ b/ansible/roles/loadbalancer/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull loadbalancer images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/loadbalancer/tasks/reconfigure.yml b/ansible/roles/loadbalancer/tasks/reconfigure.yml index 1f1ce6fc9b..ac21b50d35 100644 --- a/ansible/roles/loadbalancer/tasks/reconfigure.yml +++ b/ansible/roles/loadbalancer/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy loadbalancer - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/loadbalancer/tasks/stop.yml b/ansible/roles/loadbalancer/tasks/stop.yml index b622be6955..129defd933 100644 --- a/ansible/roles/loadbalancer/tasks/stop.yml +++ b/ansible/roles/loadbalancer/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop loadbalancer containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ loadbalancer_services }}" diff --git a/ansible/roles/loadbalancer/tasks/upgrade.yml b/ansible/roles/loadbalancer/tasks/upgrade.yml index 8ba054c477..1347277cb2 100644 --- a/ansible/roles/loadbalancer/tasks/upgrade.yml +++ b/ansible/roles/loadbalancer/tasks/upgrade.yml @@ -11,7 +11,7 @@ - inventory_hostname in groups['loadbalancer'] - name: Removing config for haproxy exporter - file: + ansible.builtin.file: path: "{{ node_config_directory }}/prometheus-haproxy-exporter" state: "absent" become: true @@ -20,7 +20,7 @@ # TODO(mnasiadka): Remove this task after Gazpacho release - name: Removing config for glance-tls-proxy - file: + ansible.builtin.file: path: "{{ node_config_directory }}/haproxy/services.d/glance-tls-proxy.cfg" state: "absent" become: true @@ -29,7 +29,7 @@ # TODO(mnasiadka): Remove this task after Gazpacho release - name: Removing config for neutron-tls-proxy - file: + ansible.builtin.file: path: "{{ node_config_directory }}/haproxy/services.d/neutron-tls-proxy.cfg" state: "absent" become: true @@ -38,7 +38,7 @@ # TODO(mnasiadka): Remove this task in Gazpacho/2026.1 release - name: Removing config for ironic-inspector - file: + ansible.builtin.file: path: "{{ node_config_directory }}/haproxy/services.d/ironic-inspector.cfg" state: "absent" become: true @@ -46,4 +46,4 @@ - inventory_hostname in groups['loadbalancer'] - name: Import tasks from deploy.yml - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/magnum/tasks/bootstrap.yml b/ansible/roles/magnum/tasks/bootstrap.yml index bc670bc2b5..a118922014 100644 --- a/ansible/roles/magnum/tasks/bootstrap.yml +++ b/ansible/roles/magnum/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run magnum bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/magnum/tasks/check-containers.yml b/ansible/roles/magnum/tasks/check-containers.yml index 73a1b07385..3c9f43f0a1 100644 --- a/ansible/roles/magnum/tasks/check-containers.yml +++ b/ansible/roles/magnum/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check magnum containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/magnum/tasks/check.yml b/ansible/roles/magnum/tasks/check.yml index cd4e4da1e7..31af5b9b9b 100644 --- a/ansible/roles/magnum/tasks/check.yml +++ b/ansible/roles/magnum/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Magnum containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/magnum/tasks/clone.yml b/ansible/roles/magnum/tasks/clone.yml index fac82c0c04..cf4a0ce5cf 100644 --- a/ansible/roles/magnum/tasks/clone.yml +++ b/ansible/roles/magnum/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning magnum source repository for development become: true - git: + ansible.builtin.git: repo: "{{ magnum_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ magnum_dev_repos_pull }}" diff --git a/ansible/roles/magnum/tasks/config.yml b/ansible/roles/magnum/tasks/config.yml index 5d609a6473..997e5eb33e 100644 --- a/ansible/roles/magnum/tasks/config.yml +++ b/ansible/roles/magnum/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,21 +22,21 @@ skip: true - name: Set magnum policy file - set_fact: + ansible.builtin.set_fact: magnum_policy_file: "{{ magnum_policy.results.0.stat.path | basename }}" magnum_policy_file_path: "{{ magnum_policy.results.0.stat.path }}" when: - magnum_policy.results | length > 0 - name: Check if kubeconfig file is supplied - stat: + ansible.builtin.stat: path: "{{ node_custom_config }}/magnum/kubeconfig" delegate_to: localhost run_once: true register: magnum_kubeconfig_file - name: Copying over kubeconfig file - template: + ansible.builtin.template: src: "{{ node_custom_config }}/magnum/kubeconfig" dest: "{{ node_config_directory }}/{{ item.key }}/kubeconfig" mode: "0660" @@ -46,18 +46,18 @@ with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}" - name: Set magnum kubeconfig file's path - set_fact: + ansible.builtin.set_fact: magnum_kubeconfig_file_path: "{{ magnum_kubeconfig_file.stat.path }}" when: - magnum_kubeconfig_file.stat.exists - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - magnum_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -65,7 +65,7 @@ with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}" - name: Configure uWSGI for Magnum - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ magnum_services }}" @@ -98,7 +98,7 @@ with_dict: "{{ magnum_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ magnum_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ magnum_policy_file }}" mode: "0660" diff --git a/ansible/roles/magnum/tasks/config_validate.yml b/ansible/roles/magnum/tasks/config_validate.yml index 310cfe3350..7b02992bec 100644 --- a/ansible/roles/magnum/tasks/config_validate.yml +++ b/ansible/roles/magnum/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate magnum configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ magnum_services }}" diff --git a/ansible/roles/magnum/tasks/copy-certs.yml b/ansible/roles/magnum/tasks/copy-certs.yml index c4a1757d78..4548f9af2b 100644 --- a/ansible/roles/magnum/tasks/copy-certs.yml +++ b/ansible/roles/magnum/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ magnum_services }}" diff --git a/ansible/roles/magnum/tasks/deploy-containers.yml b/ansible/roles/magnum/tasks/deploy-containers.yml index 925e5a81ea..3ff282ee1d 100644 --- a/ansible/roles/magnum/tasks/deploy-containers.yml +++ b/ansible/roles/magnum/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check magnum containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/magnum/tasks/deploy.yml b/ansible/roles/magnum/tasks/deploy.yml index b6a942a910..54b0f6f8fc 100644 --- a/ansible/roles/magnum/tasks/deploy.yml +++ b/ansible/roles/magnum/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register magnum in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure magnum - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check magnum containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone magnum repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: magnum_dev_mode | bool - name: Bootstrap magnum service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/magnum/tasks/loadbalancer.yml b/ansible/roles/magnum/tasks/loadbalancer.yml index 96e0ab7285..6f0e97337c 100644 --- a/ansible/roles/magnum/tasks/loadbalancer.yml +++ b/ansible/roles/magnum/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ magnum_services }}" diff --git a/ansible/roles/magnum/tasks/main.yml b/ansible/roles/magnum/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/magnum/tasks/main.yml +++ b/ansible/roles/magnum/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/magnum/tasks/precheck.yml b/ansible/roles/magnum/tasks/precheck.yml index 1280e5f6fe..591f432833 100644 --- a/ansible/roles/magnum/tasks/precheck.yml +++ b/ansible/roles/magnum/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck magnum configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ magnum_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Magnum API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ magnum_api_port }}" connect_timeout: 1 diff --git a/ansible/roles/magnum/tasks/pull.yml b/ansible/roles/magnum/tasks/pull.yml index cf8dd2be38..d5556ca803 100644 --- a/ansible/roles/magnum/tasks/pull.yml +++ b/ansible/roles/magnum/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull magnum images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/magnum/tasks/reconfigure.yml b/ansible/roles/magnum/tasks/reconfigure.yml index 97cde50f5a..090c9d95f6 100644 --- a/ansible/roles/magnum/tasks/reconfigure.yml +++ b/ansible/roles/magnum/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy magnum - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/magnum/tasks/register.yml b/ansible/roles/magnum/tasks/register.yml index 7667ca11b5..b36c7d762a 100644 --- a/ansible/roles/magnum/tasks/register.yml +++ b/ansible/roles/magnum/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register magnum service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_magnum_auth }}" diff --git a/ansible/roles/magnum/tasks/stop.yml b/ansible/roles/magnum/tasks/stop.yml index b530b121d9..527a26816f 100644 --- a/ansible/roles/magnum/tasks/stop.yml +++ b/ansible/roles/magnum/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop magnum containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ magnum_services }}" diff --git a/ansible/roles/magnum/tasks/upgrade.yml b/ansible/roles/magnum/tasks/upgrade.yml index bb79d4094a..ceb3b45af9 100644 --- a/ansible/roles/magnum/tasks/upgrade.yml +++ b/ansible/roles/magnum/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure magnum - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check magnum containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run magnum bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/manila/tasks/bootstrap.yml b/ansible/roles/manila/tasks/bootstrap.yml index 574c2333f9..442516518c 100644 --- a/ansible/roles/manila/tasks/bootstrap.yml +++ b/ansible/roles/manila/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run manila bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/manila/tasks/check-containers.yml b/ansible/roles/manila/tasks/check-containers.yml index 9e4ffa8b76..b969aaa970 100644 --- a/ansible/roles/manila/tasks/check-containers.yml +++ b/ansible/roles/manila/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check manila containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/manila/tasks/check.yml b/ansible/roles/manila/tasks/check.yml index 1b93701e01..c4acb6e1bb 100644 --- a/ansible/roles/manila/tasks/check.yml +++ b/ansible/roles/manila/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Manila containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/manila/tasks/clone.yml b/ansible/roles/manila/tasks/clone.yml index 8c4e3707c8..bc7a5a2f36 100644 --- a/ansible/roles/manila/tasks/clone.yml +++ b/ansible/roles/manila/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning manila source repository for development become: true - git: + ansible.builtin.git: repo: "{{ manila_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ manila_dev_repos_pull }}" diff --git a/ansible/roles/manila/tasks/config.yml b/ansible/roles/manila/tasks/config.yml index 989d97a6f2..8da02c7eef 100644 --- a/ansible/roles/manila/tasks/config.yml +++ b/ansible/roles/manila/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,13 +10,13 @@ with_dict: "{{ manila_services | select_services_enabled_and_mapped_to_host }}" - name: Include tasks from external_ceph.yml - include_tasks: external_ceph.yml + ansible.builtin.include_tasks: external_ceph.yml when: - (enable_manila_backend_cephfs_native | bool) or (enable_manila_backend_cephfs_nfs | bool) - inventory_hostname in groups['manila-share'] - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -28,19 +28,19 @@ skip: true - name: Set manila policy file - set_fact: + ansible.builtin.set_fact: manila_policy_file: "{{ manila_policy.results.0.stat.path | basename }}" manila_policy_file_path: "{{ manila_policy.results.0.stat.path }}" when: - manila_policy.results | length > 0 - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - manila_copy_certs | bool - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -85,7 +85,7 @@ - "manila-share" - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ manila_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ manila_policy_file }}" mode: "0660" diff --git a/ansible/roles/manila/tasks/config_validate.yml b/ansible/roles/manila/tasks/config_validate.yml index d65b00dc57..d83094f833 100644 --- a/ansible/roles/manila/tasks/config_validate.yml +++ b/ansible/roles/manila/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate manila configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ manila_services }}" diff --git a/ansible/roles/manila/tasks/copy-certs.yml b/ansible/roles/manila/tasks/copy-certs.yml index 483d8077bb..33416c2f58 100644 --- a/ansible/roles/manila/tasks/copy-certs.yml +++ b/ansible/roles/manila/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ manila_services }}" diff --git a/ansible/roles/manila/tasks/deploy-containers.yml b/ansible/roles/manila/tasks/deploy-containers.yml index ae5a18e99c..171f1d48eb 100644 --- a/ansible/roles/manila/tasks/deploy-containers.yml +++ b/ansible/roles/manila/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check manila containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/manila/tasks/deploy.yml b/ansible/roles/manila/tasks/deploy.yml index d4cde7633d..aced87fcbb 100644 --- a/ansible/roles/manila/tasks/deploy.yml +++ b/ansible/roles/manila/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Clone manila repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: manila_dev_mode | bool - name: Register manila in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure manila - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check manila containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Bootstrap manila service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/manila/tasks/external_ceph.yml b/ansible/roles/manila/tasks/external_ceph.yml index 84851e6b78..43a8a2908c 100644 --- a/ansible/roles/manila/tasks/external_ceph.yml +++ b/ansible/roles/manila/tasks/external_ceph.yml @@ -2,7 +2,7 @@ - name: Ensuring manila service ceph config subdir exists vars: service: "{{ manila_services['manila-share'] }}" - file: + ansible.builtin.file: path: "{{ node_config_directory }}/manila-share/ceph" state: "directory" owner: "{{ config_owner_user }}" @@ -25,7 +25,7 @@ with_items: "{{ manila_ceph_backends }}" - name: Copy over ceph Manila keyrings - template: + ansible.builtin.template: src: "{{ node_custom_config }}/manila/{{ item.cluster }}.client.{{ ceph_manila_user }}.keyring" dest: "{{ node_config_directory }}/manila-share/ceph/{{ item.cluster }}.client.{{ ceph_manila_user }}.keyring" mode: "0660" @@ -37,7 +37,7 @@ - name: Ensuring config directory has correct owner and permission become: true - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item }}" recurse: true owner: "{{ config_owner_user }}" diff --git a/ansible/roles/manila/tasks/loadbalancer.yml b/ansible/roles/manila/tasks/loadbalancer.yml index 270037d1db..7397c72a24 100644 --- a/ansible/roles/manila/tasks/loadbalancer.yml +++ b/ansible/roles/manila/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ manila_services }}" diff --git a/ansible/roles/manila/tasks/main.yml b/ansible/roles/manila/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/manila/tasks/main.yml +++ b/ansible/roles/manila/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/manila/tasks/precheck.yml b/ansible/roles/manila/tasks/precheck.yml index 04c7b799e7..672fcc1b4c 100644 --- a/ansible/roles/manila/tasks/precheck.yml +++ b/ansible/roles/manila/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck manila configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ manila_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Manila API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ manila_api_port }}" connect_timeout: 1 diff --git a/ansible/roles/manila/tasks/pull.yml b/ansible/roles/manila/tasks/pull.yml index 0e38e8ddeb..39b7e419e7 100644 --- a/ansible/roles/manila/tasks/pull.yml +++ b/ansible/roles/manila/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull manila images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/manila/tasks/reconfigure.yml b/ansible/roles/manila/tasks/reconfigure.yml index 4c6c147de8..080c2ebfe3 100644 --- a/ansible/roles/manila/tasks/reconfigure.yml +++ b/ansible/roles/manila/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy manila - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/manila/tasks/register.yml b/ansible/roles/manila/tasks/register.yml index 5e9f3cd404..eec1d6024f 100644 --- a/ansible/roles/manila/tasks/register.yml +++ b/ansible/roles/manila/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register manila service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_manila_auth }}" diff --git a/ansible/roles/manila/tasks/stop.yml b/ansible/roles/manila/tasks/stop.yml index 0b0528240d..8996e62bc8 100644 --- a/ansible/roles/manila/tasks/stop.yml +++ b/ansible/roles/manila/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop manila containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ manila_services }}" diff --git a/ansible/roles/manila/tasks/upgrade.yml b/ansible/roles/manila/tasks/upgrade.yml index 578c89afa3..17edd33e11 100644 --- a/ansible/roles/manila/tasks/upgrade.yml +++ b/ansible/roles/manila/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure manila - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check manila containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run manila bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/mariadb/handlers/main.yml b/ansible/roles/mariadb/handlers/main.yml index 5e1b68ae90..457abb48ff 100644 --- a/ansible/roles/mariadb/handlers/main.yml +++ b/ansible/roles/mariadb/handlers/main.yml @@ -21,7 +21,7 @@ # NOTE(yoctozepto): We have to loop this to avoid breaking on connection resets - name: Wait for first MariaDB service port liveness - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 @@ -52,12 +52,12 @@ listen: Bootstrap MariaDB cluster - name: Ensure MariaDB is running normally on bootstrap host - group_by: + ansible.builtin.group_by: key: mariadb_bootstrap_restart listen: Bootstrap MariaDB cluster - name: Restart MariaDB on existing cluster members - group_by: + ansible.builtin.group_by: key: mariadb_restart when: - groups[mariadb_shard_group + '_port_alive_True'] is defined @@ -65,7 +65,7 @@ listen: Restart mariadb container - name: Start MariaDB on new nodes - group_by: + ansible.builtin.group_by: key: mariadb_start when: - bootstrap_host is not defined or bootstrap_host != inventory_hostname diff --git a/ansible/roles/mariadb/tasks/bootstrap.yml b/ansible/roles/mariadb/tasks/bootstrap.yml index 5abd32746a..580537df84 100644 --- a/ansible/roles/mariadb/tasks/bootstrap.yml +++ b/ansible/roles/mariadb/tasks/bootstrap.yml @@ -1,13 +1,13 @@ --- - name: Import tasks from lookup_cluster.yml - import_tasks: lookup_cluster.yml + ansible.builtin.import_tasks: lookup_cluster.yml - name: Include tasks from bootstrap_cluster.yml - include_tasks: bootstrap_cluster.yml + ansible.builtin.include_tasks: bootstrap_cluster.yml when: - not mariadb_cluster_exists - inventory_hostname == groups[mariadb_shard_group][0] - name: Include tasks from recover_cluster.yml - include_tasks: recover_cluster.yml + ansible.builtin.include_tasks: recover_cluster.yml when: mariadb_recover | default(False) diff --git a/ansible/roles/mariadb/tasks/bootstrap_cluster.yml b/ansible/roles/mariadb/tasks/bootstrap_cluster.yml index 34c463cb83..600fc579f4 100644 --- a/ansible/roles/mariadb/tasks/bootstrap_cluster.yml +++ b/ansible/roles/mariadb/tasks/bootstrap_cluster.yml @@ -23,5 +23,5 @@ - Bootstrap MariaDB cluster - name: Store bootstrap host name into facts - set_fact: + ansible.builtin.set_fact: bootstrap_host: "{{ inventory_hostname }}" diff --git a/ansible/roles/mariadb/tasks/check-containers.yml b/ansible/roles/mariadb/tasks/check-containers.yml index a5e39352f1..a33e8c0e36 100644 --- a/ansible/roles/mariadb/tasks/check-containers.yml +++ b/ansible/roles/mariadb/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check mariadb containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/mariadb/tasks/check.yml b/ansible/roles/mariadb/tasks/check.yml index 78d5e481d2..839d6d8382 100644 --- a/ansible/roles/mariadb/tasks/check.yml +++ b/ansible/roles/mariadb/tasks/check.yml @@ -1,6 +1,6 @@ --- - name: Checking Mariadb containers - import_role: + ansible.builtin.import_role: role: service-check - name: Wait for MariaDB service to be ready through VIP diff --git a/ansible/roles/mariadb/tasks/config.yml b/ansible/roles/mariadb/tasks/config.yml index d456613b60..1a80551109 100644 --- a/ansible/roles/mariadb/tasks/config.yml +++ b/ansible/roles/mariadb/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ mariadb_services | select_services_enabled_and_mapped_to_host }}" - name: Ensuring database backup config directory exists - file: + ansible.builtin.file: path: "{{ node_config_directory }}/mariabackup" state: "directory" owner: "{{ config_owner_user }}" @@ -37,7 +37,7 @@ - inventory_hostname == mariadb_backup_host - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -47,7 +47,7 @@ - name: Copying over config.json files for mariabackup vars: service_name: "mariabackup" - template: + ansible.builtin.template: src: "{{ service_name }}.json.j2" dest: "{{ node_config_directory }}/{{ service_name }}/config.json" mode: "0660" @@ -87,6 +87,6 @@ - service | service_enabled_and_mapped_to_host - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - mariadb_copy_certs | bool diff --git a/ansible/roles/mariadb/tasks/copy-certs.yml b/ansible/roles/mariadb/tasks/copy-certs.yml index e1f6cd766a..1c385e6d1c 100644 --- a/ansible/roles/mariadb/tasks/copy-certs.yml +++ b/ansible/roles/mariadb/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ mariadb_services }}" diff --git a/ansible/roles/mariadb/tasks/deploy-containers.yml b/ansible/roles/mariadb/tasks/deploy-containers.yml index 4cf3b72226..73d1d91e75 100644 --- a/ansible/roles/mariadb/tasks/deploy-containers.yml +++ b/ansible/roles/mariadb/tasks/deploy-containers.yml @@ -1,7 +1,7 @@ --- - name: Check mariadb containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml # NOTE(yoctozepto): handlers prerequisite - name: Import tasks from lookup_cluster.yml - import_tasks: lookup_cluster.yml + ansible.builtin.import_tasks: lookup_cluster.yml diff --git a/ansible/roles/mariadb/tasks/deploy.yml b/ansible/roles/mariadb/tasks/deploy.yml index 559433982a..b4346e2392 100644 --- a/ansible/roles/mariadb/tasks/deploy.yml +++ b/ansible/roles/mariadb/tasks/deploy.yml @@ -1,15 +1,15 @@ --- - name: Configure mariadb - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check mariadb containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Import tasks from recover_cluster.yml - import_tasks: recover_cluster.yml + ansible.builtin.import_tasks: recover_cluster.yml vars: mariadb_cluster_exists: true when: migration_flag is defined - name: Bootstrap mariadb service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml diff --git a/ansible/roles/mariadb/tasks/loadbalancer.yml b/ansible/roles/mariadb/tasks/loadbalancer.yml index 9bfa2ac6c9..feceae28b5 100644 --- a/ansible/roles/mariadb/tasks/loadbalancer.yml +++ b/ansible/roles/mariadb/tasks/loadbalancer.yml @@ -41,7 +41,7 @@ run_once: true - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ mariadb_services }}" diff --git a/ansible/roles/mariadb/tasks/lookup_cluster.yml b/ansible/roles/mariadb/tasks/lookup_cluster.yml index d65ae3a0fb..5ad7b0f193 100644 --- a/ansible/roles/mariadb/tasks/lookup_cluster.yml +++ b/ansible/roles/mariadb/tasks/lookup_cluster.yml @@ -9,19 +9,19 @@ when: migration_flag is not defined - name: Divide hosts by their MariaDB volume availability - group_by: + ansible.builtin.group_by: key: "{{ mariadb_shard_group }}_had_volume_{{ mariadb_volume is not changed }}" changed_when: false - name: Establish whether the cluster has already existed - set_fact: + ansible.builtin.set_fact: mariadb_cluster_exists: "{{ groups[mariadb_shard_group + '_had_volume_True'] is defined }}" - name: Check MariaDB port liveness and cluster status when: not mariadb_recover | default(False) block: - name: Check MariaDB service port liveness - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 @@ -31,12 +31,12 @@ ignore_errors: true - name: Divide hosts by their MariaDB service port liveness - group_by: + ansible.builtin.group_by: key: "{{ mariadb_shard_group }}_port_alive_{{ check_mariadb_port_liveness is success }}" changed_when: false - name: Fail on existing but stopped cluster - fail: + ansible.builtin.fail: msg: MariaDB cluster exists but is stopped. Please start it using kolla-ansible mariadb-recovery when: # NOTE(yoctozepto): we allow single-node cluster to start @@ -65,16 +65,16 @@ register: check_mariadb_sync_status - name: Extract MariaDB service WSREP sync status - set_fact: + ansible.builtin.set_fact: mariadb_sync_status: "{{ check_mariadb_sync_status.query_result[0][0]['Value'] }}" - name: Divide hosts by their MariaDB service WSREP sync status - group_by: + ansible.builtin.group_by: key: "{{ mariadb_shard_group }}_sync_status_{{ mariadb_sync_status | default('NA') }}" changed_when: false - name: Fail when MariaDB services are not synced across the whole cluster - fail: + ansible.builtin.fail: msg: MariaDB cluster is not synced. Please wait for WSREP sync before proceeding. when: - groups[mariadb_shard_group + '_port_alive_True'] is defined diff --git a/ansible/roles/mariadb/tasks/main.yml b/ansible/roles/mariadb/tasks/main.yml index ff69fc2da2..4591988dac 100644 --- a/ansible/roles/mariadb/tasks/main.yml +++ b/ansible/roles/mariadb/tasks/main.yml @@ -1,10 +1,10 @@ --- - name: Group MariaDB hosts based on shards - add_host: + ansible.builtin.add_host: name: "{{ item }}" groups: "{{ hostvars[item]['mariadb_shard_group'] }}" loop: "{{ groups['mariadb'] }}" changed_when: false - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/mariadb/tasks/post-deploy.yml b/ansible/roles/mariadb/tasks/post-deploy.yml index 929abd7fb2..6d90d08fb6 100644 --- a/ansible/roles/mariadb/tasks/post-deploy.yml +++ b/ansible/roles/mariadb/tasks/post-deploy.yml @@ -1,6 +1,6 @@ --- - name: Import tasks from register.yml - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Import tasks from check.yml - import_tasks: check.yml + ansible.builtin.import_tasks: check.yml diff --git a/ansible/roles/mariadb/tasks/precheck.yml b/ansible/roles/mariadb/tasks/precheck.yml index e3d5448dd7..205b0fdc3c 100644 --- a/ansible/roles/mariadb/tasks/precheck.yml +++ b/ansible/roles/mariadb/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck mariadb configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ mariadb_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for MariaDB - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 @@ -27,7 +27,7 @@ - container_facts.containers['mariadb'] is not defined - name: Checking free port for MariaDB WSREP - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_wsrep_port }}" connect_timeout: 1 @@ -37,7 +37,7 @@ - container_facts.containers['mariadb'] is not defined - name: Checking free port for MariaDB IST - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_ist_port }}" connect_timeout: 1 @@ -47,7 +47,7 @@ - container_facts.containers['mariadb'] is not defined - name: Checking free port for MariaDB SST - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_sst_port }}" connect_timeout: 1 diff --git a/ansible/roles/mariadb/tasks/pull.yml b/ansible/roles/mariadb/tasks/pull.yml index 89764ee736..62f8a0a53c 100644 --- a/ansible/roles/mariadb/tasks/pull.yml +++ b/ansible/roles/mariadb/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull mariadb images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/mariadb/tasks/reconfigure.yml b/ansible/roles/mariadb/tasks/reconfigure.yml index 3d878dca8a..44032ee21a 100644 --- a/ansible/roles/mariadb/tasks/reconfigure.yml +++ b/ansible/roles/mariadb/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy mariadb - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/mariadb/tasks/recover_cluster.yml b/ansible/roles/mariadb/tasks/recover_cluster.yml index 47614d7124..16f0d05fc4 100644 --- a/ansible/roles/mariadb/tasks/recover_cluster.yml +++ b/ansible/roles/mariadb/tasks/recover_cluster.yml @@ -1,11 +1,11 @@ --- - name: Checking for mariadb cluster - fail: + ansible.builtin.fail: msg: "MariaDB cluster was not found. Is your inventory correct?" when: not mariadb_cluster_exists - name: Cleaning up temp file on localhost - file: + ansible.builtin.file: path: "{{ item }}" state: absent delegate_to: localhost @@ -48,31 +48,31 @@ - name: Copying MariaDB log file to /tmp become: true changed_when: true - command: "cp {{ container_engine_volumes_path }}/kolla_logs/_data/mariadb/mariadb.log /tmp/mariadb_tmp.log" + ansible.builtin.command: "cp {{ container_engine_volumes_path }}/kolla_logs/_data/mariadb/mariadb.log /tmp/mariadb_tmp.log" # Look for sequence number in logs. Format is: # WSREP: Recovered position: :. - name: Get MariaDB wsrep recovery seqno become: true changed_when: false - shell: awk -F" " '/Recovered position/{seqno=$NF} END{split(seqno, a, ":"); print a[2]}' /tmp/mariadb_tmp.log + ansible.builtin.shell: awk -F" " '/Recovered position/{seqno=$NF} END{split(seqno, a, ":"); print a[2]}' /tmp/mariadb_tmp.log register: wsrep_recovery_seqno - name: Removing MariaDB log file from /tmp become: true - file: + ansible.builtin.file: path: /tmp/mariadb_tmp.log state: absent changed_when: false check_mode: false - name: Registering MariaDB seqno variable - set_fact: + ansible.builtin.set_fact: seqno: "{{ wsrep_recovery_seqno.stdout_lines[0] }}" changed_when: false - name: Comparing seqno value on all mariadb hosts - shell: + ansible.builtin.shell: cmd: | if [[ ! -z {{ hostvars[inventory_hostname]['seqno'] }} && ! -z {{ hostvars[item]['seqno'] }} && {{ hostvars[inventory_hostname]['seqno'] }} =~ ^-?[0-9]+$ && {{ hostvars[item]['seqno'] }} =~ ^-?[0-9]+$ && @@ -84,7 +84,7 @@ changed_when: false - name: Writing hostname of host with the largest seqno to temp file - template: + ansible.builtin.template: src: "hostname.j2" dest: "{{ mariadb_recover_tmp_file_path }}" mode: "0644" @@ -95,16 +95,16 @@ - name: Registering mariadb_recover_inventory_name from temp file connection: local - set_fact: + ansible.builtin.set_fact: mariadb_recover_inventory_name: "{{ lookup('file', mariadb_recover_tmp_file_path) }}" - name: Store bootstrap and master hostnames into facts - set_fact: + ansible.builtin.set_fact: bootstrap_host: "{{ mariadb_recover_inventory_name }}" - name: Set grastate.dat file from MariaDB container in bootstrap host become: true - lineinfile: + ansible.builtin.lineinfile: create: true dest: "{{ container_engine_volumes_path }}/mariadb/_data/grastate.dat" mode: "0660" @@ -150,7 +150,7 @@ - bootstrap_host == inventory_hostname - name: Wait for first MariaDB container - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 @@ -201,7 +201,7 @@ - bootstrap_host != inventory_hostname - name: Wait for slave MariaDB - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 @@ -249,7 +249,7 @@ - bootstrap_host == inventory_hostname - name: Wait for MariaDB - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 @@ -261,4 +261,4 @@ delay: 6 - name: Import tasks from check.yml - import_tasks: check.yml + ansible.builtin.import_tasks: check.yml diff --git a/ansible/roles/mariadb/tasks/restart_services.yml b/ansible/roles/mariadb/tasks/restart_services.yml index e864c3fa4b..37d9252e11 100644 --- a/ansible/roles/mariadb/tasks/restart_services.yml +++ b/ansible/roles/mariadb/tasks/restart_services.yml @@ -16,7 +16,7 @@ # NOTE(yoctozepto): We have to loop this to avoid breaking on connection resets - name: Wait for MariaDB service port liveness - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ mariadb_port }}" connect_timeout: 1 diff --git a/ansible/roles/mariadb/tasks/stop.yml b/ansible/roles/mariadb/tasks/stop.yml index 2a0485876c..ab11948fd4 100644 --- a/ansible/roles/mariadb/tasks/stop.yml +++ b/ansible/roles/mariadb/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop mariadb containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ mariadb_services }}" diff --git a/ansible/roles/mariadb/tasks/upgrade.yml b/ansible/roles/mariadb/tasks/upgrade.yml index 5409b32e53..5b8b1a84f2 100644 --- a/ansible/roles/mariadb/tasks/upgrade.yml +++ b/ansible/roles/mariadb/tasks/upgrade.yml @@ -3,13 +3,13 @@ become: true changed_when: true no_log: true - shell: > + ansible.builtin.shell: > {{ kolla_container_engine }} exec {{ mariadb_service.container_name }} mariadb -uroot -p{{ database_password }} -e "SET GLOBAL wsrep_sst_method='rsync';" - name: Import tasks from deploy.yml - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml vars: mariadb_wsrep_sst_method: "rsync" @@ -17,13 +17,13 @@ become: true changed_when: true no_log: true - shell: > + ansible.builtin.shell: > {{ kolla_container_engine }} exec {{ mariadb_service.container_name }} mariadb -uroot -p{{ database_password }} -e "SET GLOBAL wsrep_sst_method='mariabackup';" - name: Import tasks from deploy.yml - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml # TODO(seunghun1ee): Remove this task after 2026.1 - name: "Stop and remove mariadb_clustercheck containers" diff --git a/ansible/roles/masakari/tasks/bootstrap.yml b/ansible/roles/masakari/tasks/bootstrap.yml index dfaa720d0c..533ed862df 100644 --- a/ansible/roles/masakari/tasks/bootstrap.yml +++ b/ansible/roles/masakari/tasks/bootstrap.yml @@ -38,4 +38,4 @@ - not use_preconfigured_databases | bool - name: Run masakari bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml diff --git a/ansible/roles/masakari/tasks/check-containers.yml b/ansible/roles/masakari/tasks/check-containers.yml index 4641a358bc..37d9560397 100644 --- a/ansible/roles/masakari/tasks/check-containers.yml +++ b/ansible/roles/masakari/tasks/check-containers.yml @@ -1,4 +1,4 @@ --- - name: Check masakari containers - import_role: + ansible.builtin.import_role: name: service-check-containers diff --git a/ansible/roles/masakari/tasks/check.yml b/ansible/roles/masakari/tasks/check.yml index c9425eba07..d7544640c5 100644 --- a/ansible/roles/masakari/tasks/check.yml +++ b/ansible/roles/masakari/tasks/check.yml @@ -1,4 +1,4 @@ --- - name: Checking Masakari containers - import_role: + ansible.builtin.import_role: role: service-check diff --git a/ansible/roles/masakari/tasks/clone.yml b/ansible/roles/masakari/tasks/clone.yml index d64faaf992..3d34fd86f9 100644 --- a/ansible/roles/masakari/tasks/clone.yml +++ b/ansible/roles/masakari/tasks/clone.yml @@ -1,7 +1,7 @@ --- - name: Cloning masakari source repository for development become: true - git: + ansible.builtin.git: repo: "{{ masakari_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" update: "{{ masakari_dev_repos_pull }}" @@ -9,7 +9,7 @@ - name: Cloning masakari monitors source repository for development become: true - git: + ansible.builtin.git: repo: "{{ masakari_monitors_git_repository }}" dest: "{{ kolla_dev_repos_directory }}/masakari-monitors" update: "{{ masakari_monitors_dev_repos_pull }}" diff --git a/ansible/roles/masakari/tasks/config.yml b/ansible/roles/masakari/tasks/config.yml index ecdc3f9097..350648efb9 100644 --- a/ansible/roles/masakari/tasks/config.yml +++ b/ansible/roles/masakari/tasks/config.yml @@ -1,6 +1,6 @@ --- - name: Ensuring config directories exist - file: + ansible.builtin.file: path: "{{ node_config_directory }}/{{ item.key }}" state: "directory" owner: "{{ config_owner_user }}" @@ -10,7 +10,7 @@ with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}" - name: Check if policies shall be overwritten - stat: + ansible.builtin.stat: path: "{{ item }}" delegate_to: localhost run_once: true @@ -22,14 +22,14 @@ skip: true - name: Set masakari policy file - set_fact: + ansible.builtin.set_fact: masakari_policy_file: "{{ masakari_policy.results.0.stat.path | basename }}" masakari_policy_file_path: "{{ masakari_policy.results.0.stat.path }}" when: - masakari_policy.results | length > 0 - name: Copying over existing policy file - template: + ansible.builtin.template: src: "{{ masakari_policy_file_path }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ masakari_policy_file }}" mode: "0660" @@ -39,7 +39,7 @@ with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over config.json files for services - template: + ansible.builtin.template: src: "{{ item.key }}.json.j2" dest: "{{ node_config_directory }}/{{ item.key }}/config.json" mode: "0660" @@ -47,7 +47,7 @@ with_dict: "{{ masakari_services | select_services_enabled_and_mapped_to_host }}" - name: Copying over TLS certificates - include_tasks: copy-certs.yml + ansible.builtin.include_tasks: copy-certs.yml when: - masakari_copy_certs | bool @@ -92,7 +92,7 @@ - name: Copying over wsgi-masakari file for services vars: service: "{{ masakari_services['masakari-api'] }}" - template: + ansible.builtin.template: src: "wsgi-masakari.conf.j2" dest: "{{ node_config_directory }}/masakari-api/wsgi-masakari.conf" mode: "0660" @@ -102,7 +102,7 @@ - masakari_wsgi_provider == "apache" - name: "Configure uWSGI for Masakari" - include_role: + ansible.builtin.include_role: name: service-uwsgi-config vars: project_services: "{{ masakari_services }}" @@ -134,7 +134,7 @@ vars: service_name: "{{ item.service }}" service: "{{ masakari_services[service_name] }}" - template: + ansible.builtin.template: src: "{{ item.src }}" dest: "{{ node_config_directory }}/{{ service_name }}/{{ item.dest }}" mode: "0660" diff --git a/ansible/roles/masakari/tasks/config_validate.yml b/ansible/roles/masakari/tasks/config_validate.yml index 47c4cf296a..865aa9e28b 100644 --- a/ansible/roles/masakari/tasks/config_validate.yml +++ b/ansible/roles/masakari/tasks/config_validate.yml @@ -1,6 +1,6 @@ --- - name: Validate masakari configuration - import_role: + ansible.builtin.import_role: name: service-config-validate vars: service_config_validate_services: "{{ masakari_services }}" diff --git a/ansible/roles/masakari/tasks/copy-certs.yml b/ansible/roles/masakari/tasks/copy-certs.yml index 84e7656a56..c8689afa6f 100644 --- a/ansible/roles/masakari/tasks/copy-certs.yml +++ b/ansible/roles/masakari/tasks/copy-certs.yml @@ -1,6 +1,6 @@ --- - name: "Copy certificates and keys for {{ project_name }}" - import_role: + ansible.builtin.import_role: role: service-cert-copy vars: project_services: "{{ masakari_services }}" diff --git a/ansible/roles/masakari/tasks/deploy-containers.yml b/ansible/roles/masakari/tasks/deploy-containers.yml index f2d99663cd..10228852fe 100644 --- a/ansible/roles/masakari/tasks/deploy-containers.yml +++ b/ansible/roles/masakari/tasks/deploy-containers.yml @@ -1,3 +1,3 @@ --- - name: Check masakari containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml diff --git a/ansible/roles/masakari/tasks/deploy.yml b/ansible/roles/masakari/tasks/deploy.yml index 095e792546..862684ba66 100644 --- a/ansible/roles/masakari/tasks/deploy.yml +++ b/ansible/roles/masakari/tasks/deploy.yml @@ -1,19 +1,19 @@ --- - name: Register masakari in Keystone - import_tasks: register.yml + ansible.builtin.import_tasks: register.yml - name: Configure masakari - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check masakari containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Clone masakari repository - include_tasks: clone.yml + ansible.builtin.include_tasks: clone.yml when: masakari_dev_mode | bool - name: Bootstrap masakari service - import_tasks: bootstrap.yml + ansible.builtin.import_tasks: bootstrap.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/masakari/tasks/loadbalancer.yml b/ansible/roles/masakari/tasks/loadbalancer.yml index 8b07fdb758..44a565fb02 100644 --- a/ansible/roles/masakari/tasks/loadbalancer.yml +++ b/ansible/roles/masakari/tasks/loadbalancer.yml @@ -1,6 +1,6 @@ --- - name: "Configure loadbalancer for {{ project_name }}" - import_role: + ansible.builtin.import_role: name: loadbalancer-config vars: project_services: "{{ masakari_services }}" diff --git a/ansible/roles/masakari/tasks/main.yml b/ansible/roles/masakari/tasks/main.yml index 7a1d916c4a..594ad5d851 100644 --- a/ansible/roles/masakari/tasks/main.yml +++ b/ansible/roles/masakari/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: "Include tasks for action {{ kolla_action }}" - include_tasks: "{{ kolla_action }}.yml" + ansible.builtin.include_tasks: "{{ kolla_action }}.yml" diff --git a/ansible/roles/masakari/tasks/precheck.yml b/ansible/roles/masakari/tasks/precheck.yml index 810795c6a3..cbf5ee3831 100644 --- a/ansible/roles/masakari/tasks/precheck.yml +++ b/ansible/roles/masakari/tasks/precheck.yml @@ -1,6 +1,6 @@ --- - name: Precheck masakari configuration - import_role: + ansible.builtin.import_role: name: service-precheck vars: service_precheck_services: "{{ masakari_services }}" @@ -17,7 +17,7 @@ register: container_facts - name: Checking free port for Masakari API - wait_for: + ansible.builtin.wait_for: host: "{{ api_interface_address }}" port: "{{ masakari_api_port }}" connect_timeout: 1 @@ -29,7 +29,7 @@ - name: Checking for coordination backend if running in multinode setup run_once: true - fail: + ansible.builtin.fail: msg: "Please enable Valkey or etcd when running in multinode scenario." when: - masakari_coordination_backend == '' diff --git a/ansible/roles/masakari/tasks/pull.yml b/ansible/roles/masakari/tasks/pull.yml index e8f8e947f0..38e3c2d362 100644 --- a/ansible/roles/masakari/tasks/pull.yml +++ b/ansible/roles/masakari/tasks/pull.yml @@ -1,4 +1,4 @@ --- - name: Pull masakari images - import_role: + ansible.builtin.import_role: role: service-images-pull diff --git a/ansible/roles/masakari/tasks/reconfigure.yml b/ansible/roles/masakari/tasks/reconfigure.yml index abf777d94e..2e2543581e 100644 --- a/ansible/roles/masakari/tasks/reconfigure.yml +++ b/ansible/roles/masakari/tasks/reconfigure.yml @@ -1,3 +1,3 @@ --- - name: Deploy masakari - import_tasks: deploy.yml + ansible.builtin.import_tasks: deploy.yml diff --git a/ansible/roles/masakari/tasks/register.yml b/ansible/roles/masakari/tasks/register.yml index 756cba4467..a891fc1826 100644 --- a/ansible/roles/masakari/tasks/register.yml +++ b/ansible/roles/masakari/tasks/register.yml @@ -1,6 +1,6 @@ --- - name: Register masakari service, endpoints, and users in Keystone - import_role: + ansible.builtin.import_role: name: service-ks-register vars: service_ks_register_auth: "{{ openstack_masakari_auth }}" diff --git a/ansible/roles/masakari/tasks/stop.yml b/ansible/roles/masakari/tasks/stop.yml index 512628c2ab..b5d4e49a75 100644 --- a/ansible/roles/masakari/tasks/stop.yml +++ b/ansible/roles/masakari/tasks/stop.yml @@ -1,6 +1,6 @@ --- - name: Stop masakari containers - import_role: + ansible.builtin.import_role: name: service-stop vars: project_services: "{{ masakari_services }}" diff --git a/ansible/roles/masakari/tasks/upgrade.yml b/ansible/roles/masakari/tasks/upgrade.yml index 3afa14573c..74a9cb1f37 100644 --- a/ansible/roles/masakari/tasks/upgrade.yml +++ b/ansible/roles/masakari/tasks/upgrade.yml @@ -1,12 +1,12 @@ --- - name: Configure masakari - import_tasks: config.yml + ansible.builtin.import_tasks: config.yml - name: Check masakari containers - import_tasks: check-containers.yml + ansible.builtin.import_tasks: check-containers.yml - name: Run masakari bootstrap container - import_tasks: bootstrap_service.yml + ansible.builtin.import_tasks: bootstrap_service.yml - name: Flush handlers - meta: flush_handlers + ansible.builtin.meta: flush_handlers diff --git a/ansible/roles/nova-cell/tasks/version-check.yml b/ansible/roles/nova-cell/tasks/version-check.yml index 2626aada76..8b94614519 100644 --- a/ansible/roles/nova-cell/tasks/version-check.yml +++ b/ansible/roles/nova-cell/tasks/version-check.yml @@ -46,32 +46,25 @@ name: - "{{ service.container_name }}" register: container_facts_per_host - run_once: true - delegate_to: "{{ item }}" - loop: "{{ groups[service.group] }}" - loop_control: - label: "{{ item }}" + when: inventory_hostname in groups[service.group] - name: Get current Libvirt version + any_errors_fatal: true become: true command: "{{ kolla_container_engine }} exec {{ service.container_name }} libvirtd --version" register: libvirt_version_current_results changed_when: false - run_once: true - delegate_to: "{{ item.item }}" - loop: "{{ container_facts_per_host.results }}" - loop_control: - label: "{{ item.item }}" when: - - item.containers[service.container_name] is defined - - item.containers[service.container_name].State.Running + - container_facts_per_host is not skipped + - container_facts_per_host.containers[service.container_name] is defined - (hostvars[groups[service.group] | first].service_image_info.images | default([]) | length) > 0 - - item.containers[service.container_name].Image + - container_facts_per_host.containers[service.container_name].Image != hostvars[groups[service.group] | first].service_image_info.images[0].Id - name: Check that the new Libvirt version is >= current + any_errors_fatal: true vars: - current_version: "{{ item.stdout | regex_search('[0-9]+\\.[0-9]+\\.[0-9]+') }}" + current_version: "{{ libvirt_version_current_results.stdout | regex_search('[0-9]+\\.[0-9]+\\.[0-9]+') }}" new_version: "{{ hostvars[groups[service.group] | first].libvirt_new_version }}" assert: that: "{{ new_version is version(current_version, '>=', strict=true) }}" @@ -81,8 +74,4 @@ that you want to do this, please skip the tag `nova-libvirt-version-check`. success_msg: > Libvirt version check successful: target {{ new_version }} >= current {{ current_version }}. - run_once: true - loop: "{{ libvirt_version_current_results.results }}" - loop_control: - label: "{{ item.item }}" - when: item.stdout is defined + when: libvirt_version_current_results is not skipped diff --git a/ansible/roles/prometheus-node-exporters/templates/prometheus-cadvisor.json.j2 b/ansible/roles/prometheus-node-exporters/templates/prometheus-cadvisor.json.j2 index 21463e4335..7b00cfa5a3 100644 --- a/ansible/roles/prometheus-node-exporters/templates/prometheus-cadvisor.json.j2 +++ b/ansible/roles/prometheus-node-exporters/templates/prometheus-cadvisor.json.j2 @@ -1,5 +1,5 @@ { - "command": "/opt/cadvisor --port={{ prometheus_cadvisor_port }} --log_dir=/var/log/kolla/prometheus{% if prometheus_cadvisor_cmdline_extras %} {{ prometheus_cadvisor_cmdline_extras }}{% endif %}", + "command": "/opt/cadvisor --port={{ prometheus_cadvisor_port }} --log_dir=/var/log/kolla/prometheus --listen_ip {{ 'api' | kolla_address(inventory_hostname) }}{% if prometheus_cadvisor_cmdline_extras %} {{ prometheus_cadvisor_cmdline_extras }}{% endif %}", "config_files": [ {% if kolla_copy_ca_into_containers | bool %} { diff --git a/ansible/roles/skyline/templates/nginx.conf.j2 b/ansible/roles/skyline/templates/nginx.conf.j2 index 711c7fbe63..4a647fbe58 100644 --- a/ansible/roles/skyline/templates/nginx.conf.j2 +++ b/ansible/roles/skyline/templates/nginx.conf.j2 @@ -38,6 +38,12 @@ http { ssl_certificate {{ skyline_ssl_certfile }}; ssl_certificate_key {{ skyline_ssl_keyfile }}; {% endif %} + + {% if internal_protocol == 'https' %} + proxy_ssl_protocols TLSv1.2 TLSv1.3; + proxy_ssl_server_name on; + {% endif %} + ## # Logging Settings ## diff --git a/ansible/site.yml b/ansible/site.yml index 4167c041b9..f37939f37d 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -14,12 +14,12 @@ default(100) }} tasks: - name: Group hosts based on Kolla action - group_by: + ansible.builtin.group_by: key: "kolla_action_{{ kolla_action }}" changed_when: false - name: Group hosts based on enabled services - group_by: + ansible.builtin.group_by: key: "{{ item }}" changed_when: false with_items: @@ -150,156 +150,156 @@ - kolla_action in ['deploy', 'reconfigure', 'upgrade', 'config'] block: - name: Configure loadbalancer for aodh - include_role: + ansible.builtin.include_role: name: aodh tasks_from: loadbalancer tags: aodh when: enable_aodh | bool - name: Configure loadbalancer for barbican - include_role: + ansible.builtin.include_role: name: barbican tasks_from: loadbalancer tags: barbican when: enable_barbican | bool - name: Configure loadbalancer for blazar - include_role: + ansible.builtin.include_role: name: blazar tasks_from: loadbalancer tags: blazar when: enable_blazar | bool - name: Configure loadbalancer for ceph-rgw - include_role: + ansible.builtin.include_role: name: ceph-rgw tasks_from: loadbalancer tags: ceph-rgw when: enable_ceph_rgw | bool - name: Configure loadbalancer for cinder - include_role: + ansible.builtin.include_role: name: cinder tasks_from: loadbalancer tags: cinder when: enable_cinder | bool - name: Configure loadbalancer for cloudkitty - include_role: + ansible.builtin.include_role: name: cloudkitty tasks_from: loadbalancer tags: cloudkitty when: enable_cloudkitty | bool - name: Configure loadbalancer for cyborg - include_role: + ansible.builtin.include_role: name: cyborg tasks_from: loadbalancer tags: cyborg when: enable_cyborg | bool - name: Configure loadbalancer for designate - include_role: + ansible.builtin.include_role: name: designate tasks_from: loadbalancer tags: designate when: enable_designate | bool - name: Configure loadbalancer for etcd - include_role: + ansible.builtin.include_role: name: etcd tasks_from: loadbalancer tags: etcd when: enable_etcd | bool - name: Configure loadbalancer for glance - include_role: + ansible.builtin.include_role: name: glance tasks_from: loadbalancer tags: glance when: enable_glance | bool - name: Configure loadbalancer for gnocchi - include_role: + ansible.builtin.include_role: name: gnocchi tasks_from: loadbalancer tags: gnocchi when: enable_gnocchi | bool - name: Configure loadbalancer for grafana - include_role: + ansible.builtin.include_role: name: grafana tasks_from: loadbalancer tags: grafana when: enable_grafana | bool - name: Configure loadbalancer for heat - include_role: + ansible.builtin.include_role: name: heat tasks_from: loadbalancer tags: heat when: enable_heat | bool - name: Configure loadbalancer for horizon - include_role: + ansible.builtin.include_role: name: horizon tasks_from: loadbalancer tags: horizon when: enable_horizon | bool - name: Configure loadbalancer for ironic - include_role: + ansible.builtin.include_role: name: ironic tasks_from: loadbalancer tags: ironic when: enable_ironic | bool - name: Configure loadbalancer for keystone - include_role: + ansible.builtin.include_role: name: keystone tasks_from: loadbalancer tags: keystone when: enable_keystone | bool - name: Configure loadbalancer for letsencrypt - include_role: + ansible.builtin.include_role: name: letsencrypt tasks_from: loadbalancer tags: letsencrypt when: enable_letsencrypt | bool - name: Configure loadbalancer for magnum - include_role: + ansible.builtin.include_role: name: magnum tasks_from: loadbalancer tags: magnum when: enable_magnum | bool - name: Configure loadbalancer for manila - include_role: + ansible.builtin.include_role: name: manila tasks_from: loadbalancer tags: manila when: enable_manila | bool - name: Configure loadbalancer for mariadb - include_role: + ansible.builtin.include_role: name: mariadb tasks_from: loadbalancer tags: mariadb when: enable_mariadb | bool or enable_external_mariadb_load_balancer | bool - name: Configure loadbalancer for masakari - include_role: + ansible.builtin.include_role: name: masakari tasks_from: loadbalancer tags: masakari when: enable_masakari | bool - name: Configure loadbalancer for memcached - include_role: + ansible.builtin.include_role: name: memcached tasks_from: loadbalancer tags: memcached when: enable_memcached | bool - name: Configure loadbalancer for mistral - include_role: + ansible.builtin.include_role: name: mistral tasks_from: loadbalancer tags: mistral when: enable_mistral | bool - name: Configure loadbalancer for neutron - include_role: + ansible.builtin.include_role: name: neutron tasks_from: loadbalancer tags: neutron when: enable_neutron | bool - name: Configure loadbalancer for placement - include_role: + ansible.builtin.include_role: name: placement tasks_from: loadbalancer tags: placement - name: Configure loadbalancer for nova - include_role: + ansible.builtin.include_role: name: nova tasks_from: loadbalancer tags: @@ -307,7 +307,7 @@ - nova-api when: enable_nova | bool - name: Configure loadbalancer for nova-cell - include_role: + ansible.builtin.include_role: name: nova-cell tasks_from: loadbalancer tags: @@ -315,25 +315,25 @@ - nova-cell when: enable_nova | bool - name: Configure loadbalancer for octavia - include_role: + ansible.builtin.include_role: name: octavia tasks_from: loadbalancer tags: octavia when: enable_octavia | bool - name: Configure loadbalancer for opensearch - include_role: + ansible.builtin.include_role: name: opensearch tasks_from: loadbalancer tags: opensearch when: enable_opensearch | bool - name: Configure loadbalancer for prometheus - include_role: + ansible.builtin.include_role: name: prometheus tasks_from: loadbalancer tags: prometheus when: enable_prometheus | bool - name: Configure loadbalancer for rabbitmq - include_role: + ansible.builtin.include_role: name: rabbitmq tasks_from: loadbalancer tags: rabbitmq @@ -342,31 +342,31 @@ role_rabbitmq_groups: when: enable_rabbitmq | bool - name: Configure loadbalancer for skyline - include_role: + ansible.builtin.include_role: name: skyline tasks_from: loadbalancer tags: skyline when: enable_skyline | bool - name: Configure loadbalancer for tacker - include_role: + ansible.builtin.include_role: name: tacker tasks_from: loadbalancer tags: tacker when: enable_tacker | bool - name: Configure loadbalancer for trove - include_role: + ansible.builtin.include_role: name: trove tasks_from: loadbalancer tags: trove when: enable_trove | bool - name: Configure loadbalancer for watcher - include_role: + ansible.builtin.include_role: name: watcher tasks_from: loadbalancer tags: watcher when: enable_watcher | bool - name: Configure loadbalancer for zun - include_role: + ansible.builtin.include_role: name: zun tasks_from: loadbalancer tags: zun @@ -374,7 +374,7 @@ # NOTE(r-krcek): This last step will notify handlers if any # changes to the configuration have been made. - name: Check loadbalancer containers - include_role: + ansible.builtin.include_role: name: loadbalancer tasks_from: check-containers when: kolla_action != 'config' diff --git a/doc/source/reference/bare-metal/ironic-guide.rst b/doc/source/reference/bare-metal/ironic-guide.rst index fbbe00ff2e..962ece7628 100644 --- a/doc/source/reference/bare-metal/ironic-guide.rst +++ b/doc/source/reference/bare-metal/ironic-guide.rst @@ -146,6 +146,22 @@ The port used for conductor's HTTP server is controlled via ironic_http_port: "8089" +Configure Ironic Python Agent NTP server (optional) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The Ironic Python Agent requires that the system clock is set correctly for +the heartbeat mechanism to work. One way of achieving this is to pass +the address of an NTP server via the kernel commandline, which is then +used to set the system clock when IPA first starts. This is not a hard +requirement, and you may use other methods. For example DHCP, or functionality +built into the BMC. + +If you wish to use this option you can set ``ironic_ntp_server`` in +``/etc/kolla/globals.yml``. Eg. + +.. code-block:: yaml + + ironic_ntp_server: "192.168.33.3" + Revert to plain PXE (not recommended) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Starting with Yoga, Ironic has changed the default PXE from plain PXE to iPXE. diff --git a/doc/source/reference/logging-and-monitoring/grafana-guide.rst b/doc/source/reference/logging-and-monitoring/grafana-guide.rst index 8622b8e99b..6f89c2016f 100644 --- a/doc/source/reference/logging-and-monitoring/grafana-guide.rst +++ b/doc/source/reference/logging-and-monitoring/grafana-guide.rst @@ -30,6 +30,55 @@ If you would like to set up Prometheus as a data source, additionally set: Please follow :doc:`Prometheus Guide ` for more information. +LDAP Authentication +~~~~~~~~~~~~~~~~~~~ + +Grafana can be configured to use LDAP for user authentication. To enable this +feature, set the following variable in ``/etc/kolla/globals.yml``: + +.. code-block:: yaml + + grafana_ldap_enabled: true + +The configuration for the LDAP server should be provided in a ``ldap.toml`` +file placed in the ``{{ node_custom_config }}/grafana/`` folder on the control +host. + +Example ``ldap.toml`` configuration: + +.. code-block:: ini + + [[servers]] + host = "openstack.org" + port = 389 + use_ssl = false + start_tls = true + + bind_dn = "CN=svc-openstack-grafana,OU=serviceaccounts,DC=openstack,DC=org" + bind_password = "strong_password" + + search_filter = "(sAMAccountName=%s)" + search_base_dns = ["OU=Users,DC=openstack,DC=org"] + + [servers.attributes] + name = "givenName" + surname = "sn" + username = "uid" + member_of = "memberOf" + email = "mail" + + [[servers.group_mappings]] + group_dn = "cn=grafana-admins,ou=groups,dc=openstack,dc=org" + org_role = "Admin" + + [[servers.group_mappings]] + group_dn = "cn=grafana-editors,ou=groups,dc=openstack,dc=org" + org_role = "Editor" + + [[servers.group_mappings]] + group_dn = "*" + org_role = "Viewer" + Custom dashboards provisioning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/reference/logging-and-monitoring/prometheus-guide.rst b/doc/source/reference/logging-and-monitoring/prometheus-guide.rst index 4fb9855c87..d1e4109fc3 100644 --- a/doc/source/reference/logging-and-monitoring/prometheus-guide.rst +++ b/doc/source/reference/logging-and-monitoring/prometheus-guide.rst @@ -239,7 +239,7 @@ For example: :caption: ``/etc/kolla/globals.yml`` prometheus_node_exporter_targets_extra: - - target: http://10.0.0.1:1234 + - target: 10.0.0.1:1234 labels: instance: host1 diff --git a/releasenotes/notes/add-grafana-ldap-support-65197904c0c325d1.yaml b/releasenotes/notes/add-grafana-ldap-support-65197904c0c325d1.yaml new file mode 100644 index 0000000000..df605bc7ee --- /dev/null +++ b/releasenotes/notes/add-grafana-ldap-support-65197904c0c325d1.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Adds support for LDAP authentication in Grafana. + Users can now enable LDAP by setting ``grafana_ldap_enabled`` to + ``true`` and providing an ``ldap.toml`` configuration file in the + ``{{ node_custom_config }}/grafana/`` directory. diff --git a/releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml b/releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml new file mode 100644 index 0000000000..4cb0b07b09 --- /dev/null +++ b/releasenotes/notes/ironic-parameter-ntp-rework-672efa37e5cc918f.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Adds explicit support for passing through the ``ipa-ntp-server`` setting + via the kernel commandline to the Ironic Python Agent. + + You can now also use ``ironic_kernel_append_params`` to provide + additional arguments to the kernel command line when booting the Ironic + Python Agent. diff --git a/releasenotes/notes/new-datasource-alertmanager-d724981bd971da92.yaml b/releasenotes/notes/new-datasource-alertmanager-d724981bd971da92.yaml new file mode 100644 index 0000000000..0a63da14b2 --- /dev/null +++ b/releasenotes/notes/new-datasource-alertmanager-d724981bd971da92.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added new Alertmanager datasource in Grafana. diff --git a/releasenotes/notes/skyline-tls-upstream-nginx-c93b39fb69b8d438.yaml b/releasenotes/notes/skyline-tls-upstream-nginx-c93b39fb69b8d438.yaml new file mode 100644 index 0000000000..390bde577f --- /dev/null +++ b/releasenotes/notes/skyline-tls-upstream-nginx-c93b39fb69b8d438.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixed TLS errors in Skyline's nginx configuration when upstream + endpoints use HTTPS. + `LP#2091935 `__ + `LP#1951437 `__ diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 2c85ed92c6..80f34b0aa9 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -24,8 +24,6 @@ podman_registry_insecure: true {% endif %} {% else %} docker_debug: true -docker_apt_package_pin: "5:28.*" -docker_yum_package_pin: "28.*" docker_registry_mirrors: - {{ infra_dockerhub_mirror }} diff --git a/tools/setup-compute-libvirt.yml b/tools/setup-compute-libvirt.yml index ea3f677d91..68b02a6acd 100644 --- a/tools/setup-compute-libvirt.yml +++ b/tools/setup-compute-libvirt.yml @@ -11,14 +11,14 @@ - virt-guest-shutdown.target tasks: - name: Install systemd artifacts - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "/usr/lib/systemd/system/{{ item }}" mode: "0644" with_items: "{{ systemd_artifacts }}" - name: Enable/start systemd artifacts - systemd: + ansible.builtin.systemd: enabled: true state: started name: "{{ item }}" diff --git a/zuul.d/nodesets.yaml b/zuul.d/nodesets.yaml index d143e4ae78..c3d024e1e7 100644 --- a/zuul.d/nodesets.yaml +++ b/zuul.d/nodesets.yaml @@ -5,6 +5,12 @@ - name: primary label: centos-10-stream-8GB +- nodeset: + name: kolla-ansible-centos-10s-16GB + nodes: + - name: primary + label: centos-10-stream-16GB + - nodeset: name: kolla-ansible-centos-10s-aarch64-8GB nodes: diff --git a/zuul.d/scenarios/aio.yaml b/zuul.d/scenarios/aio.yaml index c731f47875..070f946219 100644 --- a/zuul.d/scenarios/aio.yaml +++ b/zuul.d/scenarios/aio.yaml @@ -15,7 +15,7 @@ - job: name: kolla-ansible-centos-10s parent: kolla-ansible-aio-base - nodeset: kolla-ansible-centos-10s-8GB + nodeset: kolla-ansible-centos-10s-16GB voting: false vars: kolla_build_images: true diff --git a/zuul.d/scenarios/prometheus-opensearch.yaml b/zuul.d/scenarios/prometheus-opensearch.yaml index fb8c6c445b..7717675695 100644 --- a/zuul.d/scenarios/prometheus-opensearch.yaml +++ b/zuul.d/scenarios/prometheus-opensearch.yaml @@ -5,7 +5,7 @@ voting: false files: !inherit - ^ansible/group_vars/all/(common|fluentd|grafana|opensearch|prometheus).yml - - ^ansible/roles/(common|fluentd|grafana|opensearch|prometheus)/ + - ^ansible/roles/(common|fluentd|grafana|opensearch|prometheus|prometheus-node-exporters)/ - ^tests/test-prometheus-opensearch.sh vars: scenario: prometheus-opensearch