Last active
May 28, 2020 14:22
-
-
Save gamename/a819dcaf9dc7afc7f6153536c04cb038 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
- name: get our bricks | |
shell: gluster volume info {{ item }} | grep 'Brick1:' | awk 'BEGIN { FS = ":" } ; { print $3 }' | |
register: gluster_bricks | |
with_items: "{{ gluster_volumes.stdout_lines }}" | |
- name: show our gluster bricks | |
debug: | |
var: gluster_bricks.results | |
# How can I extract only 'stdout' from gluster_bricks.results and put those into the 'disks' fact? | |
- name: Save our gluster brick so a common fact | |
set_fact: | |
disks: "{{ gluster_bricks.results}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment