yamllint: All tasks need to be named

yamllint is failing for unnamed tasks. All block and include_tasks tasks
are now named.
This commit is contained in:
Thomas Woerner
2023-01-05 11:02:20 +01:00
parent ba353a9b16
commit 2a1ecdbd83
41 changed files with 172 additions and 92 deletions

View File

@@ -13,7 +13,8 @@
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }}
register: result_ipabackup
- block:
- name: Handle backup
block:
- name: Get ipabackup_item from stderr or stdout output
ansible.builtin.set_fact:
ipabackup_item: "{{ item | regex_search('\n.*/([^\n]+)','\\1') | first }}"

View File

@@ -45,7 +45,8 @@
state is defined and
(state == "copied" or state == "restored" or state == "absent")
- block:
- name: Get all backup names for copy to controller
block:
- name: Get list of all backups on IPA server
ansible.builtin.shell:
find . -name "ipa-full-*" -o -name "ipa-data-*" | cut -d"/" -f 2
@@ -62,7 +63,8 @@
state == "absent") and
ipabackup_name is defined and ipabackup_name == "all"
- block:
- name: Set ipabackup_names from ipabackup_name
block:
- name: Fail on ipabackup_name all
ansible.builtin.fail: msg="ipabackup_name can not be all in this case"
when: ipabackup_name is defined and ipabackup_name == "all"
@@ -83,7 +85,8 @@
ipabackup_names: []
when: ipabackup_names is not defined and ipabackup_name is not defined
- block:
- name: Process "{{ ipabackup_names }}"
block:
- name: Copy backup from IPA server
ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml"
vars:
@@ -117,7 +120,8 @@
# Use only first item in ipabackup_names for copy to server and for restore.
- block:
- name: Process "{{ ipabackup_names[0] }}"
block:
- name: Copy backup to server
ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_to_server.yml"

View File

@@ -52,7 +52,8 @@
### INSTALL PACKAGES
- block:
- name: Package installation
block:
- name: Ensure that IPA server packages are installed
ansible.builtin.package:
name: "{{ ipaserver_packages }}"
@@ -80,7 +81,8 @@
### START FIREWALLD
- block:
- name: Firewall configuration
block:
- name: Ensure that firewalld is running
ansible.builtin.systemd:
name: firewalld