mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
dnsrecord: 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:
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- name: Setup variables and facts.
|
||||
include_tasks: env_vars.yml
|
||||
ansible.builtin.include_tasks: env_vars.yml
|
||||
|
||||
# Cleanup before setup.
|
||||
- name: Cleanup test environment.
|
||||
include_tasks: env_cleanup.yml
|
||||
ansible.builtin.include_tasks: env_cleanup.yml
|
||||
|
||||
# Common setup tasks.
|
||||
- name: Ensure DNS testing zones are present.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# Set common vars and facts for test.
|
||||
- name: Set IPv4 address prefix.
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipv4_prefix: "{{ ansible_facts['default_ipv4'].address.split('.')[:-1] |
|
||||
join('.') }}"
|
||||
ipv4_reverse: "{{ ansible_facts['default_ipv4'].address.split('.')[:-1] |
|
||||
@@ -9,7 +9,7 @@
|
||||
join('.') }}"
|
||||
|
||||
- name: Set zone prefixes.
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
testzone: 'testzone.test'
|
||||
safezone: 'safezone.test'
|
||||
zone_ipv6_reverse: "ip6.arpa."
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
tasks:
|
||||
|
||||
- name: Setup testing environment.
|
||||
include_tasks: env_setup.yml
|
||||
ansible.builtin.include_tasks: env_setup.yml
|
||||
|
||||
- name: Generate self-signed certificates.
|
||||
shell:
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
openssl req -x509 -newkey rsa:2048 -days 365 -nodes -keyout "private{{ item }}.key" -out "cert{{ item }}.pem" -subj '/CN=test'
|
||||
openssl x509 -outform der -in "cert{{ item }}.pem" -out "cert{{ item }}.der"
|
||||
@@ -1547,7 +1547,7 @@
|
||||
|
||||
# cleanup
|
||||
- name: Cleanup test environment.
|
||||
include_tasks: env_cleanup.yml
|
||||
ansible.builtin.include_tasks: env_cleanup.yml
|
||||
|
||||
- name: Remove certificate files. # noqa: deprecated-command-syntax
|
||||
ansible.builtin.shell: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
|
||||
|
||||
@@ -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 dnsrecord using client context, in client host.
|
||||
import_playbook: test_dnsrecord.yml
|
||||
ansible.builtin.import_playbook: test_dnsrecord.yml
|
||||
when: groups['ipaclients']
|
||||
vars:
|
||||
ipa_test_host: ipaclients
|
||||
|
||||
- name: Test dnsrecord using client context, in server host.
|
||||
import_playbook: test_dnsrecord.yml
|
||||
ansible.builtin.import_playbook: test_dnsrecord.yml
|
||||
when: groups['ipaclients'] is not defined or not groups['ipaclients']
|
||||
vars:
|
||||
ipa_context: client
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
tasks:
|
||||
|
||||
- name: Setup test environment
|
||||
include_tasks: env_setup.yml
|
||||
ansible.builtin.include_tasks: env_setup.yml
|
||||
|
||||
# tests
|
||||
|
||||
@@ -147,4 +147,4 @@
|
||||
|
||||
# Cleanup
|
||||
- name: Cleanup test environment.
|
||||
include_tasks: env_cleanup.yml
|
||||
ansible.builtin.include_tasks: env_cleanup.yml
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
tasks:
|
||||
- name: Setup testing environment.
|
||||
include_tasks: env_setup.yml
|
||||
ansible.builtin.include_tasks: env_setup.yml
|
||||
|
||||
- name: Add test host.
|
||||
ipahost:
|
||||
@@ -177,4 +177,4 @@
|
||||
state: absent
|
||||
# cleanup
|
||||
- name: Cleanup test environment.
|
||||
include_tasks: env_cleanup.yml
|
||||
ansible.builtin.include_tasks: env_cleanup.yml
|
||||
|
||||
Reference in New Issue
Block a user