Skip to content
Snippets Groups Projects
Commit 14706cc4 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ipabackup role: Use FQCN for ansible.builtin

Use Fully Qualified Collection Name (FQCN) for ansible builtins. This is
ansible.builtin.set_fact instead of set_fact for example and aplies for
all actions that are part of ansible.builtin.

All the replaced ansible.builtins:
  assert, command, copy, debug, fail, fetch, file, import_playbook,
  import_tasks, include_role, include_tasks, include_vars, package,
  set_fact, shell, slurp, stat, systemd
parent dde5b06b
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# tasks file for ipabackup # tasks file for ipabackup
- name: Create backup - name: Create backup
shell: > ansible.builtin.shell: >
ipa-backup ipa-backup
{{ "--gpg" if ipabackup_gpg | bool else "" }} {{ "--gpg" if ipabackup_gpg | bool else "" }}
{{ "--gpg-keyring="+ipabackup_gpg_keyring if ipabackup_gpg_keyring is defined else "" }} {{ "--gpg-keyring="+ipabackup_gpg_keyring if ipabackup_gpg_keyring is defined else "" }}
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- block: - block:
- name: Get ipabackup_item from stderr or stdout output - name: Get ipabackup_item from stderr or stdout output
set_fact: ansible.builtin.set_fact:
ipabackup_item: "{{ item | regex_search('\n.*/([^\n]+)','\\1') | first }}" ipabackup_item: "{{ item | regex_search('\n.*/([^\n]+)','\\1') | first }}"
when: item.find("Backed up to "+ipabackup_dir+"/") > 0 when: item.find("Backed up to "+ipabackup_dir+"/") > 0
with_items: with_items:
...@@ -25,15 +25,15 @@ ...@@ -25,15 +25,15 @@
label: "" label: ""
- name: Fail on missing ipabackup_item - name: Fail on missing ipabackup_item
fail: msg="Failed to get ipabackup_item" ansible.builtin.fail: msg="Failed to get ipabackup_item"
when: ipabackup_item is not defined when: ipabackup_item is not defined
- name: Copy backup to controller - name: Copy backup to controller
include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml"
when: state|default("present") == "present" when: state|default("present") == "present"
- name: Remove backup on server - name: Remove backup on server
include_tasks: "{{ role_path }}/tasks/remove_backup_from_server.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/remove_backup_from_server.yml"
when: not ipabackup_keep_on_server when: not ipabackup_keep_on_server
when: ipabackup_to_controller when: ipabackup_to_controller
--- ---
- name: Fail on invalid ipabackup_item - name: Fail on invalid ipabackup_item
fail: msg="ipabackup_item {{ ipabackup_item }} is not valid" ansible.builtin.fail: msg="ipabackup_item {{ ipabackup_item }} is not valid"
when: ipabackup_item is not defined or when: ipabackup_item is not defined or
ipabackup_item | length < 1 or ipabackup_item | length < 1 or
(ipabackup_item.find("ipa-full-") == -1 and (ipabackup_item.find("ipa-full-") == -1 and
ipabackup_item.find("ipa-data-") == -1) ipabackup_item.find("ipa-data-") == -1)
- name: Set controller destination directory - name: Set controller destination directory
set_fact: ansible.builtin.set_fact:
ipabackup_controller_dir: ipabackup_controller_dir:
"{{ ipabackup_controller_path | default(lookup('env','PWD')) }}/{{ "{{ ipabackup_controller_path | default(lookup('env','PWD')) }}/{{
ipabackup_name_prefix | default(ansible_facts['fqdn']) }}_{{ ipabackup_name_prefix | default(ansible_facts['fqdn']) }}_{{
ipabackup_item }}/" ipabackup_item }}/"
- name: Stat backup on server - name: Stat backup on server
stat: ansible.builtin.stat:
path: "{{ ipabackup_dir }}/{{ ipabackup_item }}" path: "{{ ipabackup_dir }}/{{ ipabackup_item }}"
register: result_backup_stat register: result_backup_stat
- name: Fail on missing backup directory - name: Fail on missing backup directory
fail: msg="Unable to find backup {{ ipabackup_item }}" ansible.builtin.fail: msg="Unable to find backup {{ ipabackup_item }}"
when: result_backup_stat.stat.isdir is not defined when: result_backup_stat.stat.isdir is not defined
- name: Get backup files to copy for "{{ ipabackup_item }}" - name: Get backup files to copy for "{{ ipabackup_item }}"
shell: ansible.builtin.shell:
find . -type f | cut -d"/" -f 2 find . -type f | cut -d"/" -f 2
args: args:
chdir: "{{ ipabackup_dir }}/{{ ipabackup_item }}" chdir: "{{ ipabackup_dir }}/{{ ipabackup_item }}"
register: result_find_backup_files register: result_find_backup_files
- name: Copy server backup files to controller - name: Copy server backup files to controller
fetch: ansible.builtin.fetch:
flat: yes flat: yes
src: "{{ ipabackup_dir }}/{{ ipabackup_item }}/{{ item }}" src: "{{ ipabackup_dir }}/{{ ipabackup_item }}/{{ item }}"
dest: "{{ ipabackup_controller_dir }}" dest: "{{ ipabackup_controller_dir }}"
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
- "{{ result_find_backup_files.stdout_lines }}" - "{{ result_find_backup_files.stdout_lines }}"
- name: Fix file modes for backup on controller - name: Fix file modes for backup on controller
file: ansible.builtin.file:
dest: "{{ ipabackup_controller_dir }}" dest: "{{ ipabackup_controller_dir }}"
mode: u=rwX,go= mode: u=rwX,go=
recurse: yes recurse: yes
......
--- ---
- name: Fail on invalid ipabackup_name - name: Fail on invalid ipabackup_name
fail: msg="ipabackup_name {{ ipabackup_name }} is not valid" ansible.builtin.fail: msg="ipabackup_name {{ ipabackup_name }} is not valid"
when: ipabackup_name is not defined or when: ipabackup_name is not defined or
ipabackup_name | length < 1 or ipabackup_name | length < 1 or
(ipabackup_name.find("ipa-full-") == -1 and (ipabackup_name.find("ipa-full-") == -1 and
ipabackup_name.find("ipa-data-") == -1) ipabackup_name.find("ipa-data-") == -1)
- name: Set controller source directory - name: Set controller source directory
set_fact: ansible.builtin.set_fact:
ipabackup_controller_dir: ipabackup_controller_dir:
"{{ ipabackup_controller_path | default(lookup('env','PWD')) }}" "{{ ipabackup_controller_path | default(lookup('env','PWD')) }}"
- name: Set ipabackup_item - name: Set ipabackup_item
set_fact: ansible.builtin.set_fact:
ipabackup_item: ipabackup_item:
"{{ ipabackup_name | regex_search('.*_(ipa-.+)','\\1') | first }}" "{{ ipabackup_name | regex_search('.*_(ipa-.+)','\\1') | first }}"
when: "'_ipa-' in ipabackup_name" when: "'_ipa-' in ipabackup_name"
- name: Set ipabackup_item - name: Set ipabackup_item
set_fact: ansible.builtin.set_fact:
ipabackup_item: "{{ ipabackup_name }}" ipabackup_item: "{{ ipabackup_name }}"
when: "'_ipa-' not in ipabackup_name" when: "'_ipa-' not in ipabackup_name"
- name: Stat backup to copy - name: Stat backup to copy
stat: ansible.builtin.stat:
path: "{{ ipabackup_controller_dir }}/{{ ipabackup_name }}" path: "{{ ipabackup_controller_dir }}/{{ ipabackup_name }}"
register: result_backup_stat register: result_backup_stat
delegate_to: localhost delegate_to: localhost
become: no become: no
- name: Fail on missing backup to copy - name: Fail on missing backup to copy
fail: msg="Unable to find backup {{ ipabackup_name }}" ansible.builtin.fail: msg="Unable to find backup {{ ipabackup_name }}"
when: result_backup_stat.stat.isdir is not defined when: result_backup_stat.stat.isdir is not defined
- name: Copy backup files to server for "{{ ipabackup_item }}" - name: Copy backup files to server for "{{ ipabackup_item }}"
copy: ansible.builtin.copy:
src: "{{ ipabackup_controller_dir }}/{{ ipabackup_name }}/" src: "{{ ipabackup_controller_dir }}/{{ ipabackup_name }}/"
dest: "{{ ipabackup_dir }}/{{ ipabackup_item }}" dest: "{{ ipabackup_dir }}/{{ ipabackup_item }}"
owner: root owner: root
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
register: result_ipabackup_get_backup_dir register: result_ipabackup_get_backup_dir
- name: Set IPA backup dir - name: Set IPA backup dir
set_fact: ansible.builtin.set_fact:
ipabackup_dir: "{{ result_ipabackup_get_backup_dir.backup_dir }}" ipabackup_dir: "{{ result_ipabackup_get_backup_dir.backup_dir }}"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# tasks file for ipabackup # tasks file for ipabackup
- name: Check for empty vars - name: Check for empty vars
fail: msg="Variable {{ item }} is empty" ansible.builtin.fail: msg="Variable {{ item }} is empty"
when: "item in vars and not vars[item]" when: "item in vars and not vars[item]"
with_items: "{{ ipabackup_empty_var_checks }}" with_items: "{{ ipabackup_empty_var_checks }}"
vars: vars:
...@@ -18,43 +18,43 @@ ...@@ -18,43 +18,43 @@
- ipabackup_firewalld_zone - ipabackup_firewalld_zone
- name: Set ipabackup_data if ipabackup_data is not set but ipabackup_online is - name: Set ipabackup_data if ipabackup_data is not set but ipabackup_online is
set_fact: ansible.builtin.set_fact:
ipabackup_data: yes ipabackup_data: yes
when: ipabackup_online | bool and not ipabackup_data | bool when: ipabackup_online | bool and not ipabackup_data | bool
- name: Fail if ipabackup_from_controller and ipabackup_to_controller are set - name: Fail if ipabackup_from_controller and ipabackup_to_controller are set
fail: msg="ipabackup_from_controller and ipabackup_to_controller are set" ansible.builtin.fail: msg="ipabackup_from_controller and ipabackup_to_controller are set"
when: ipabackup_from_controller | bool and ipabackup_to_controller | bool when: ipabackup_from_controller | bool and ipabackup_to_controller | bool
- name: Fail for given ipabackup_name if state is not copied, restored or absent - name: Fail for given ipabackup_name if state is not copied, restored or absent
fail: msg="ipabackup_name is given and state is not copied, restored or absent" ansible.builtin.fail: msg="ipabackup_name is given and state is not copied, restored or absent"
when: state is not defined or when: state is not defined or
(state != "copied" and state != "restored" and state != "absent") and (state != "copied" and state != "restored" and state != "absent") and
ipabackup_name is defined ipabackup_name is defined
- name: Get ipabackup_dir from IPA installation - name: Get ipabackup_dir from IPA installation
include_tasks: "{{ role_path }}/tasks/get_ipabackup_dir.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/get_ipabackup_dir.yml"
- name: Backup IPA server - name: Backup IPA server
include_tasks: "{{ role_path }}/tasks/backup.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/backup.yml"
when: state|default("present") == "present" when: state|default("present") == "present"
- name: Fail on missing ipabackup_name - name: Fail on missing ipabackup_name
fail: msg="ipabackup_name is not set" ansible.builtin.fail: msg="ipabackup_name is not set"
when: (ipabackup_name is not defined or not ipabackup_name) and when: (ipabackup_name is not defined or not ipabackup_name) and
state is defined and state is defined and
(state == "copied" or state == "restored" or state == "absent") (state == "copied" or state == "restored" or state == "absent")
- block: - block:
- name: Get list of all backups on IPA server - name: Get list of all backups on IPA server
shell: ansible.builtin.shell:
find . -name "ipa-full-*" -o -name "ipa-data-*" | cut -d"/" -f 2 find . -name "ipa-full-*" -o -name "ipa-data-*" | cut -d"/" -f 2
args: args:
chdir: "{{ ipabackup_dir }}/" chdir: "{{ ipabackup_dir }}/"
register: result_backup_find_backup_files register: result_backup_find_backup_files
- name: Set ipabackup_names using backup list - name: Set ipabackup_names using backup list
set_fact: ansible.builtin.set_fact:
ipabackup_names: "{{ result_backup_find_backup_files.stdout_lines }}" ipabackup_names: "{{ result_backup_find_backup_files.stdout_lines }}"
when: state is defined and when: state is defined and
...@@ -64,28 +64,28 @@ ...@@ -64,28 +64,28 @@
- block: - block:
- name: Fail on ipabackup_name all - name: Fail on ipabackup_name all
fail: msg="ipabackup_name can not be all in this case" ansible.builtin.fail: msg="ipabackup_name can not be all in this case"
when: ipabackup_name is defined and ipabackup_name == "all" when: ipabackup_name is defined and ipabackup_name == "all"
- name: Set ipabackup_names from ipabackup_name string - name: Set ipabackup_names from ipabackup_name string
set_fact: ansible.builtin.set_fact:
ipabackup_names: ["{{ ipabackup_name }}"] ipabackup_names: ["{{ ipabackup_name }}"]
when: ipabackup_name | type_debug != "list" when: ipabackup_name | type_debug != "list"
- name: Set ipabackup_names from ipabackup_name list - name: Set ipabackup_names from ipabackup_name list
set_fact: ansible.builtin.set_fact:
ipabackup_names: "{{ ipabackup_name }}" ipabackup_names: "{{ ipabackup_name }}"
when: ipabackup_name | type_debug == "list" when: ipabackup_name | type_debug == "list"
when: ipabackup_names is not defined and ipabackup_name is defined when: ipabackup_names is not defined and ipabackup_name is defined
- name: Set empty ipabackup_names if ipabackup_name is not defined - name: Set empty ipabackup_names if ipabackup_name is not defined
set_fact: ansible.builtin.set_fact:
ipabackup_names: [] ipabackup_names: []
when: ipabackup_names is not defined and ipabackup_name is not defined when: ipabackup_names is not defined and ipabackup_name is not defined
- block: - block:
- name: Copy backup from IPA server - name: Copy backup from IPA server
include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml"
vars: vars:
ipabackup_item: "{{ main_item | basename }}" ipabackup_item: "{{ main_item | basename }}"
with_items: with_items:
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
when: state is defined and state == "copied" when: state is defined and state == "copied"
- name: Remove backup from IPA server - name: Remove backup from IPA server
include_tasks: "{{ role_path }}/tasks/remove_backup_from_server.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/remove_backup_from_server.yml"
vars: vars:
ipabackup_item: "{{ main_item | basename }}" ipabackup_item: "{{ main_item | basename }}"
with_items: with_items:
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
# restore. # restore.
- name: Fail to copy or restore more than one backup on the server - name: Fail to copy or restore more than one backup on the server
fail: msg="Only one backup can be copied to the server or restored" ansible.builtin.fail: msg="Only one backup can be copied to the server or restored"
when: state is defined and (state == "copied" or state == "restored") and when: state is defined and (state == "copied" or state == "restored") and
ipabackup_from_controller | bool and ipabackup_names | length != 1 ipabackup_from_controller | bool and ipabackup_names | length != 1
...@@ -119,10 +119,10 @@ ...@@ -119,10 +119,10 @@
- block: - block:
- name: Copy backup to server - name: Copy backup to server
include_tasks: "{{ role_path }}/tasks/copy_backup_to_server.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_to_server.yml"
- name: Restore IPA server after copy - name: Restore IPA server after copy
include_tasks: "{{ role_path }}/tasks/restore.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/restore.yml"
when: state|default("present") == "restored" when: state|default("present") == "restored"
vars: vars:
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
(state|default("present") == "copied" and not ipabackup_to_controller) (state|default("present") == "copied" and not ipabackup_to_controller)
- name: Restore IPA server - name: Restore IPA server
include_tasks: "{{ role_path }}/tasks/restore.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/restore.yml"
vars: vars:
ipabackup_item: "{{ ipabackup_names[0] | basename }}" ipabackup_item: "{{ ipabackup_names[0] | basename }}"
when: not ipabackup_from_controller and when: not ipabackup_from_controller and
......
--- ---
- name: Remove backup "{{ ipabackup_item }}" - name: Remove backup "{{ ipabackup_item }}"
file: ansible.builtin.file:
path: "{{ ipabackup_dir }}/{{ ipabackup_item }}" path: "{{ ipabackup_dir }}/{{ ipabackup_item }}"
state: absent state: absent
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
### VARIABLES ### VARIABLES
- name: Import variables specific to distribution - name: Import variables specific to distribution
include_vars: "{{ item }}" ansible.builtin.include_vars: "{{ item }}"
with_first_found: with_first_found:
- "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}.yml" - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}.yml"
- "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml" - "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
...@@ -21,30 +21,30 @@ ...@@ -21,30 +21,30 @@
### GET SERVICES FROM BACKUP ### GET SERVICES FROM BACKUP
- name: Stat backup on server - name: Stat backup on server
stat: ansible.builtin.stat:
path: "{{ ipabackup_dir }}/{{ ipabackup_item }}" path: "{{ ipabackup_dir }}/{{ ipabackup_item }}"
register: result_backup_stat register: result_backup_stat
- name: Fail on missing backup directory - name: Fail on missing backup directory
fail: msg="Unable to find backup {{ ipabackup_item }}" ansible.builtin.fail: msg="Unable to find backup {{ ipabackup_item }}"
when: result_backup_stat.stat.isdir is not defined when: result_backup_stat.stat.isdir is not defined
- name: Stat header file in backup "{{ ipabackup_item }}" - name: Stat header file in backup "{{ ipabackup_item }}"
stat: ansible.builtin.stat:
path: "{{ ipabackup_dir }}/{{ ipabackup_item }}/header" path: "{{ ipabackup_dir }}/{{ ipabackup_item }}/header"
register: result_backup_header_stat register: result_backup_header_stat
- name: Fail on missing header file in backup - name: Fail on missing header file in backup
fail: msg="Unable to find backup {{ ipabackup_item }} header file" ansible.builtin.fail: msg="Unable to find backup {{ ipabackup_item }} header file"
when: result_backup_header_stat.stat.isreg is not defined when: result_backup_header_stat.stat.isreg is not defined
- name: Get services from backup - name: Get services from backup
shell: > ansible.builtin.shell: >
grep "^services = " "{{ ipabackup_dir }}/{{ ipabackup_item }}/header" | cut -d"=" -f2 | tr -d '[:space:]' grep "^services = " "{{ ipabackup_dir }}/{{ ipabackup_item }}/header" | cut -d"=" -f2 | tr -d '[:space:]'
register: result_services_grep register: result_services_grep
- name: Set ipabackup_services - name: Set ipabackup_services
set_fact: ansible.builtin.set_fact:
ipabackup_services: "{{ result_services_grep.stdout.split(',') }}" ipabackup_services: "{{ result_services_grep.stdout.split(',') }}"
ipabackup_service_dns: DNS ipabackup_service_dns: DNS
ipabackup_service_adtrust: ADTRUST ipabackup_service_adtrust: ADTRUST
...@@ -54,24 +54,24 @@ ...@@ -54,24 +54,24 @@
- block: - block:
- name: Ensure that IPA server packages are installed - name: Ensure that IPA server packages are installed
package: ansible.builtin.package:
name: "{{ ipaserver_packages }}" name: "{{ ipaserver_packages }}"
state: present state: present
- name: Ensure that IPA server packages for dns are installed - name: Ensure that IPA server packages for dns are installed
package: ansible.builtin.package:
name: "{{ ipaserver_packages_dns }}" name: "{{ ipaserver_packages_dns }}"
state: present state: present
when: ipabackup_service_dns in ipabackup_services when: ipabackup_service_dns in ipabackup_services
- name: Ensure that IPA server packages for adtrust are installed - name: Ensure that IPA server packages for adtrust are installed
package: ansible.builtin.package:
name: "{{ ipaserver_packages_adtrust }}" name: "{{ ipaserver_packages_adtrust }}"
state: present state: present
when: ipabackup_service_adtrust in ipabackup_services when: ipabackup_service_adtrust in ipabackup_services
- name: Ensure that firewalld packages are installed - name: Ensure that firewalld packages are installed
package: ansible.builtin.package:
name: "{{ ipaserver_packages_firewalld }}" name: "{{ ipaserver_packages_firewalld }}"
state: present state: present
when: ipabackup_setup_firewalld | bool when: ipabackup_setup_firewalld | bool
...@@ -82,20 +82,20 @@ ...@@ -82,20 +82,20 @@
- block: - block:
- name: Ensure that firewalld is running - name: Ensure that firewalld is running
systemd: ansible.builtin.systemd:
name: firewalld name: firewalld
enabled: yes enabled: yes
state: started state: started
- name: Firewalld - Verify runtime zone "{{ ipabackup_firewalld_zone }}" - name: Firewalld - Verify runtime zone "{{ ipabackup_firewalld_zone }}"
shell: > ansible.builtin.shell: >
firewall-cmd firewall-cmd
--info-zone="{{ ipabackup_firewalld_zone }}" --info-zone="{{ ipabackup_firewalld_zone }}"
>/dev/null >/dev/null
when: ipabackup_firewalld_zone is defined when: ipabackup_firewalld_zone is defined
- name: Firewalld - Verify permanent zone "{{ ipabackup_firewalld_zone }}" - name: Firewalld - Verify permanent zone "{{ ipabackup_firewalld_zone }}"
shell: > ansible.builtin.shell: >
firewall-cmd firewall-cmd
--permanent --permanent
--info-zone="{{ ipabackup_firewalld_zone }}" --info-zone="{{ ipabackup_firewalld_zone }}"
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
- name: Restore backup - name: Restore backup
no_log: True no_log: True
shell: > ansible.builtin.shell: >
ipa-restore ipa-restore
{{ ipabackup_item }} {{ ipabackup_item }}
--unattended --unattended
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
ignore_errors: yes ignore_errors: yes
- name: Report error for restore operation - name: Report error for restore operation
debug: ansible.builtin.debug:
msg: "{{ result_iparestore.stderr }}" msg: "{{ result_iparestore.stderr }}"
when: result_iparestore is failed when: result_iparestore is failed
failed_when: yes failed_when: yes
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
### CONFIGURE FIREWALLD ### CONFIGURE FIREWALLD
- name: Configure firewalld - name: Configure firewalld
command: > ansible.builtin.command: >
firewall-cmd firewall-cmd
--permanent --permanent
{{ "--zone="+ipabackup_firewalld_zone if ipabackup_firewalld_zone is defined else "" }} {{ "--zone="+ipabackup_firewalld_zone if ipabackup_firewalld_zone is defined else "" }}
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
when: ipabackup_setup_firewalld | bool when: ipabackup_setup_firewalld | bool
- name: Configure firewalld runtime - name: Configure firewalld runtime
command: > ansible.builtin.command: >
firewall-cmd firewall-cmd
{{ "--zone="+ipabackup_firewalld_zone if ipabackup_firewalld_zone is defined else "" }} {{ "--zone="+ipabackup_firewalld_zone if ipabackup_firewalld_zone is defined else "" }}
--add-service=freeipa-ldap --add-service=freeipa-ldap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment