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

@@ -195,7 +195,7 @@ EXAMPLES = '''
register: cert
- name: How many days until cert expires
debug:
ansible.builtin.debug:
msg: "cert expires in: {{ expire_days }} days."
vars:
expire_days: "{{ (( cert.not_after | to_datetime('%Y%m%d%H%M%SZ')) - (ansible_date_time.iso8601 | to_datetime('%Y-%m-%dT%H:%M:%SZ')) ).days }}"