mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 13:53:23 +00:00
roles: Fix jinja2 template spacing
This patch fixes ansible-lint warns on jinja2 template spacing in roles
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
ansible.builtin.shell: >
|
||||
ipa-backup
|
||||
{{ "--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 "" }}
|
||||
{{ "--data" if ipabackup_data | bool else "" }}
|
||||
{{ "--logs" if ipabackup_logs | bool else "" }}
|
||||
{{ "--online" if ipabackup_online | bool else "" }}
|
||||
{{ "--disable-role-check" if ipabackup_disable_role_check | bool else "" }}
|
||||
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
||||
{{ "--log-file=" + ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
||||
register: result_ipabackup
|
||||
|
||||
- name: Handle backup
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
- name: Set controller destination directory
|
||||
ansible.builtin.set_fact:
|
||||
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_item }}/"
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
- name: Set controller source directory
|
||||
ansible.builtin.set_fact:
|
||||
ipabackup_controller_dir:
|
||||
"{{ ipabackup_controller_path | default(lookup('env','PWD')) }}"
|
||||
"{{ ipabackup_controller_path | default(lookup('env', 'PWD')) }}"
|
||||
|
||||
- name: Set ipabackup_item
|
||||
ansible.builtin.set_fact:
|
||||
ipabackup_item:
|
||||
"{{ ipabackup_name | regex_search('.*_(ipa-.+)','\\1') | first }}"
|
||||
"{{ ipabackup_name | regex_search('.*_(ipa-.+)', '\\1') | first }}"
|
||||
when: "'_ipa-' in ipabackup_name"
|
||||
|
||||
- name: Set ipabackup_item
|
||||
|
||||
@@ -116,13 +116,13 @@
|
||||
ipa-restore
|
||||
{{ ipabackup_item }}
|
||||
--unattended
|
||||
{{ "--password="+ipabackup_password if ipabackup_password is defined else "" }}
|
||||
{{ "--password=" + ipabackup_password if ipabackup_password is defined else "" }}
|
||||
{{ "--data" if ipabackup_data | bool else "" }}
|
||||
{{ "--online" if ipabackup_online | bool else "" }}
|
||||
{{ "--instance="+ipabackup_instance if ipabackup_instance is defined else "" }}
|
||||
{{ "--backend="+ipabackup_backend if ipabackup_backend is defined else "" }}
|
||||
{{ "--instance=" + ipabackup_instance if ipabackup_instance is defined else "" }}
|
||||
{{ "--backend=" + ipabackup_backend if ipabackup_backend is defined else "" }}
|
||||
{{ "--no-logs" if ipabackup_no_logs | bool else "" }}
|
||||
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
||||
{{ "--log-file=" + ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
||||
register: result_iparestore
|
||||
ignore_errors: yes
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
ansible.builtin.command: >
|
||||
firewall-cmd
|
||||
--permanent
|
||||
{{ "--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-ldaps
|
||||
{{ "--add-service=freeipa-trust" if ipabackup_service_adtrust in ipabackup_services else "" }}
|
||||
@@ -149,7 +149,7 @@
|
||||
- name: Configure firewalld runtime
|
||||
ansible.builtin.command: >
|
||||
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-ldaps
|
||||
{{ "--add-service=freeipa-trust" if ipabackup_service_adtrust in ipabackup_services else "" }}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
domain: "{{ ipareplica_domain | default(ipaserver_domain) |
|
||||
default(omit) }}"
|
||||
servers: "{{ ipareplica_servers | default(omit) }}"
|
||||
realm: "{{ ipareplica_realm | default(ipaserver_realm) |default(omit) }}"
|
||||
realm: "{{ ipareplica_realm | default(ipaserver_realm) | default(omit) }}"
|
||||
hostname: "{{ ipareplica_hostname | default(ansible_facts['fqdn']) }}"
|
||||
ca_cert_files: "{{ ipareplica_ca_cert_files | default([]) }}"
|
||||
hidden_replica: "{{ ipareplica_hidden_replica }}"
|
||||
@@ -305,7 +305,7 @@
|
||||
ccache: "{{ result_ipareplica_prepare.ccache }}"
|
||||
installer_ccache: "{{ result_ipareplica_prepare.installer_ccache }}"
|
||||
_ca_enabled: "{{ result_ipareplica_prepare._ca_enabled }}"
|
||||
_dirsrv_pkcs12_info: "{{ result_ipareplica_prepare._dirsrv_pkcs12_info if result_ipareplica_prepare._dirsrv_pkcs12_info != None else omit }}"
|
||||
_dirsrv_pkcs12_info: "{{ result_ipareplica_prepare._dirsrv_pkcs12_info if result_ipareplica_prepare._dirsrv_pkcs12_info != None else omit }}"
|
||||
subject_base: "{{ result_ipareplica_prepare.subject_base }}"
|
||||
_top_dir: "{{ result_ipareplica_prepare._top_dir }}"
|
||||
_add_to_ipaservers: "{{ result_ipareplica_prepare._add_to_ipaservers }}"
|
||||
@@ -370,7 +370,7 @@
|
||||
config_master_host_name:
|
||||
"{{ result_ipareplica_install_ca_certs.config_master_host_name }}"
|
||||
ccache: "{{ result_ipareplica_prepare.ccache }}"
|
||||
_pkinit_pkcs12_info: "{{ result_ipareplica_prepare._pkinit_pkcs12_info if result_ipareplica_prepare._pkinit_pkcs12_info != None else omit }}"
|
||||
_pkinit_pkcs12_info: "{{ result_ipareplica_prepare._pkinit_pkcs12_info if result_ipareplica_prepare._pkinit_pkcs12_info != None else omit }}"
|
||||
_top_dir: "{{ result_ipareplica_prepare._top_dir }}"
|
||||
dirman_password: "{{ ipareplica_dirman_password }}"
|
||||
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
force: yes
|
||||
- name: Install - Extend ipaserver_external_cert_files with "/root/{{ item | basename }}"
|
||||
ansible.builtin.set_fact:
|
||||
ipaserver_external_cert_files: "{{ ipaserver_external_cert_files + [ '/root/' + (item | basename) ] }}"
|
||||
ipaserver_external_cert_files: "{{ ipaserver_external_cert_files + ['/root/' + (item | basename)] }}"
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
- name: Get Domain from server-find server name
|
||||
ansible.builtin.set_fact:
|
||||
ipaserver_domain: "{{ (result_ipa_server_show.stdout | regex_search('cn: (.+)', '\\1'))[0].split('.')[1:] | join ('.') }}"
|
||||
ipaserver_domain: "{{ (result_ipa_server_show.stdout | regex_search('cn: (.+)', '\\1'))[0].split('.')[1:] | join('.') }}"
|
||||
when: ipaserver_domain is not defined
|
||||
|
||||
- name: Get ipa-ca records
|
||||
|
||||
Reference in New Issue
Block a user