github.com/jlmeeker/kismatic@v1.10.1-0.20180612190640-57f9005a1f1a/ansible/_volume-update-allowed.yaml (about) 1 --- 2 - hosts: storage[0] 3 any_errors_fatal: true 4 name: "Update Allowed Nodes on All Volumes" 5 become: yes 6 vars_files: 7 - group_vars/all.yaml 8 tasks: 9 - name: List gluster volumes 10 command: gluster volume list 11 register: gluster_volume_list 12 - name: get allowed IP address whitelist on gluster volume 13 shell: gluster volume get {{ item }} nfs.rpc-auth-allow | tail -n 1 | awk '{print $2}' 14 with_items: "{{ gluster_volume_list.stdout_lines }}" 15 register: gluster_volume_list_allowed_ips 16 - name: update allowed IP address whitelist on gluster volume 17 command: gluster volume set {{ item.item }} nfs.rpc-auth-allow {{ item.stdout }},{{ hostvars[new_node].internal_ipv4 }} 18 with_items: "{{ gluster_volume_list_allowed_ips.results }}"