ansible-roles/maxscale/tasks/config_stretch.yml
2020-06-22 10:07:06 +02:00

31 lines
868 B
YAML

- name: "Create key for password encryption"
command:
cmd: "/usr/bin/maxkeys"
creates: "/var/lib/maxscale/.secrets"
tags: maxscale
- name: "Encrypt mysql password for saving in configuration"
command:
cmd: "/usr/bin/maxpasswd {{ maxscale_mysql_password|quote }}"
register: encrypt_maxscale_mysql_password_result
when: encrypted_maxscale_mysql_password is none
tags: maxscale
- name: "Encrypt monitor password for saving in configuration"
command:
cmd: "/usr/bin/maxpasswd {{ maxscale_monitor_password|quote }}"
register: encrypt_maxscale_monitor_password_result
when: encrypted_maxscale_monitor_password is none
tags: maxscale
- name: "Copy the configuration"
template:
src: "maxscale.cnf.j2"
dest: "/etc/maxscale.cnf"
owner: 'root'
group: 'root'
mode: '0644'
notify: 'restart maxscale'
tags: maxscale