mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 11:15:55 +00:00
service: 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:
@@ -6,7 +6,7 @@
|
||||
tasks:
|
||||
# setup
|
||||
- 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"
|
||||
@@ -16,17 +16,17 @@
|
||||
delegate_to: localhost
|
||||
|
||||
- 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
|
||||
|
||||
- name: Get IPv4 address prefix from server node
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
ipv4_prefix: "{{ ansible_facts['default_ipv4'].address.split('.')[:-1] |
|
||||
join('.') }}"
|
||||
|
||||
- name: Set test host FQDN
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
test_subdomain: testcert
|
||||
test_host: "{{ 'testcert.' + ipaserver_domain }}"
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
state: absent
|
||||
|
||||
- name: Remove certificate files. # noqa: deprecated-command-syntax
|
||||
shell:
|
||||
ansible.builtin.shell:
|
||||
cmd: rm -f "private{{ item }}.key" "cert{{ item }}.pem" "cert{{ item }}.der" "cert{{ item }}.b64"
|
||||
with_items: [1, 2]
|
||||
become: no
|
||||
|
||||
Reference in New Issue
Block a user