|
|
@ -107,6 +107,8 @@ |
|
|
|
include_role: name=sssd_ad_auth |
|
|
|
include_role: name=sssd_ad_auth |
|
|
|
when: |
|
|
|
when: |
|
|
|
- not samba_krb5_conf.stat.exists |
|
|
|
- not samba_krb5_conf.stat.exists |
|
|
|
|
|
|
|
- ad_auth is defined |
|
|
|
|
|
|
|
- ad_auth |
|
|
|
tags: samba |
|
|
|
tags: samba |
|
|
|
|
|
|
|
|
|
|
|
- name: Check if winbind_cache exists |
|
|
|
- name: Check if winbind_cache exists |
|
|
@ -147,12 +149,12 @@ |
|
|
|
tags: samba |
|
|
|
tags: samba |
|
|
|
|
|
|
|
|
|
|
|
- name: Check existing DNS zones |
|
|
|
- name: Check existing DNS zones |
|
|
|
shell: >- |
|
|
|
shell: | |
|
|
|
samba-tool dns zonelist {{ ansible_all_ipv4_addresses | first }} |
|
|
|
samba-tool dns zonelist {{ ansible_all_ipv4_addresses | first }} \ |
|
|
|
-U Administrator --password={{ samba_dc_admin_pass | quote }} | |
|
|
|
-U Administrator --password={{ samba_dc_admin_pass | quote }} | \ |
|
|
|
perl -ne 'm/pszZoneName\s+:\s+(.*)/ && print "$1\n"' |
|
|
|
perl -ne 'm/pszZoneName\s+:\s+(.*)/ && print "$1\n"' |
|
|
|
register: samba_existing_zones |
|
|
|
register: samba_existing_zones |
|
|
|
#no_log: True |
|
|
|
no_log: True |
|
|
|
changed_when: False |
|
|
|
changed_when: False |
|
|
|
when: samba_i_am_primary_dc == True |
|
|
|
when: samba_i_am_primary_dc == True |
|
|
|
tags: samba |
|
|
|
tags: samba |
|
|
@ -161,7 +163,7 @@ |
|
|
|
command: >- |
|
|
|
command: >- |
|
|
|
samba-tool dns zonecreate {{ ansible_all_ipv4_addresses | first }} |
|
|
|
samba-tool dns zonecreate {{ ansible_all_ipv4_addresses | first }} |
|
|
|
{{ item }} -U Administrator --password={{ samba_dc_admin_pass | quote }} |
|
|
|
{{ item }} -U Administrator --password={{ samba_dc_admin_pass | quote }} |
|
|
|
#no_log: True |
|
|
|
no_log: True |
|
|
|
when: samba_i_am_primary_dc == True |
|
|
|
when: samba_i_am_primary_dc == True |
|
|
|
with_items: "{{ samba_dns_zones | difference(samba_existing_zones.stdout_lines) }}" |
|
|
|
with_items: "{{ samba_dns_zones | difference(samba_existing_zones.stdout_lines) }}" |
|
|
|
tags: samba |
|
|
|
tags: samba |
|
|
@ -170,7 +172,7 @@ |
|
|
|
command: >- |
|
|
|
command: >- |
|
|
|
samba-tool dns zonedelete {{ ansible_all_ipv4_addresses | first }} |
|
|
|
samba-tool dns zonedelete {{ ansible_all_ipv4_addresses | first }} |
|
|
|
{{ item }} -U Administrator --password={{ samba_dc_admin_pass | quote }} |
|
|
|
{{ item }} -U Administrator --password={{ samba_dc_admin_pass | quote }} |
|
|
|
#no_log: True |
|
|
|
no_log: True |
|
|
|
when: |
|
|
|
when: |
|
|
|
- samba_i_am_primary_dc == True |
|
|
|
- samba_i_am_primary_dc == True |
|
|
|
- samba_remove_unmanaged_dns_zones == True |
|
|
|
- samba_remove_unmanaged_dns_zones == True |
|
|
|