Hi Folks,
I got an issue with tower_job_wait module in anisble tower. i use to launch an other template and wait for it to complete. template has been triggered and executed successfully but once after that wait job gets failed with below output.
[vinoth@ansible ansible]$ tower-cli --version
Tower CLI 3.1.7
[vinoth@ansible ansible]$ cat tower_launch.yaml
---
- hosts: localhost
gather_facts: false
tasks:
- name: "Launching tower job"
tower_job_launch:
job_template: "Tower_job_testing"
tower_username: vinoth
tower_password: *******
register: tower_job_info
- debug:
msg: "{{tower_job_info}}"
- name: "Job wait"
tower_job_wait:
timeout: 60
tower_username: vinoth
tower_password: ********
delegate_to: localhost
Tower_job_testing --- this template just simply execute below playbook
---
- hosts: testserver1
gather_facts: true
tasks:
- debug:
msg: "{{ansible_user_id}}"
I am not sure what i missing here.
[vinoth@ansible ansible]$ ansible-playbook tower_launch.yaml
PLAY [localhost] **************************************************************************************************************************************************************************************************
TASK [Launching tower job] ****************************************************************************************************************************************************************************************
changed: [localhost]
TASK [debug] ******************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "559033"
}
[WARNING]: Module invocation had junk after the JSON data: TASK [debug] ******************************************************************* ok: [testserver1] => { "msg":
"vinoth" } PLAY RECAP ********************************************************************* testserver1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0
ignored=0 {"status": "successful", "success": true, "started": "2020-01-17T09:57:46.672832Z", "elapsed": 22.736, "finished": "2020-01-17T09:58:09.408889Z", "invocation": {"module_args": {"min_interval":
1.0, "max_interval": 30.0, "job_id": 559033, "timeout": 60}}, "id": 559033}
TASK [Job wait] ***************************************************************************************************************************************************************************************************
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "module_stderr": "", "module_stdout": "Identity added: /tmp/awx_559033_rs6_w18k/artifacts/559033/ssh_key_data (/tmp/awx_559033_rs6_w18k/artifacts/559033/ssh_key_data)\n[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to \nallow bad characters in group names by default, this will change, but still be \nuser configurable on deprecation. This feature will be removed in version 2.10.\n Deprecation warnings can be disabled by setting deprecation_warnings=False in \nansible.cfg.\n[WARNING]: Invalid characters were found in group names but not replaced, use\n-vvvv to see details\n\n\n\nPLAY [testserver1 ***********************************************\n\n\n\nTASK [Gathering Facts] *********************************************************\nok: [testserver1]\n\n\n\nTASK [debug] *******************************************************************\nok: [testserver1] => {\n \"msg\": \"s-ansible-u-itseelm\"\n}\n\nPLAY RECAP *********************************************************************\ntestserve1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 \n\n\n{\"status\": \"successful\", \"success\": true, \"started\": \"2020-01-17T09:57:46.672832Z\", \"elapsed\": 22.736, \"finished\": \"2020-01-17T09:58:09.408889Z\", \"invocation\": {\"module_args\": {\"min_interval\": 1.0, \"max_interval\": 30.0, \"job_id\": 559033, \"timeout\": 60}}, \"id\": 559033}\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 0}