From feba55ae37f2dbf350bf07c29bd82997270cb850 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 1 Oct 2020 10:58:57 +0300 Subject: [PATCH] Use collections in common tasks Since we have switched to ansible 2.10, we should make sure we're using collections for interaction with rabbitmq and mysql in our common tasks. Change-Id: I7a86a62d759981fbdd2761b5de1b4ba57b704bc6 --- sync/tasks/db_setup.yml | 4 ++-- sync/tasks/mq_setup.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sync/tasks/db_setup.yml b/sync/tasks/db_setup.yml index aca206e4..09b01f82 100644 --- a/sync/tasks/db_setup.yml +++ b/sync/tasks/db_setup.yml @@ -28,7 +28,7 @@ - common-mariadb block: - name: Create database for service - mysql_db: + community.mysql.mysql_db: name: "{{ item.name }}" login_host: "{{ _oslodb_setup_endpoint | default(omit) }}" login_port: "{{ _oslodb_setup_port | default(omit) }}" @@ -36,7 +36,7 @@ no_log: true - name: Grant access to the database for the service - mysql_user: + community.mysql.mysql_user: name: "{{ item.1.username }}" password: "{{ item.1.password }}" host: "{{ item.1.host | default('%') }}" diff --git a/sync/tasks/mq_setup.yml b/sync/tasks/mq_setup.yml index dd6e02ed..3e2a3634 100644 --- a/sync/tasks/mq_setup.yml +++ b/sync/tasks/mq_setup.yml @@ -29,12 +29,12 @@ - common-rabbitmq block: - name: Add RPC RabbitMQ vhost - rabbitmq_vhost: + community.rabbitmq.rabbitmq_vhost: name: "{{ _oslomsg_rpc_vhost }}" state: "present" - name: Apply RPC RabbitMQ vhost policies - rabbitmq_policy: + community.rabbitmq.rabbitmq_policy: name: "{{ item.name }}" pattern: "{{ item.pattern }}" priority: "{{ item.priority | default(0) }}" @@ -43,7 +43,7 @@ loop: "{{ _oslomsg_rpc_policies | default([]) + oslomsg_rpc_policies }}" - name: Add RPC RabbitMQ user - rabbitmq_user: + community.rabbitmq.rabbitmq_user: user: "{{ _oslomsg_rpc_userid }}" password: "{{ _oslomsg_rpc_password }}" update_password: always @@ -63,7 +63,7 @@ - common-rabbitmq block: - name: Add Notify RabbitMQ vhost - rabbitmq_vhost: + community.rabbitmq.rabbitmq_vhost: name: "{{ _oslomsg_notify_vhost }}" state: "present" when: @@ -71,7 +71,7 @@ (_oslomsg_notify_vhost != _oslomsg_rpc_vhost) - name: Apply Notify RabbitMQ vhost policies - rabbitmq_policy: + community.rabbitmq.rabbitmq_policy: name: "{{ item.name }}" pattern: "{{ item.pattern }}" priority: "{{ item.priority | default(0) }}" @@ -83,7 +83,7 @@ (_oslomsg_notify_vhost != _oslomsg_rpc_vhost) - name: Add Notify RabbitMQ user - rabbitmq_user: + community.rabbitmq.rabbitmq_user: user: "{{ _oslomsg_notify_userid }}" password: "{{ _oslomsg_notify_password }}" update_password: always