Auto-fix usage of modules via FQCN
Since ansible-core 2.10 it is recommended to use modules via FQCN In order to align with recommendation, we perform migration by applying suggestions made by `ansible-lint --fix=fqcn` Change-Id: I5564be6356c50cdc50d342666ef8ac67a4a2506b
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Restart barbican services
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ item.service_name }}"
|
||||
state: "restarted"
|
||||
daemon_reload: true
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Perform a synchronization of the Barbican database
|
||||
command: "{{ barbican_bin }}/barbican-manage db upgrade"
|
||||
ansible.builtin.command: "{{ barbican_bin }}/barbican-manage db upgrade"
|
||||
become: true
|
||||
become_user: "{{ barbican_system_user_name }}"
|
||||
changed_when: false
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Record the installation method
|
||||
ini_file:
|
||||
community.general.ini_file:
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: "barbican"
|
||||
option: "install_method"
|
||||
@@ -22,12 +22,12 @@
|
||||
mode: "0644"
|
||||
|
||||
- name: Refresh local facts to ensure the barbican section is present
|
||||
setup:
|
||||
ansible.builtin.setup:
|
||||
filter: ansible_local
|
||||
gather_subset: "!all"
|
||||
|
||||
- name: Install distro packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ barbican_package_list }}"
|
||||
state: "{{ barbican_package_state }}"
|
||||
update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
||||
@@ -38,7 +38,7 @@
|
||||
delay: 2
|
||||
|
||||
- name: Install the python venv
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: "python_venv_build"
|
||||
vars:
|
||||
venv_python_executable: "{{ barbican_venv_python_executable }}"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
- barbican-policy-override
|
||||
|
||||
- name: Remove legacy policy.yaml file
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ barbican_etc_directory }}/policy.yaml"
|
||||
state: absent
|
||||
tags:
|
||||
@@ -65,7 +65,7 @@
|
||||
when: barbican_user_libraries | length > 0
|
||||
block:
|
||||
- name: Create library destination directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.dest | dirname }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner | default('root') }}"
|
||||
@@ -74,7 +74,7 @@
|
||||
with_items: "{{ barbican_user_libraries }}"
|
||||
|
||||
- name: Place user libraries
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "{{ item.owner | default('root') }}"
|
||||
@@ -83,7 +83,7 @@
|
||||
with_items: "{{ barbican_user_libraries }}"
|
||||
|
||||
- name: Symlink user libraries if needed
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
src: "{{ item.dest }}"
|
||||
dest: "{{ item.link }}"
|
||||
owner: "{{ item.owner | default('root') }}"
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Create the Barbican system group
|
||||
group:
|
||||
ansible.builtin.group:
|
||||
name: "{{ barbican_system_group_name }}"
|
||||
state: "present"
|
||||
system: "yes"
|
||||
|
||||
- name: Create the Barbican system user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: "{{ barbican_system_user_name }}"
|
||||
group: "{{ barbican_system_group_name }}"
|
||||
comment: "{{ barbican_system_user_comment }}"
|
||||
@@ -30,7 +30,7 @@
|
||||
home: "{{ barbican_system_user_home }}"
|
||||
|
||||
- name: Create Barbican's directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: "directory"
|
||||
owner: "{{ item.owner | default(barbican_system_user_name) }}"
|
||||
|
||||
+14
-14
@@ -16,7 +16,7 @@
|
||||
# Main tasks file for openstack-ansible-barbican
|
||||
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
ansible.builtin.include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
@@ -31,7 +31,7 @@
|
||||
- always
|
||||
|
||||
- name: Fail if service was deployed using a different installation method
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: "Switching installation methods for OpenStack services is not supported"
|
||||
when:
|
||||
- ansible_local is defined
|
||||
@@ -41,12 +41,12 @@
|
||||
- ansible_local.openstack_ansible.barbican.install_method != barbican_install_method
|
||||
|
||||
- name: Gather variables for installation method
|
||||
include_vars: "{{ barbican_install_method }}_install.yml"
|
||||
ansible.builtin.include_vars: "{{ barbican_install_method }}_install.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Including osa.db_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.db_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -68,7 +68,7 @@
|
||||
- always
|
||||
|
||||
- name: Including osa.mq_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.mq_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -94,17 +94,17 @@
|
||||
- always
|
||||
|
||||
- name: Importing barbican_pre_install tasks
|
||||
import_tasks: barbican_pre_install.yml
|
||||
ansible.builtin.import_tasks: barbican_pre_install.yml
|
||||
tags:
|
||||
- barbican-install
|
||||
|
||||
- name: Importing barbican_install tasks
|
||||
import_tasks: barbican_install.yml
|
||||
ansible.builtin.import_tasks: barbican_install.yml
|
||||
tags:
|
||||
- barbican-install
|
||||
|
||||
- name: Create and install SSL certificates
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: pki
|
||||
tasks_from: main_certs.yml
|
||||
apply:
|
||||
@@ -124,13 +124,13 @@
|
||||
- always
|
||||
|
||||
- name: Importing barbican_post_install tasks
|
||||
import_tasks: barbican_post_install.yml
|
||||
ansible.builtin.import_tasks: barbican_post_install.yml
|
||||
tags:
|
||||
- barbican-config
|
||||
- post-install
|
||||
|
||||
- name: Run the systemd service role
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: systemd_service
|
||||
vars:
|
||||
systemd_user_name: "{{ barbican_system_user_name }}"
|
||||
@@ -149,14 +149,14 @@
|
||||
- systemd-service
|
||||
|
||||
- name: Importing barbican_db_sync tasks
|
||||
import_tasks: barbican_db_sync.yml
|
||||
ansible.builtin.import_tasks: barbican_db_sync.yml
|
||||
when:
|
||||
- _barbican_is_first_play_host
|
||||
tags:
|
||||
- barbican-config
|
||||
|
||||
- name: Import uwsgi role
|
||||
import_role:
|
||||
ansible.builtin.import_role:
|
||||
name: uwsgi
|
||||
vars:
|
||||
uwsgi_services: "{{ uwsgi_barbican_services }}"
|
||||
@@ -166,7 +166,7 @@
|
||||
- uwsgi
|
||||
|
||||
- name: Including osa.service_setup role
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: openstack.osa.service_setup
|
||||
apply:
|
||||
tags:
|
||||
@@ -204,4 +204,4 @@
|
||||
- always
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
Reference in New Issue
Block a user