Use community.general ansible collection instead of modules

Replace module calls by community.general ansible collection calls.
Change-Id: Ie96b3d35cea61370b1f98d7e060d696c4807c6b7
This commit is contained in:
Sagi Shnaidman 2021-06-10 15:17:07 +03:00
parent c144e9e54b
commit 019419463f
20 changed files with 26 additions and 26 deletions

View File

@ -1,5 +1,5 @@
- name: Create fcontext entry for container-config-scripts
sefcontext:
community.general.sefcontext:
target: "/var/lib/container-config-scripts(/.*)?"
setype: container_file_t
state: present

View File

@ -13,7 +13,7 @@
become: true
register: cloud_init_enabled
- name: Wait for cloud-init to finish, if enabled
cloud_init_data_facts:
community.general.cloud_init_data_facts:
filter: status
register: res
until: >

View File

@ -132,7 +132,7 @@ outputs:
description: Common host prep tasks for cinder-volume and cinder-backup services
value: &cinder_common_host_prep_tasks
- name: create fcontext entry for cinder data
sefcontext:
community.general.sefcontext:
target: "/var/lib/cinder(/.*)?"
setype: container_file_t
state: present
@ -259,7 +259,7 @@ outputs:
changed_when: _loopback_device.rc == 2
failed_when: _loopback_device.rc not in [0,2]
- name: Create LVM volume group
lvg:
community.general.lvg:
vg: "cinder-volumes"
pvs: "{{ _loopback_device.stdout }}"
state: present

View File

@ -250,7 +250,7 @@ outputs:
get_attr: [MysqlBase, role_data, deploy_steps_tasks]
host_prep_tasks:
- name: create fcontext entry for mysql data
sefcontext:
community.general.sefcontext:
target: "/var/lib/mysql(/.*)?"
setype: container_file_t
state: present

View File

@ -236,7 +236,7 @@ outputs:
external_deploy_tasks: {get_attr: [RedisBase, role_data, external_deploy_tasks]}
host_prep_tasks:
- name: create fcontext entry for redis data
sefcontext:
community.general.sefcontext:
target: "/var/run/redis(/.*)?" # conflicts with equivalency rule '/run /var/run' - have to use /var/run here...
setype: container_file_t
state: present

View File

@ -47,7 +47,7 @@ outputs:
- 13787
host_prep_tasks:
- name: authorize httpd to listen on registry ports
seport:
community.general.seport:
ports:
- '8787'
- '13787'

View File

@ -578,7 +578,7 @@ outputs:
modules:
- name: iscsi_tcp
- name: create fcontext entry for ironic data
sefcontext:
community.general.sefcontext:
target: "/var/lib/ironic(/.*)?"
setype: container_file_t
state: present

View File

@ -516,7 +516,7 @@ outputs:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create fcontext entry for ironic-inspector data
sefcontext:
community.general.sefcontext:
target: "/var/lib/ironic-inspector/dhcp-hostsdir(/.*)?"
setype: container_file_t
state: present

View File

@ -153,7 +153,7 @@ outputs:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create fcontext entry for iscsi
sefcontext:
community.general.sefcontext:
target: "{{ item.path }}(/.*)?"
setype: "{{ item.setype }}"
state: present

View File

@ -177,7 +177,7 @@ outputs:
environment: {get_attr: [ManilaShareCommon, manila_share_environment]}
host_prep_tasks:
- name: create fcontext entry for manila data
sefcontext:
community.general.sefcontext:
target: "/var/lib/manila(/.*)?"
setype: container_file_t
state: present

View File

@ -139,7 +139,7 @@ outputs:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create fcontext entry for qdrouterd data
sefcontext:
community.general.sefcontext:
target: "/var/lib/qdrouterd(/.*)?"
setype: container_file_t
state: present

View File

