I’m new to ansible, and setting up a POC to run puppet for a specific orchestration task. However, when I run my agent runs, I’m not getting anything back in stdout, even when changes are set to occur. Here’s what’s in my playbook for this task.
-
command: /opt/puppet/bin/puppet agent -t -v --tags=nrpe
register: puppet_agent_result
changed_when: puppet_agent_result.rc == 2
failed_when: puppet_agent_result.rc != 2 and puppet_agent_result.rc != 0 -
debug: var=puppet_agent_result
And the output from a run shows me:
TASK: [command /opt/puppet/bin/puppet agent -t -v ] ****************
ok: [192.168.1.2]
TASK: [debug var=puppet_agent_result] *****************************************
ok: [192.168.1.2] => {
“var”: {
“puppet_agent_result”: {
“changed”: false,
“cmd”: [
“/opt/puppet/bin/puppet”,
“agent”,
“-t”,
“-v”,
],
“delta”: “0:02:16.392225”,
“end”: “2015-05-28 02:58:04.757098”,
“failed”: false,
“failed_when_result”: false,
“invocation”: {
“module_args”: “/opt/puppet/bin/puppet agent -t -v --tags=nrpe”,
“module_name”: “command”
},
“rc”: 0,
“start”: “2015-05-28 02:55:48.364873”,
“stderr”: “”,
“stdout”: “”,
“stdout_lines”: ,
“warnings”:
}
}
}
Any help is greatly appreciated.
Pat