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

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
parent 971d40c3
No related branches found
No related tags found
No related merge requests found
---
- 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.
......
---
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment