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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0db5081a-0f27-4910-9695-f320744d2ceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to