mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
servicedelegation*: 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
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Include FreeIPA facts.
|
- 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.
|
# Test will only be executed if host is not a server.
|
||||||
- name: Execute with server context in the client.
|
- name: Execute with server context in the client.
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
# in upstream CI.
|
# in upstream CI.
|
||||||
|
|
||||||
- name: Test servicedelegationrule using client context, in client host.
|
- name: Test servicedelegationrule using client context, in client host.
|
||||||
import_playbook: test_servicedelegationrule.yml
|
ansible.builtin.import_playbook: test_servicedelegationrule.yml
|
||||||
when: groups['ipaclients']
|
when: groups['ipaclients']
|
||||||
vars:
|
vars:
|
||||||
ipa_test_host: ipaclients
|
ipa_test_host: ipaclients
|
||||||
|
|
||||||
- name: Test servicedelegationrule using client context, in server host.
|
- name: Test servicedelegationrule using client context, in server host.
|
||||||
import_playbook: test_servicedelegationrule.yml
|
ansible.builtin.import_playbook: test_servicedelegationrule.yml
|
||||||
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# setup
|
||||||
- include_tasks: ../env_freeipa_facts.yml
|
- ansible.builtin.include_tasks: ../env_freeipa_facts.yml
|
||||||
|
|
||||||
# host principals are only possible with IPA 4.9.0+
|
# host principals are only possible with IPA 4.9.0+
|
||||||
- block:
|
- block:
|
||||||
@@ -14,17 +14,17 @@
|
|||||||
# SET FACTS
|
# SET FACTS
|
||||||
|
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
when: ipaserver_domain is not defined
|
when: ipaserver_domain is not defined
|
||||||
|
|
||||||
- name: Get REALM from server name
|
- name: Get REALM from server name
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_realm: "{{ ipaserver_domain | upper }}"
|
ipaserver_realm: "{{ ipaserver_domain | upper }}"
|
||||||
when: ipaserver_realm is not defined
|
when: ipaserver_realm is not defined
|
||||||
|
|
||||||
- name: Set test-host fqdn
|
- name: Set test-host fqdn
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
test_host_fqdn: "{{ 'test-host.' + ipaserver_domain }}"
|
test_host_fqdn: "{{ 'test-host.' + ipaserver_domain }}"
|
||||||
test_host_fqdn_realm: "{{ 'test-host.' + ipaserver_domain + '@' + ipaserver_realm }}"
|
test_host_fqdn_realm: "{{ 'test-host.' + ipaserver_domain + '@' + ipaserver_realm }}"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Include FreeIPA facts.
|
- 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.
|
# Test will only be executed if host is not a server.
|
||||||
- name: Execute with server context in the client.
|
- name: Execute with server context in the client.
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
# in upstream CI.
|
# in upstream CI.
|
||||||
|
|
||||||
- name: Test servicedelegationtarget using client context, in client host.
|
- name: Test servicedelegationtarget using client context, in client host.
|
||||||
import_playbook: test_servicedelegationtarget.yml
|
ansible.builtin.import_playbook: test_servicedelegationtarget.yml
|
||||||
when: groups['ipaclients']
|
when: groups['ipaclients']
|
||||||
vars:
|
vars:
|
||||||
ipa_test_host: ipaclients
|
ipa_test_host: ipaclients
|
||||||
|
|
||||||
- name: Test servicedelegationtarget using client context, in server host.
|
- name: Test servicedelegationtarget using client context, in server host.
|
||||||
import_playbook: test_servicedelegationtarget.yml
|
ansible.builtin.import_playbook: test_servicedelegationtarget.yml
|
||||||
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# setup
|
||||||
- include_tasks: ../env_freeipa_facts.yml
|
- ansible.builtin.include_tasks: ../env_freeipa_facts.yml
|
||||||
|
|
||||||
# host principals are only possible with IPA 4.9.0+
|
# host principals are only possible with IPA 4.9.0+
|
||||||
- block:
|
- block:
|
||||||
@@ -14,17 +14,17 @@
|
|||||||
# SET FACTS
|
# SET FACTS
|
||||||
|
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
when: ipaserver_domain is not defined
|
when: ipaserver_domain is not defined
|
||||||
|
|
||||||
- name: Get REALM from server name
|
- name: Get REALM from server name
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_realm: "{{ ipaserver_domain | upper }}"
|
ipaserver_realm: "{{ ipaserver_domain | upper }}"
|
||||||
when: ipaserver_realm is not defined
|
when: ipaserver_realm is not defined
|
||||||
|
|
||||||
- name: Set test-host fqdn
|
- name: Set test-host fqdn
|
||||||
set_fact:
|
ansible.builtin.set_fact:
|
||||||
test_host_fqdn: "{{ 'test-host.' + ipaserver_domain }}"
|
test_host_fqdn: "{{ 'test-host.' + ipaserver_domain }}"
|
||||||
test_host_fqdn_realm: "{{ 'test-host.' + ipaserver_domain + '@' + ipaserver_realm }}"
|
test_host_fqdn_realm: "{{ 'test-host.' + ipaserver_domain + '@' + ipaserver_realm }}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user