Skip to content

Commit

Permalink
fix ansible lint: use FQCN
Browse files Browse the repository at this point in the history
- use FQCN for builtin module actions (include_tasks, import_tasks)
- Use FQCN for module actions
  • Loading branch information
dangel101 committed Oct 20, 2022
1 parent 287d930 commit f85875f
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
failed_when: resp.rc not in [0, 5]
changed_when: resp.rc == 0

- include_tasks: lvmcache.yml
- ansible.builtin.include_tasks: lvmcache.yml
when: ssd is defined and ssd

# rc 1 = Filesystem already exists
Expand All @@ -87,7 +87,7 @@
mode: 0755

- name: Mount the brick
mount:
ansible.posix.mount:
name: "{{ mntpath }}"
src: "/dev/{{ vgname }}/{{ lvname }}"
fstype: "{{ fstype }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
register: authkey

- name: Copy the authorized_keys from the active host to the new host
synchronize:
ansible.posix.synchronize:
src: "/root/.ssh/authorized_keys"
dest: "/root/.ssh/authorized_keys"
mode: pull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
block:

- name: Include pre-task in play
import_tasks: pre-task.yml
ansible.builtin.import_tasks: pre-task.yml

- name: Include authorization task in play
import_tasks: authorization.yml
ansible.builtin.import_tasks: authorization.yml

- name: Include peers reconfiguration task in play
import_tasks: peers.yml
ansible.builtin.import_tasks: peers.yml

- name: Include volume reconfiguration task in play
import_tasks: volume.yml
ansible.builtin.import_tasks: volume.yml

when: gluster_maintenance_old_node is defined and
gluster_maintenance_cluster_node is defined and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# Workaround for Gluster Bug doesn't copy the peer file in rejected state
- name: Workaround for the bug to copy peer file of reject node
connection: ssh
synchronize:
ansible.posix.synchronize:
src: "{{ glusterd_libdir }}/peers/{{ old_node_uuid.stdout | trim }}"
dest: "{{ glusterd_libdir }}/peers/"
mode: pull
Expand Down Expand Up @@ -93,7 +93,7 @@

- name: Collect all the peer files from cluster_node
connection: ssh
synchronize:
ansible.posix.synchronize:
src: "{{ glusterd_libdir }}/peers/"
dest: "{{ peer_tmp_dir }}/"
mode: pull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- include_tasks: "{{ item }}.yml"
- ansible.builtin.include_tasks: "{{ item }}.yml"
with_items:
- host-os
- av-setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
state: enabled

- name: Apply default firewalld rules
include_tasks: firewalld.yml
ansible.builtin.include_tasks: firewalld.yml
vars:
firewald_rules_file: firewalld_rules_{{ outer_item.0 }}.yml

Expand All @@ -38,7 +38,7 @@
loop_var: outer_item

- name: Apply cluster specific firewalld rules
include_tasks: firewalld.yml
ansible.builtin.include_tasks: firewalld.yml
vars:
firewald_rules_file: firewalld_rules_{{ outer_item.0 }}_{{ host_deploy_cluster_version }}.yml

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- name: Include remove hosted engine tasks
include_tasks: remove.yml
ansible.builtin.include_tasks: remove.yml
when: hosted_engine_deploy_action == 'undeploy'

- name: Include deploy hosted engine tasks
include_tasks: deploy.yml
ansible.builtin.include_tasks: deploy.yml
when: hosted_engine_deploy_action == 'deploy'
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
- name: Include sync. clock tasks
include_tasks: clock.yml
ansible.builtin.include_tasks: clock.yml

- name: Include gluster tasks
include_tasks: gluster.yml
ansible.builtin.include_tasks: gluster.yml
when: host_deploy_gluster_supported|bool

- name: Include tuned profile tasks
include_tasks: tuned_profile.yml
ansible.builtin.include_tasks: tuned_profile.yml
when: not (host_deploy_tuned_profile == 'null' and not host_deploy_virt_enabled|bool)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Include packages, vdsmid, pki, configure, and restart services tasks
include_tasks: "{{ item }}.yml"
ansible.builtin.include_tasks: "{{ item }}.yml"
with_items:
- libvirt_presets_configure
- packages
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Install ovirt-vmconsole-host package
yansible.builtin.yum:
ansible.builtin.yum:
name: ovirt-vmconsole-host
state: present

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- include_tasks: "{{ item }}.yml"
ansible.builtin.with_items:
- ansible.builtin.include_tasks: "{{ item }}.yml"
with_items:
- loadconfig
- vdsm
- vmconsole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# tag.

- name: Configure advanced virtualization
import_tasks: advanced-virtualization.yml
ansible.builtin.import_tasks: advanced-virtualization.yml

- name: Remove network-scripts-openvswitch 2.11 package
ansible.builtin.yum: # noqa ignore-errors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: Import the configure ovn-provider-ovn file
import_tasks: configure.yml
ansible.builtin.import_tasks: configure.yml
when:
- ovn_state == "configured"

- name: Import the unconfigure ovn-provider-ovn file
import_tasks: unconfigure.yml
ansible.builtin.import_tasks: unconfigure.yml
when:
- ovn_state == "unconfigured"

0 comments on commit f85875f

Please sign in to comment.