@ -229,7 +229,7 @@ outputs:
cluster_recreate: "{{ tripleo_transfer_flag_stat.stat.exists|bool }}"
- name: Check pacemaker cluster running before upgrade
tags: validation
pacemaker_cluster: state=online check_and_fail=true
community.general.pacemaker_cluster: state=online check_and_fail=true
async: 30
poll: 4
when: not cluster_recreate|bool
@ -305,13 +305,13 @@ outputs:
when: step|int == 2
block:
- name: Stop pacemaker cluster
pacemaker_cluster: state=offline
community.general.pacemaker_cluster: state=offline
when: not cluster_recreate|bool
- name: upgrade step 4
when: step|int == 4
block:
- name: Start pacemaker cluster
pacemaker_cluster: state=online
community.general.pacemaker_cluster: state=online
when: not cluster_recreate|bool
external_upgrade_tasks:
- when:
@ -334,7 +334,7 @@ outputs:
update_tasks:
- name: Check pacemaker cluster running before the minor update
when: step|int == 0 # TODO(marios) disabling validations?
pacemaker_cluster: state=online check_and_fail=true
community.general.pacemaker_cluster: state=online check_and_fail=true
async: 30
poll: 4
- name: Move virtual IPs to another node before stopping pacemaker
@ -364,10 +364,10 @@ outputs:
command: systemd-cat -t ha-shutdown /var/lib/container-config-scripts/pacemaker_mutex_shutdown.sh --acquire
- name: Stop pacemaker cluster
when: step|int == 1
pacemaker_cluster: state=offline
community.general.pacemaker_cluster: state=offline
- name: Start pacemaker cluster
when: step|int == 4
pacemaker_cluster: state=online
community.general.pacemaker_cluster: state=online
- name: Release the cluster shutdown lock
when: step|int == 4
command: systemd-cat -t ha-shutdown /var/lib/container-config-scripts/pacemaker_mutex_shutdown.sh --release

View File

@ -209,7 +209,7 @@ outputs:
path: /usr/sbin/pcs
register: pcs_stat
- name: Stop pacemaker cluster before stopping all docker containers
pacemaker_cluster: state=offline
community.general.pacemaker_cluster: state=offline
when: pcs_stat.stat.exists
- name: Destroy pacemaker cluster
command: /usr/sbin/pcs cluster destroy

View File

@ -129,7 +129,7 @@ outputs:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create fcontext entry for qrouterd data
sefcontext:
community.general.sefcontext:
target: "/var/lib/qdrouterd(/.*)?"
setype: container_file_t
state: present

View File

@ -393,7 +393,7 @@ outputs:
ca: ipa
host_prep_tasks:
- name: creat fcontext entry for rabbitmq data
sefcontext:
community.general.sefcontext:
target: "/var/lib/rabbitmq(/.*)?"
setype: container_file_t
state: present

View File

@ -311,7 +311,7 @@ outputs:
ca: ipa
host_prep_tasks:
- name: create fcontext for rabbitmq data
sefcontext:
community.general.sefcontext:
target: "/var/lib/rabbitmq(/.*)?"
setype: container_file_t
state: present

View File

@ -214,7 +214,7 @@ outputs:
TRIPLEO_DEPLOY_IDENTIFIER: {get_param: DeployIdentifier}
host_prep_tasks:
- name: create fcontext for rabbitmq data
sefcontext:
community.general.sefcontext:
target: "/var/lib/rabbitmq(/.*)?"
setype: container_file_t
state: present

View File

@ -311,7 +311,7 @@ outputs:
ca: ipa
host_prep_tasks:
- name: create fcontext for rabbitmq data
sefcontext:
community.general.sefcontext:
target: "/var/lib/rabbitmq(/.*)?"
setype: container_file_t
state: present

View File

@ -216,7 +216,7 @@ outputs:
get_attr: [RabbitmqBase, role_data, metadata_settings]
host_prep_tasks:
- name: create fcontext for rabbitmq data
sefcontext:
community.general.sefcontext:
target: "/var/lib/rabbitmq(/.*)?"
setype: container_file_t
state: present

View File

@ -639,7 +639,7 @@ outputs:
swift_raw_disks: "{{ hiera_output.stdout | from_json }}"
when: use_node_data_lookup|bool
- name: Format SwiftRawDisks
filesystem:
community.general.filesystem:
fstype: xfs
dev: "{{ swift_raw_disks[item]['base_dir']|default('/dev') }}/{{ item }}"
opts: -f -i size=1024