Refactor Ansible tasks to use fully qualified module names and improve code consistency
- Updated all tasks to use fully qualified module names (e.g., ansible.builtin.shell, ansible.builtin.copy) for clarity and to avoid ambiguity. - Replaced deprecated 'yum' module with 'dnf' for package management on RedHat-based systems. - Improved formatting and consistency in task definitions, including the use of double quotes for strings and consistent indentation. - Removed unnecessary comments and whitespace to enhance readability. - Ensured that conditions and loops are consistently formatted across all tasks.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
---
|
||||
|
||||
- name: (symlink_files.yml) Symlink files
|
||||
file:
|
||||
src: '{{ item.src_path }}'
|
||||
dest: '{{ item.dest_path }}'
|
||||
ansible.builtin.file:
|
||||
src: "{{ item.src_path }}"
|
||||
dest: "{{ item.dest_path }}"
|
||||
owner: root
|
||||
group: root
|
||||
state: link
|
||||
loop: "{{ symlink_files }}"
|
||||
loop_control:
|
||||
label: 'dest: {{ item.name }}'
|
||||
when:
|
||||
label: "dest: {{ item.name }}"
|
||||
when:
|
||||
- symlink_files is defined
|
||||
- symlink_files|length > 0
|
||||
tags:
|
||||
|
||||
Reference in New Issue
Block a user