| --- |
| - name: Fail if cassandra user name is not provided |
| fail: |
| msg: 'cassandra user name is required, please provide cassandra user name' |
| when: opdk_cass_username is not defined or opdk_cass_username == "" |
| |
| - name: Fail if cassandra user password is not provided |
| fail: |
| msg: 'cassandra user password is required, please provide cassandra user password' |
| when: opdk_cass_password is not defined or opdk_cass_password == "" |
| |
| - name: Fail if ds group is not provided |
| fail: |
| msg: 'ds group is not defined in the inventory file, please define the ds group in the inventory file' |
| when: groups['cassandra'] is not defined |
| |
| - name: Fail if dc-1 group is not provided |
| fail: |
| msg: 'dc-1 group is not defined in the inventory file, please define the dc-1 group in the inventory file' |
| when: groups['dc-1'] is not defined |
| |
| - name: Fail if dc-1-ds group is not provided |
| fail: |
| msg: 'dc-1-ds group is not defined in the inventory file, please define the dc-1-ds group in the inventory file' |
| when: groups['dc-1-cassandra'] is not defined |
| |
| - name: Fail if dc-1-ms group is not provided |
| fail: |
| msg: 'dc-1-ms group is not defined in the inventory file, please define the dc-1-ms group in the inventory file' |
| when: groups['dc-1-ms'] is not defined |
| |
| - name: Construct cassandra hosts configuration |
| cassandra_hosts: |
| inventory_hostname: '{{ inventory_hostname }}' |
| hostvars: '{{ hostvars }}' |
| when: provided_response_file is not defined or not provided_response_file |