callback_demo/callback_demo.yml
Chris Hammer 782a32c2fb
All checks were successful
Ansible Test / CentOS9-Ansible-Pipeline (push) Successful in 6s
add env dump
2024-02-07 13:32:11 -05:00

34 lines
838 B
YAML

- name: Callback plugin from collection demo
hosts: localhost
connection: local
become: false
gather_facts: false
tasks:
- name: Simply say hello
ansible.builtin.debug:
msg: Hello.
- name: Hello again.
ansible.builtin.debug:
msg: Hello. Again.
- name: Job status URL & token obtained from custom credential extra_vars
ansible.builtin.debug:
msg:
- "job_status_url: {{ job_status_url }}"
- "job_status_token: {{ job_status_token }}"
when:
- job_status_url is defined
- job_status_token is defined
- name: Get Ansible Job ID
ansible.builtin.set_fact:
callback_demo_job_id: "{{ lookup('ENV', 'JOB_ID') | default('Unknown Job ID') }}"
- name: Show environment
ansible.builtin.debug:
var: vars