|
|
|
|
|
|
|
|
{%- if grains.get('noservices') %} |
|
|
{%- if grains.get('noservices') %} |
|
|
- onlyif: /bin/false |
|
|
- onlyif: /bin/false |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
- require: |
|
|
|
|
|
|
|
|
- require: |
|
|
- file: galera_run_dir |
|
|
- file: galera_run_dir |
|
|
- file: galera_init_script |
|
|
- file: galera_init_script |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- require: |
|
|
- require: |
|
|
- cmd: galera_bootstrap_set_root_password |
|
|
- cmd: galera_bootstrap_set_root_password |
|
|
|
|
|
|
|
|
|
|
|
galera_bootstrap_stop_service_pre: |
|
|
|
|
|
cmd.run: |
|
|
|
|
|
- name: mysqladmin -h localhost -u root -p{{ slave.admin.password }} shutdown |
|
|
|
|
|
{%- if not grains.get('noservices', False) %} |
|
|
|
|
|
- ignore_retcode: true |
|
|
|
|
|
- require: |
|
|
|
|
|
- cmd: mysql_bootstrap_update_maint_password |
|
|
|
|
|
{%- else %} |
|
|
|
|
|
- onlyif: /bin/false |
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
galera_bootstrap_stop_service: |
|
|
galera_bootstrap_stop_service: |
|
|
service.dead: |
|
|
service.dead: |
|
|
- name: {{ slave.service }} |
|
|
- name: {{ slave.service }} |
|
|
{%- if grains.get('noservices') %} |
|
|
|
|
|
|
|
|
{%- if not grains.get('noservices', False) %} |
|
|
|
|
|
- require: |
|
|
|
|
|
- cmd: galera_bootstrap_stop_service_pre |
|
|
|
|
|
{%- else %} |
|
|
- onlyif: /bin/false |
|
|
- onlyif: /bin/false |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
- require: |
|
|
|
|
|
- cmd: mysql_bootstrap_update_maint_password |
|
|
|
|
|
|
|
|
|
|
|
galera_bootstrap_init_config: |
|
|
galera_bootstrap_init_config: |
|
|
file.managed: |
|
|
file.managed: |
|
|
|
|
|
|
|
|
- source: salt://galera/files/my.cnf |
|
|
- source: salt://galera/files/my.cnf |
|
|
- mode: 644 |
|
|
- mode: 644 |
|
|
- template: jinja |
|
|
- template: jinja |
|
|
- require: |
|
|
|
|
|
|
|
|
- require: |
|
|
- service: galera_bootstrap_stop_service |
|
|
- service: galera_bootstrap_stop_service |
|
|
|
|
|
|
|
|
galera_bootstrap_start_service_final: |
|
|
galera_bootstrap_start_service_final: |
|
|
|
|
|
|
|
|
{%- if grains.get('noservices') %} |
|
|
{%- if grains.get('noservices') %} |
|
|
- onlyif: /bin/false |
|
|
- onlyif: /bin/false |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
- require: |
|
|
|
|
|
|
|
|
- require: |
|
|
- file: galera_bootstrap_init_config |
|
|
- file: galera_bootstrap_init_config |
|
|
- file: galera_bootstrap_script |
|
|
- file: galera_bootstrap_script |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- source: salt://galera/files/my.cnf |
|
|
- source: salt://galera/files/my.cnf |
|
|
- mode: 644 |
|
|
- mode: 644 |
|
|
- template: jinja |
|
|
- template: jinja |
|
|
- require_in: |
|
|
|
|
|
|
|
|
- require_in: |
|
|
- service: galera_service |
|
|
- service: galera_service |
|
|
|
|
|
|
|
|
galera_service: |
|
|
galera_service: |