Skip to content
Snippets Groups Projects
Unverified Commit ba353a9b authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman Committed by GitHub
Browse files

Merge pull request #1007 from t-woerner/FQCN_ansible_builtin

Use FQCN for ansible.builtin
parents a8d44e2c b175c78c
Branches
Tags
No related merge requests found
Showing
with 79 additions and 79 deletions
......@@ -2,7 +2,7 @@
# tasks to uninstall IPA client
- name: Uninstall - Uninstall IPA client
command: >
ansible.builtin.command: >
/usr/sbin/ipa-client-install
--uninstall
-U
......@@ -17,6 +17,6 @@
when: ipaclient_cleanup_dns_resolver | bool
#- name: Remove IPA client package
# package:
# ansible.builtin.package:
# name: "{{ ipaclient_packages }}"
# state: absent
......@@ -4,24 +4,24 @@
- block:
- name: Install - Ensure IPA replica packages are installed
package:
ansible.builtin.package:
name: "{{ ipareplica_packages }}"
state: present
- name: Install - Ensure IPA replica packages for dns are installed
package:
ansible.builtin.package:
name: "{{ ipareplica_packages_dns }}"
state: present
when: ipareplica_setup_dns | bool
- name: Install - Ensure IPA replica packages for adtrust are installed
package:
ansible.builtin.package:
name: "{{ ipareplica_packages_adtrust }}"
state: present
when: ipareplica_setup_adtrust | bool
- name: Install - Ensure that firewall packages installed
package:
ansible.builtin.package:
name: "{{ ipareplica_packages_firewalld }}"
state: present
when: ipareplica_setup_firewalld | bool
......@@ -30,20 +30,20 @@
- block:
- name: Firewalld service - Ensure that firewalld is running
systemd:
ansible.builtin.systemd:
name: firewalld
enabled: yes
state: started
- name: Firewalld - Verify runtime zone "{{ ipareplica_firewalld_zone }}"
shell: >
ansible.builtin.shell: >
firewall-cmd
--info-zone="{{ ipareplica_firewalld_zone }}"
>/dev/null
when: ipareplica_firewalld_zone is defined
- name: Firewalld - Verify permanent zone "{{ ipareplica_firewalld_zone }}"
shell: >
ansible.builtin.shell: >
firewall-cmd
--permanent
--info-zone="{{ ipareplica_firewalld_zone }}"
......@@ -53,12 +53,12 @@
when: ipareplica_setup_firewalld | bool
- name: Install - Set ipareplica_servers
set_fact:
ansible.builtin.set_fact:
ipareplica_servers: "{{ groups['ipaservers'] | list }}"
when: groups.ipaservers is defined and ipareplica_servers is not defined
- name: Install - Set default principal if no keytab is given
set_fact:
ansible.builtin.set_fact:
ipaadmin_principal: admin
when: ipaadmin_principal is undefined and ipaclient_keytab is undefined
......@@ -108,7 +108,7 @@
# result_ipareplica_test.server_already_configured is defined)
- name: Install - Setup client
include_role:
ansible.builtin.include_role:
name: ipaclient
vars:
state: present
......@@ -120,7 +120,7 @@
when: not result_ipareplica_test.client_enrolled
- name: Install - Configure firewalld
command: >
ansible.builtin.command: >
firewall-cmd
--permanent
--zone="{{ ipareplica_firewalld_zone if ipareplica_firewalld_zone is
......@@ -134,7 +134,7 @@
when: ipareplica_setup_firewalld | bool
- name: Install - Configure firewalld runtime
command: >
ansible.builtin.command: >
firewall-cmd
--zone="{{ ipareplica_firewalld_zone if ipareplica_firewalld_zone is
defined else '' }}"
......@@ -222,7 +222,7 @@
- name: Install - Set dirman password
no_log: yes
set_fact:
ansible.builtin.set_fact:
ipareplica_dirman_password:
"{{ result_ipareplica_master_password.password }}"
......@@ -776,14 +776,14 @@
register: result_ipareplica_enable_ipa
- name: Install - Cleanup root IPA cache
file:
ansible.builtin.file:
path: "/root/.ipa_cache"
state: absent
when: result_ipareplica_enable_ipa.changed
always:
- name: Cleanup temporary files
file:
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
......
......@@ -2,7 +2,7 @@
# tasks file for ipareplica
- name: Import variables specific to distribution
include_vars: "{{ item }}"
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}.yml"
- "vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
......@@ -17,9 +17,9 @@
- "vars/default.yml"
- name: Install IPA replica
include_tasks: install.yml
ansible.builtin.include_tasks: install.yml
when: state|default('present') == 'present'
- name: Uninstall IPA replica
include_tasks: uninstall.yml
ansible.builtin.include_tasks: uninstall.yml
when: state|default('present') == 'absent'
......@@ -2,7 +2,7 @@
# tasks to uninstall IPA replica
- name: Uninstall - Uninstall IPA replica
command: >
ansible.builtin.command: >
/usr/sbin/ipa-server-install
--uninstall
-U
......@@ -22,7 +22,7 @@
delay: 1
#- name: Uninstall - Remove all replication agreements and data about replica
# command: >
# ansible.builtin.command: >
# /usr/sbin/ipa-replica-manage
# del
# {{ ipareplica_hostname | default(ansible_facts['fqdn']) }}
......@@ -32,6 +32,6 @@
# delegate_to: "{{ groups.ipaserver[0] | default(fail) }}"
#- name: Remove IPA replica packages
# package:
# ansible.builtin.package:
# name: "{{ ipareplica_packages }}"
# state: absent
---
- name: Install - Initialize ipaserver_external_cert_files
set_fact:
ansible.builtin.set_fact:
ipaserver_external_cert_files: []
when: ipaserver_external_cert_files is undefined
- name: Install - Copy "{{ item }}" "{{ inventory_hostname }}':/root/'{{ item | basename }}"
copy:
ansible.builtin.copy:
src: "{{ item }}"
dest: "/root/{{ item | basename }}"
mode: preserve
force: yes
- name: Install - Extend ipaserver_external_cert_files with "/root/{{ item | basename }}"
set_fact:
ansible.builtin.set_fact:
ipaserver_external_cert_files: "{{ ipaserver_external_cert_files + [ '/root/' + (item | basename) ] }}"
......@@ -3,24 +3,24 @@
- block:
- name: Install - Ensure that IPA server packages are installed
package:
ansible.builtin.package:
name: "{{ ipaserver_packages }}"
state: present
- name: Install - Ensure that IPA server packages for dns are installed
package:
ansible.builtin.package:
name: "{{ ipaserver_packages_dns }}"
state: present
when: ipaserver_setup_dns | bool
- name: Install - Ensure that IPA server packages for adtrust are installed
package:
ansible.builtin.package:
name: "{{ ipaserver_packages_adtrust }}"
state: present
when: ipaserver_setup_adtrust | bool
- name: Install - Ensure that firewall packages installed
package:
ansible.builtin.package:
name: "{{ ipaserver_packages_firewalld }}"
state: present
when: ipaserver_setup_firewalld | bool
......@@ -29,20 +29,20 @@
- block:
- name: Firewalld service - Ensure that firewalld is running
systemd:
ansible.builtin.systemd:
name: firewalld
enabled: yes
state: started
- name: Firewalld - Verify runtime zone "{{ ipaserver_firewalld_zone }}"
shell: >
ansible.builtin.shell: >
firewall-cmd
--info-zone="{{ ipaserver_firewalld_zone }}"
>/dev/null
when: ipaserver_firewalld_zone is defined
- name: Firewalld - Verify permanent zone "{{ ipaserver_firewalld_zone }}"
shell: >
ansible.builtin.shell: >
firewall-cmd
--permanent
--info-zone="{{ ipaserver_firewalld_zone }}"
......@@ -51,7 +51,7 @@
when: ipaserver_setup_firewalld | bool
- include_tasks: "{{ role_path }}/tasks/copy_external_cert.yml"
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_external_cert.yml"
with_items: "{{ ipaserver_external_cert_files_from_controller }}"
when: ipaserver_external_cert_files_from_controller is defined and
ipaserver_external_cert_files_from_controller|length > 0 and
......@@ -144,7 +144,7 @@
- name: Install - Use new master password
no_log: yes
set_fact:
ansible.builtin.set_fact:
ipaserver_master_password:
"{{ result_ipaserver_master_password.password }}"
......@@ -308,7 +308,7 @@
register: result_ipaserver_setup_ca
- name: Copy /root/ipa.csr to "{{ inventory_hostname }}-ipa.csr"
fetch:
ansible.builtin.fetch:
src: /root/ipa.csr
dest: "{{ inventory_hostname }}-ipa.csr"
flat: yes
......@@ -416,7 +416,7 @@
_dirsrv_pkcs12_info: "{{ result_ipaserver_test._dirsrv_pkcs12_info if result_ipaserver_test._dirsrv_pkcs12_info != None else omit }}"
- name: Install - Setup client
include_role:
ansible.builtin.include_role:
name: ipaclient
vars:
state: present
......@@ -438,13 +438,13 @@
register: result_ipaserver_enable_ipa
- name: Install - Cleanup root IPA cache
file:
ansible.builtin.file:
path: "/root/.ipa_cache"
state: absent
when: result_ipaserver_enable_ipa.changed
- name: Install - Configure firewalld
command: >
ansible.builtin.command: >
firewall-cmd
--permanent
--zone="{{ ipaserver_firewalld_zone if ipaserver_firewalld_zone is
......@@ -458,7 +458,7 @@
when: ipaserver_setup_firewalld | bool
- name: Install - Configure firewalld runtime
command: >
ansible.builtin.command: >
firewall-cmd
--zone="{{ ipaserver_firewalld_zone if ipaserver_firewalld_zone is
defined else '' }}"
......@@ -474,7 +474,7 @@
always:
- name: Cleanup temporary files
file:
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
......
......@@ -2,7 +2,7 @@
# tasks file for ipaserver
- name: Import variables specific to distribution
include_vars: "{{ item }}"
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}.yml"
- "vars/{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_major_version'] }}.yml"
......@@ -17,9 +17,9 @@
- "vars/default.yml"
- name: Install IPA server
include_tasks: install.yml
ansible.builtin.include_tasks: install.yml
when: state|default('present') == 'present'
- name: Uninstall IPA server
include_tasks: uninstall.yml
ansible.builtin.include_tasks: uninstall.yml
when: state|default('present') == 'absent'
......@@ -2,7 +2,7 @@
# tasks to uninstall IPA server
- name: Uninstall - Uninstall IPA server
command: >
ansible.builtin.command: >
/usr/sbin/ipa-server-install
--uninstall
-U
......@@ -15,6 +15,6 @@
changed_when: uninstall.rc == 0
#- name: Remove IPA server packages
# package:
# ansible.builtin.package:
# name: "{{ ipaserver_packages }}"
# state: absent
......@@ -6,7 +6,7 @@
tasks:
- name: Include FreeIPA facts.
include_tasks: ../env_freeipa_facts.yml
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
# Test will only be executed if host is not a server.
- name: Execute with server context in the client.
......@@ -28,13 +28,13 @@
# in upstream CI.
- name: Test automember using client context, in client host.
import_playbook: test_automember.yml
ansible.builtin.import_playbook: test_automember.yml
when: groups['ipaclients']
vars:
ipa_test_host: ipaclients
- name: Test automember using client context, in server host.
import_playbook: test_automember.yml
ansible.builtin.import_playbook: test_automember.yml
when: groups['ipaclients'] is not defined or not groups['ipaclients']
vars:
ipa_context: client
......@@ -8,7 +8,7 @@
# SET FACTS
- name: Get Domain from server name
set_fact:
ansible.builtin.set_fact:
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] |
join ('.') }}"
when: ipaserver_domain is not defined
......
......@@ -8,7 +8,7 @@
# SET FACTS
- name: Get Domain from server name
set_fact:
ansible.builtin.set_fact:
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] |
join ('.') }}"
when: ipaserver_domain is not defined
......
......@@ -6,7 +6,7 @@
tasks:
- name: Include FreeIPA facts.
include_tasks: ../env_freeipa_facts.yml
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
# Test will only be executed if host is not a server.
- name: Execute with server context in the client.
......@@ -29,13 +29,13 @@
# in upstream CI.
- name: Test automountlocation using client context, in client host.
import_playbook: test_automountkey.yml
ansible.builtin.import_playbook: test_automountkey.yml
when: groups['ipaclients']
vars:
ipa_test_host: ipaclients
- name: Test automountlocation using client context, in server host.
import_playbook: test_automountkey.yml
ansible.builtin.import_playbook: test_automountkey.yml
when: groups['ipaclients'] is not defined or not groups['ipaclients']
vars:
ipa_context: client
......@@ -6,7 +6,7 @@
tasks:
- name: Include FreeIPA facts.
include_tasks: ../env_freeipa_facts.yml
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
# Test will only be executed if host is not a server.
- name: Execute with server context in the client.
......@@ -27,13 +27,13 @@
# in upstream CI.
- name: Test automountlocation using client context, in client host.
import_playbook: test_automountlocation.yml
ansible.builtin.import_playbook: test_automountlocation.yml
when: groups['ipaclients']
vars:
ipa_test_host: ipaclients
- name: Test automountlocation using client context, in server host.
import_playbook: test_automountlocation.yml
ansible.builtin.import_playbook: test_automountlocation.yml
when: groups['ipaclients'] is not defined or not groups['ipaclients']
vars:
ipa_context: client
......@@ -6,7 +6,7 @@
tasks:
- name: Include FreeIPA facts.
include_tasks: ../env_freeipa_facts.yml
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
# Test will only be executed if host is not a server.
- name: Execute with server context in the client.
......@@ -28,13 +28,13 @@
# in upstream CI.
- name: Test automountmap using client context, in client host.
import_playbook: test_automountmap.yml
ansible.builtin.import_playbook: test_automountmap.yml
when: groups['ipaclients']
vars:
ipa_test_host: ipaclients
- name: Test automountmap using client context, in server host.
import_playbook: test_automountmap.yml
ansible.builtin.import_playbook: test_automountmap.yml
when: groups['ipaclients'] is not defined or not groups['ipaclients']
vars:
ipa_context: client
......@@ -5,7 +5,7 @@
tasks:
- name: Run generate-certificates.sh
command: >
ansible.builtin.command: >
/bin/bash
generate-certificates.sh delete "{{ item }}"
args:
......
......@@ -5,7 +5,7 @@
tasks:
- name: Run generate-certificates.sh
command: >
ansible.builtin.command: >
/bin/bash
generate-certificates.sh create
"{{ groups.ipareplicas[0] }}"
......@@ -40,18 +40,18 @@
pre_tasks:
- name: Remove "/root/ca-less-test"
file:
ansible.builtin.file:
path: "/root/ca-less-test"
state: absent
- name: Generate "/root/ca-less-test"
file:
ansible.builtin.file:
path: "/root/ca-less-test"
state: directory
mode: 0775
- name: Copy CA certificate
copy:
ansible.builtin.copy:
src: "{{ playbook_dir }}/certificates/root-ca/cert.pem"
dest: "/root/ca-less-test/ca.crt"
owner: root
......@@ -59,7 +59,7 @@
mode: "0644"
- name: Copy p12 certificates
copy:
ansible.builtin.copy:
src: "{{ playbook_dir }}/certificates/{{ item }}/{{ groups.ipareplicas[0] }}/cert.p12"
dest: "/root/ca-less-test/{{ item }}.p12"
owner: root
......@@ -76,7 +76,7 @@
post_tasks:
- name: Fix KDC certificate permissions
file:
ansible.builtin.file:
path: /var/kerberos/krb5kdc/kdc.crt
owner: root
group: root
......
......@@ -5,7 +5,7 @@
tasks:
- name: Run generate-certificates.sh
command: >
ansible.builtin.command: >
/bin/bash
generate-certificates.sh create
"{{ groups.ipaserver[0] }}"
......@@ -40,18 +40,18 @@
pre_tasks:
- name: Remove "/root/ca-less-test"
file:
ansible.builtin.file:
path: "/root/ca-less-test"
state: absent
- name: Generate "/root/ca-less-test"
file:
ansible.builtin.file:
path: "/root/ca-less-test"
state: directory
mode: 0775
- name: Copy CA certificate
copy:
ansible.builtin.copy:
src: "{{ playbook_dir }}/certificates/root-ca/cert.pem"
dest: "/root/ca-less-test/ca.crt"
owner: root
......@@ -59,7 +59,7 @@
mode: "0644"
- name: Copy p12 certificates
copy:
ansible.builtin.copy:
src: "{{ playbook_dir }}/certificates/{{ item }}/{{ groups.ipaserver[0] }}/cert.p12"
dest: "/root/ca-less-test/{{ item }}.p12"
owner: root
......
......@@ -5,7 +5,7 @@
gather_facts: false
tasks:
- include_tasks: ../env_freeipa_facts.yml
- ansible.builtin.include_tasks: ../env_freeipa_facts.yml
- block:
# Retrieve current configuration.
......@@ -16,7 +16,7 @@
register: previousconfig
- name: Display current configuration.
debug:
ansible.builtin.debug:
var: previousconfig
# setup environment.
......@@ -481,7 +481,7 @@
register: result
- name: "CA-Renewal server warning."
debug:
ansible.builtin.debug:
msg: "Due to a test failure, IPA CA-Renewal Server might not be correctly be set. Check your configuration."
always:
......
......@@ -6,7 +6,7 @@
tasks:
- name: Include FreeIPA facts.
include_tasks: ../env_freeipa_facts.yml
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
# Test will only be executed if host is not a server.
- name: Execute with server context in the client.
......@@ -26,13 +26,13 @@
# in upstream CI.
- name: Test config using client context, in client host.
import_playbook: test_config.yml
ansible.builtin.import_playbook: test_config.yml
when: groups['ipaclients']
vars:
ipa_test_host: ipaclients
- name: Test config using client context, in server host.
import_playbook: test_config.yml
ansible.builtin.import_playbook: test_config.yml
when: groups['ipaclients'] is not defined or not groups['ipaclients']
vars:
ipa_context: client
......@@ -7,7 +7,7 @@
tasks:
- name: Set FreeIPA facts.
include_tasks: ../env_freeipa_facts.yml
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
# GET CURRENT CONFIG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment