mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +00:00
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
31 lines
928 B
YAML
31 lines
928 B
YAML
---
|
|
#
|
|
# Example keys for this playbook were generated with the commands:
|
|
# $ openssl genrsa -out private.pem 2048
|
|
# $ openssl rsa -in private.pem -pubout > public.pem
|
|
#
|
|
- name: Tests
|
|
hosts: ipaserver
|
|
become: true
|
|
gather_facts: True
|
|
|
|
tasks:
|
|
- name: Copy public key file to server.
|
|
ansible.builtin.copy:
|
|
src: "{{ playbook_dir }}/public.pem"
|
|
dest: "{{ ansible_facts['env'].HOME }}/public.pem"
|
|
owner: "{{ ansible_user }}"
|
|
group: "{{ ansible_user }}"
|
|
mode: 0600
|
|
- name: Ensure asymmetric vault exists with public key from file.
|
|
ipavault:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: asymvault
|
|
username: admin
|
|
vault_type: asymmetric
|
|
vault_public_key_file: "{{ ansible_facts['env'].HOME }}/public.pem"
|
|
- name: Remove public key file from server.
|
|
ansible.builtin.file:
|
|
path: "{{ ansible_facts['env'].HOME }}/public.pem"
|
|
state: absent
|