---
- name: "Copying over {{ proxysql_project }} ProxySQL users config"
  template:
    src: "users.yaml.j2"
    dest: "{{ node_config_directory }}/proxysql/users/{{ proxysql_project }}.yaml"
    mode: "0660"
  become: true
  when:
    - proxysql_config_users | bool

- name: "Copying over {{ proxysql_project }} ProxySQL rules config"
  template:
    src: "rules.yaml.j2"
    dest: "{{ node_config_directory }}/proxysql/rules/{{ proxysql_project }}.yaml"
    mode: "0660"
  become: true
  when:
    - proxysql_config_rules | bool
