chore 📦: Update dependencies in install.yml and verify.yml
Updated the `apt` module to use the latest version of pexpect, and updated the `community.general.expect` module to use the `ansible.builtin.expect` module. This change ensures that the Ansible playbook uses the most recent versions of the required packages and modules.
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
---
|
||||
- name: Install pexpect # required for verify.yml
|
||||
ansible.builtin.apt:
|
||||
pkg: pexpect
|
||||
state: latest
|
||||
|
||||
- name: Install required packages
|
||||
ansible.builtin.apt:
|
||||
pkg: '{{ samba_packages }}'
|
||||
state: latest
|
||||
update_cache: yes
|
||||
# update_cache: yes
|
||||
autoclean: yes
|
||||
autoremove: yes
|
||||
purge: true
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
msg: "{{ addc_reverse_zone_name }} {{ addc_ansible_host }} {{ addc_admin_password }} {{ addc_ip_last_octet }} {{ addc_hostname }} {{ addc_auth_domain }}"
|
||||
|
||||
- name: "Create the reverse DNS zone {{ addc_reverse_zone_name }}"
|
||||
community.general.expect:
|
||||
ansible.builtin.expect:
|
||||
command: "samba-tool dns zonecreate {{ addc_ansible_host }} {{ addc_reverse_zone_name }} -U Administrator"
|
||||
responses:
|
||||
# Use the '(?i)' flag for case-insensitive matching of the prompt.
|
||||
@@ -18,7 +18,7 @@
|
||||
no_log: false # Highly recommended to prevent the password from appearing in logs
|
||||
|
||||
- name: "Create the PTR (reverse) DNS record"
|
||||
community.general.expect:
|
||||
ansible.builtin.expect:
|
||||
# Command syntax: samba-tool dns add <server> <zone> <record_name> PTR <target_fqdn>
|
||||
command: >
|
||||
samba-tool dns add {{ addc_ansible_host }}
|
||||
@@ -42,7 +42,7 @@
|
||||
msg: 'Samba Shares found: {{ smbclient_output.stdout }}'
|
||||
|
||||
- name: "Verify Samba AD authentication by accessing the netlogon share"
|
||||
community.general.expect:
|
||||
ansible.builtin.expect:
|
||||
# Command to run: smbclient //localhost/netlogon -UAdministrator -c 'ls'
|
||||
# The -c 'ls' command lists files on the share.
|
||||
command: smbclient //localhost/netlogon -UAdministrator -c 'ls'
|
||||
@@ -99,7 +99,7 @@
|
||||
var: ptr_record_check.stdout
|
||||
|
||||
- name: "Verify Kerberos authentication using kinit"
|
||||
community.general.expect:
|
||||
ansible.builtin.expect:
|
||||
# Command to run: kinit administrator
|
||||
command: kinit administrator
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user