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:
@@ -77,7 +77,7 @@
|
||||
- user_crontab
|
||||
|
||||
- name: (cron.yml) Set env entries in user crontabs
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "{{ item.name }}"
|
||||
env: "yes"
|
||||
user: '{{ item.user | default("root") }}'
|
||||
@@ -91,7 +91,7 @@
|
||||
- user_crontab
|
||||
|
||||
- name: (cron.yml) Set special time entries in user crontabs
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "{{ item.name }}"
|
||||
special_time: "{{ item.special_time }}"
|
||||
user: '{{ item.user | default("root") }}'
|
||||
@@ -105,7 +105,7 @@
|
||||
- user_crontab
|
||||
|
||||
- name: (cron.yml) Set normal entries in user crontabs
|
||||
cron:
|
||||
ansible.builtin.cron:
|
||||
name: "{{ item.name }}"
|
||||
minute: "{{ item.minute | default(omit) }}"
|
||||
hour: "{{ item.hour | default(omit) }}"
|
||||
|
||||
Reference in New Issue
Block a user