Update Readme

add requirements.yml for additional modules
This commit is contained in:
Michael Pellegrino
2021-08-30 08:39:21 -04:00
parent 21612189e0
commit 7e68ea16b3
19 changed files with 964 additions and 59 deletions

View File

@@ -1,49 +1,30 @@
---
- hosts: samba
tasks:
- name: Install Samba Packages
become: yes
apt:
name: ['samba', 'smbclient','winbind','krb5-user','krb5-config','krb5-locales','winbind','libpam-winbind','libnss-winbind','dnsutils']
state: present
update_cache: true
- name: stop samba services
become: yes
command: systemctl stop "{{ item }}"
ignore_errors: true
with_items:
- samba-ad-dc.service
- smbd.service
- nmbd.service
- winbind.service
- name: disable samba services
become: yes
command: systemctl disable "{{ item }}"
ignore_errors: true
with_items:
- samba-ad-dc.service
- smbd.service
- nmbd.service
- winbind.service
- name: set nsswitch service to use DNS resolution
become: yes
lineinfile:
path: /etc/nsswitch.conf
state: present
regexp: '^hosts:'
line: 'hosts: files dns mdns4_minimal [NOTFOUND=return]'
- name: check if smb.conf exists
stat:
path: /etc/samba/smb.conf
register: stat_result
- name: rename default smb.conf
become: yes
shell: mv /etc/samba/smb.conf /etc/samba/smb.conf.backup
ignore_errors: true
tags: remove_default_samba_config
- name: delete default kerberos configuration if it exists
become: yes
file:
state: absent
path: "/etc/krb5.conf"
tags: remove_default_samba_config
- hosts: dc01
become: true
vars:
# -- Custom settings: role-samba4-primary-ad-dc --
smb_workgroup : 'VSRAPOC'
smb_realm : 'VSRAPOC.DSFINANCIAL.COMCAST.NET'
smb_username : 'administrator'
smb_password : 'Password123'
smb_role : 'primary'
smb_dns_servers: '10.1.10.10'
smb_dns_forwarder: '8.8.8.8'
roles:
- role-samba4-primary-ad-dc
- hosts: server01 server02 server03
become: true
vars:
# -- Custom settings: role-samba4-primary-ad-dc --
smb_workgroup : 'VSRAPOC'
smb_realm : 'VSRAPOC.DSFINANCIAL.COMCAST.NET'
smb_username : 'administrator'
smb_password : 'Password123'
smb_dns_servers: '10.1.10.10'
roles:
- role-samba4-ad-member