diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2020-07-17 16:14:34 +0100 |
---|---|---|
committer | spuiuk <sachin.prabhu@gmail.com> | 2020-08-24 12:26:57 +0100 |
commit | ef5a700db91332070c67db6c62292253fa9209dc (patch) | |
tree | 01e993f6b500870ac375c635930cacb7a524de8e | |
parent | 77e56f6af65f4cc3f6531526a1fc137d5f8ab0a1 (diff) | |
download | samba-integration-ef5a700db91332070c67db6c62292253fa9209dc.tar.gz samba-integration-ef5a700db91332070c67db6c62292253fa9209dc.tar.xz samba-integration-ef5a700db91332070c67db6c62292253fa9209dc.zip |
Rename ctdb cluster vars to be fs agnostic
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
-rw-r--r-- | vagrant/ansible/cluster-vars.yml | 3 | ||||
-rw-r--r-- | vagrant/ansible/roles/ctdb.setup/tasks/main.yml | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/vagrant/ansible/cluster-vars.yml b/vagrant/ansible/cluster-vars.yml index 92fb0a5..086ae1e 100644 --- a/vagrant/ansible/cluster-vars.yml +++ b/vagrant/ansible/cluster-vars.yml @@ -63,7 +63,8 @@ ctdb_network_public_interfaces: - "192.168.123.11" ctdb_network_public_interface_subnet_mask: "24" ctdb_network_public_interface_name: "eth2" -ctdb_glusterfs_volume: "ctdb" +ctdb_cluster_volume: "ctdb" +ctdb_cluster_replica_count: "{{ cluster_hosts|length }}" samba_netbios_name: "GLUSTERTEST" samba_users: diff --git a/vagrant/ansible/roles/ctdb.setup/tasks/main.yml b/vagrant/ansible/roles/ctdb.setup/tasks/main.yml index 6e339d9..d1d8d38 100644 --- a/vagrant/ansible/roles/ctdb.setup/tasks/main.yml +++ b/vagrant/ansible/roles/ctdb.setup/tasks/main.yml @@ -14,16 +14,19 @@ msg: "Please provide these required variable: ctdb_network_public_interface_name" when: ctdb_network_public_interface_name is undefined - fail: - msg: "Please provide these required variable: ctdb_glusterfs_volume" - when: ctdb_glusterfs_volume is undefined + msg: "Please provide these required variable: ctdb_cluster_volume" + when: ctdb_cluster_volume is undefined + - fail: + msg: "Please provide these required variable: ctdb_cluster_replica_count" + when: ctdb_cluster_replica_count is undefined - name: Create the ctdb replicated volume gluster_volume: state: present - name: "{{ ctdb_glusterfs_volume }}" + name: "{{ ctdb_cluster_volume }}" bricks: '{{ ctdb_brick_location }}/ctdb' cluster: "{{ cluster_hosts }}" - replicas: "{{ gluster_cluster_replica_count }}" + replicas: "{{ ctdb_cluster_replica_count }}" run_once: yes - name: Add ctdb package @@ -73,7 +76,7 @@ vars: gluster_features_ctdb_nodes: "{{ ctdb_network_private_interfaces | join(',') }}" gluster_features_ctdb_publicaddr: "{{ ctdb_network_public_interfaces | map('regex_replace','(^.*$)','\\1/' + ctdb_network_public_interface_subnet_mask + ' ' + ctdb_network_public_interface_name) | list |join (',') }}" - gluster_features_ctdb_volume: "{{ ctdb_glusterfs_volume }}" + gluster_features_ctdb_volume: "{{ ctdb_cluster_volume }}" - name: Restart ctdb service: name=ctdb state=restarted enabled=yes |