Created
March 11, 2013 20:01
-
-
Save bcoca/5137216 to your computer and use it in GitHub Desktop.
rewritten
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 | |
debug: msg="$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 $inventory_hostname/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