Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Call Puppet Agent inside Ansible playbook
- name: Start puppet agent
sudo: yes
shell: /usr/bin/puppet agent --verbose --test
register: puppet_agent_result
changed_when: puppet_agent_result.rc|int == 2
failed_when: puppet_agent_result.rc|int != 2 and puppet_agent_result.rc|int != 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment