Last active
December 14, 2015 19:29
-
-
Save Rudd-O/5137196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: | |
- karen.dragonfear | |
- paola.dragonfear | |
- mathilda.dragonfear | |
user: root | |
vars: | |
backupserver: mathilda.dragonfear | |
tasks: | |
- name: get zpool data | |
action: shell zpool list -H -o name | |
register: zpools | |
- name: print out info | |
action: shell echo "$item" | |
with_items: ${zpools.stdout_lines} | |
- name: generate Jenkins configuration file | |
action: template src=../backupserver/job.xml.j2 dest="/var/lib/jenkins/jobs/Backup $item from $host/config.xml" owner=jenkins group=jenkins | |
with_items: ${zpools.stdout_lines} | |
delegate_to: $backupserver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment