Improve examples: use FQCNs and always add name: to tasks (#604)

* Improve examples: use FQCNs and always add name: to tasks.

* Improve formulation.

Co-authored-by: Don Naro <dnaro@redhat.com>

* Accidentally added a period.

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
This commit is contained in:
Felix Fontein
2023-05-15 21:41:18 +02:00
committed by GitHub
parent 142403c6cb
commit 3bcc0db4fc
11 changed files with 27 additions and 19 deletions

View File

@@ -69,11 +69,13 @@ EXAMPLES = r'''
register: output
no_log: true # make sure that private key data is not accidentally revealed in logs!
- name: Show generated key
debug:
ansible.builtin.debug:
msg: "{{ output.privatekey }}"
# DO NOT OUTPUT KEY MATERIAL TO CONSOLE OR LOGS IN PRODUCTION!
- block:
- name: Generate or update a Mozilla sops encrypted key
block:
- name: Update sops-encrypted key with the community.sops collection
community.crypto.openssl_privatekey_pipe:
content: "{{ lookup('community.sops.sops', 'private_key.pem.sops') }}"
@@ -88,7 +90,7 @@ EXAMPLES = r'''
when: output is changed
always:
- name: Make sure that output (which contains the private key) is overwritten
set_fact:
ansible.builtin.set_fact:
output: ''
'''