|
|
@ -100,16 +100,16 @@ |
|
|
|
|
|
|
|
|
|
|
|
- name: Remove users with unknown realm |
|
|
|
- name: Remove users with unknown realm |
|
|
|
shell: | |
|
|
|
shell: | |
|
|
|
for U in $(turnadmin --list | grep -v '\[{{ turn_realm | default(ansible_domain) }}\]'); do |
|
|
|
for U in $(turnadmin --list | grep -vP '^0:\s+:\s+(log file opened|SQLite connection)'); do |
|
|
|
user=$(echo $U | cut -d'[' -f1) |
|
|
|
user=$(echo $U | cut -d'[' -f1) |
|
|
|
realm=$(echo $U | perl -pe 's/.*\[(.*)\]/$1/') |
|
|
|
realm=$(echo $U | perl -pe 's/.*\[(.*)\]/$1/') |
|
|
|
turnadmin --delete --user=$user --realm=$realm |
|
|
|
[ "$realm" == "{{ turn_realm | default(ansible_domain) }}" ] || turnadmin --delete --user=$user --realm=$realm |
|
|
|
done |
|
|
|
done |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
tags: turn |
|
|
|
tags: turn |
|
|
|
|
|
|
|
|
|
|
|
- name: List long term users |
|
|
|
- name: List long term users |
|
|
|
shell: turnadmin --list | grep -vP '^0:\s+(log file opened|SQLite connection)' | cut -d'[' -f1 |
|
|
|
shell: turnadmin --list | grep -vP '^0:\s+:\s+(log file opened|SQLite connection)' | cut -d'[' -f1 |
|
|
|
register: turn_lt_existing_users |
|
|
|
register: turn_lt_existing_users |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
tags: turn |
|
|
|
tags: turn |
|
|
|