Explorar el Código

Better defaults

Zach Isbach hace 4 años
padre
commit
da953fa7d5

+ 13 - 12
plays/gluster/vols.yaml

@@ -4,25 +4,26 @@
   vars:
     gluster_lvm_vol_vg: gluster
     gluster_nodes: "nodeA,nodeB"
-    gluster_allow_nginx: "{{ gluster_nodes }},docker_registry"
+    gluster_allow_nginx: "{{ gluster_nodes }},docker_registry,work-marsea"
   roles:
-    - { role: gluster_lvm_vol,
-          gluster_lvm_vol_name: zib,
-          docker_lvm_vol_size: 1G,
-          gluster_lvm_vol_sslallow: "nodeA,nodeB,work-marsea"
-      }
     - { role: gluster_lvm_vol,
           gluster_lvm_vol_name: nginx,
-          docker_lvm_vol_size: 1G,
-          gluster_lvm_vol_sslallow: "{{gluster_allow_nginx}}"
+          gluster_lvm_vol_size: 1G,
+          gluster_lvm_vol_sslallow: "{{ gluster_allow_nginx }}"
       }
     - { role: gluster_lvm_vol,
           gluster_lvm_vol_name: letsencrypt,
-          docker_lvm_vol_size: 1G,
-          gluster_lvm_vol_sslallow: "{{gluster_allow_nginx}}"
+          gluster_lvm_vol_size: 1G,
+          gluster_lvm_vol_sslallow: "{{ gluster_allow_nginx }}"
       }
     - { role: gluster_lvm_vol,
           gluster_lvm_vol_name: docker_registry,
-          docker_lvm_vol_size: 2G,
-          gluster_lvm_vol_sslallow: "{{gluster_allow_nginx}}"
+          gluster_lvm_vol_size: 2G,
+          gluster_lvm_vol_sslallow: "{{ gluster_allow_nginx }}"
+      }
+    - { role: gluster_lvm_vol,
+          gluster_lvm_vol_name: zib,
+          gluster_lvm_vol_perms: '0750',
+          gluster_lvm_vol_size: 1G,
+          gluster_lvm_vol_sslallow: "nodeA,nodeB,work-marsea"
       }

+ 0 - 1
roles/gluster_lvm_vol/defaults/main.yml

@@ -3,4 +3,3 @@ gluster_lvm_vol_size: 1G
 gluster_lvm_vol_dev: "/dev/mapper/{{ gluster_lvm_vol_vg }}-{{ gluster_lvm_vol_name }}"
 gluster_lvm_vol_group: "{{ gluster_lvm_vol_name }}"
 gluster_lvm_vol_cluster: "{{ groups[ gluster_lvm_vol_vg ] }}"
-gluster_lvm_vol_perms: '0770'

+ 1 - 1
roles/gluster_lvm_vol/tasks/main.yml

@@ -19,5 +19,5 @@
     gluster_vol_cluster: "{{ gluster_lvm_vol_cluster }}"
     gluster_vol_name: "{{ gluster_lvm_vol_name }}"
     gluster_vol_dev: "{{ gluster_lvm_vol_dev }}"
-    gluster_vol_perms: "{{ gluster_lvm_vol_perms }}"
+    gluster_vol_perms: "{{ gluster_lvm_vol_perms | default(omit) }}"
     gluster_vol_ssl_allow: "{{ gluster_lvm_vol_sslallow | default(omit) }}"