formatting
This commit is contained in:
@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Create in-memory inventory for {{ provision_host }}"
|
- name : "Create in-memory inventory for {{ provision_host }}"
|
||||||
add_host:
|
add_host :
|
||||||
name: "{{ provision_host }}"
|
name : "{{ provision_host }}"
|
||||||
groups:
|
groups :
|
||||||
- remdiation
|
- remdiation
|
||||||
|
|
||||||
|
|
||||||
@ -27,24 +27,24 @@
|
|||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Run file test
|
- name : Run file test
|
||||||
block:
|
block :
|
||||||
- name: "Test #1: register file contents"
|
- name : "Test #1: register file contents"
|
||||||
command :
|
command :
|
||||||
cmd : cat /tmp/hello-ansible.txt
|
cmd : cat /tmp/hello-ansible.txt
|
||||||
changed_when : no
|
changed_when : no
|
||||||
register : r_check_file
|
register : r_check_file
|
||||||
|
|
||||||
|
|
||||||
- name: "Test #2: do something else"
|
- name : "Test #2: do something else"
|
||||||
debug:
|
debug :
|
||||||
msg: Something, something, and something!
|
msg : Something, something, and something!
|
||||||
|
|
||||||
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Exception caught
|
- name : Exception caught
|
||||||
debug:
|
debug :
|
||||||
msg:
|
msg :
|
||||||
- "tower_provision_host : {{ inventory_hostname }}"
|
- "tower_provision_host : {{ inventory_hostname }}"
|
||||||
- "tower_provision_rc : {{ r_check_file.rc }}"
|
- "tower_provision_rc : {{ r_check_file.rc }}"
|
||||||
- "tower_provision_stdout : {{ r_check_file.stdout }}"
|
- "tower_provision_stdout : {{ r_check_file.stdout }}"
|
||||||
@ -63,15 +63,15 @@
|
|||||||
return_content : no
|
return_content : no
|
||||||
validate_certs : no
|
validate_certs : no
|
||||||
body:
|
body:
|
||||||
id: 119
|
id : 119
|
||||||
branch: main
|
branch : main
|
||||||
commit_message: "{{ inventory_hostname }} - FAILED: {{ r_check_file.msg }}"
|
commit_message : "{{ inventory_hostname }} - FAILED: {{ r_check_file.msg }}"
|
||||||
author_name: Chris Hammer
|
author_name : Chris Hammer
|
||||||
author_email: chris.hammer@redhat.com
|
author_email : chris.hammer@redhat.com
|
||||||
actions:
|
actions:
|
||||||
- action: create
|
- action : create
|
||||||
file_path: "failed_jobs/{{ inventory_hostname }}_{{ ansible_date_time.iso8601 }}.txt"
|
file_path : "failed_jobs/{{ inventory_hostname }}_{{ ansible_date_time.iso8601 }}.txt"
|
||||||
content: |
|
content : |
|
||||||
tower_provision_host : {{ inventory_hostname }}
|
tower_provision_host : {{ inventory_hostname }}
|
||||||
tower_provision_rc : {{ r_check_file.rc }}
|
tower_provision_rc : {{ r_check_file.rc }}
|
||||||
tower_provision_stdout : {{ r_check_file.stdout }}
|
tower_provision_stdout : {{ r_check_file.stdout }}
|
||||||
@ -80,9 +80,9 @@
|
|||||||
|
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Job complete
|
- name : Job complete
|
||||||
debug:
|
debug :
|
||||||
msg:
|
msg :
|
||||||
- "tower_provision_host : {{ inventory_hostname }}"
|
- "tower_provision_host : {{ inventory_hostname }}"
|
||||||
- "tower_provision_failed : {{ r_check_file.failed }}"
|
- "tower_provision_failed : {{ r_check_file.failed }}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user