Skip to content

Instantly share code, notes, and snippets.

@czunker
Last active October 19, 2015 14:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czunker/32d07ced04928d89d527 to your computer and use it in GitHub Desktop.
Save czunker/32d07ced04928d89d527 to your computer and use it in GitHub Desktop.
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