feat: manage UniFi SSO login setting via Ansible (W1N-51)

This commit is contained in:
windyboy
2026-08-08 09:15:49 +08:00
parent c386fe8136
commit 14a758a28a
5 changed files with 158 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
---
# Reconcile the UniFi controller SSO login setting
# (super_sdn.sso_login_enabled = "Sync Local Admin with Ubiquiti SSO").
#
# Safe by default: run with --check for a read-only status report, or supply
# unifi_sso_confirm=true to apply the declared target value.
#
# # Read-only status
# ansible-playbook playbooks/unifi-sso.yml --limit ubnt --check
#
# # Apply (disable SSO login; local accounts use local passwords, no MFA)
# ansible-playbook playbooks/unifi-sso.yml --limit ubnt \
# -e '{"unifi_sso_confirm": true, "unifi_sso_target_value": false}'
#
# # Rollback (re-enable SSO login)
# ansible-playbook playbooks/unifi-sso.yml --limit ubnt \
# -e '{"unifi_sso_confirm": true, "unifi_sso_target_value": true}'
- name: Reconcile UniFi SSO login setting
hosts: unifi
become: true
gather_facts: false
serial: 1
roles:
- role: unifi_sso
tags: [unifi, sso, mutating]