
Instead of a shell script looping over ssh calls, use a simple ansible playbook. The benefit this gets is that we can then also script ad-hoc admin tasks either via playbooks or on the command line. We can also then get rid of the almost entirely unused salt infrastructure. Change-Id: I53112bd1f61d94c0521a32016c8a47c8cf9e50f7
7 lines
289 B
YAML
7 lines
289 B
YAML
---
|
|
- name: run puppet
|
|
command: timeout -s 9 30m puppet agent --onetime --ignorecache --no-daemonize --no-usecacheonfailure --no-splay --detailed-exitcodes --verbose
|
|
register: result
|
|
failed_when: "result.rc != 0 and result.rc != 2"
|
|
changed_when: "result.rc == 4 or result.rc == 6"
|