mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
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:
@@ -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 }}"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user