small fixes: filter local ips for mariadb users #18

Merged
ben merged 1 commits from fix into main 2022-10-07 16:50:44 +00:00
2 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,8 @@
login_unix_socket: /run/mysqld/mysqld.sock
loop_control:
label: "'{{ systemuserlist.sudoisbot.username }}'@'{{ item }}'"
when:
- "item | ansible.utils.ipaddr('private') or item.endswith('%')"
with_items:
- "{{ ansible_default_ipv4.address }}"
- "{{ bridgewithdns_mariadb }}"

View File

@ -142,6 +142,7 @@
mode: 0600
become: true
become_user: "{{ item.key }}"
ignore_errors: "{{ ansible_check_mode }}"
loop_control:
label: "{{ item.key }}"
with_dict: "{{ systemuserlist }}"