From f8169096dfa1cf9ec8b443e538b14a7142b6adc1 Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Fri, 3 Mar 2023 16:19:28 +0100 Subject: [PATCH] enable domain rejoin via tag run `./install.sh ad --tags=ad-rejoin` --- playbooks/roles/domain_join/tasks/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/domain_join/tasks/main.yml b/playbooks/roles/domain_join/tasks/main.yml index c7e5a008b..21cb2239b 100644 --- a/playbooks/roles/domain_join/tasks/main.yml +++ b/playbooks/roles/domain_join/tasks/main.yml @@ -50,12 +50,13 @@ args: creates: /etc/sssd/sssd.conf -# - name: ReJoin AD domain -# shell: | -# realm leave -# systemctl stop sssd -# rm -rf /var/lib/sss/db/* -# echo "{{ domain_password }}" | realm join -v -U {{ domain_admin }} {{ domain_name }} +- name: ReJoin AD domain + shell: | + realm leave + systemctl stop sssd + rm -rf /var/lib/sss/db/* + echo "{{ domain_password }}" | realm join -v -U {{ domain_admin }} {{ domain_name }} + tags: [ 'never', 'ad-rejoin' ] - name: configure sssd - use_fully_qualified_names