Ansible playbooks to install/configure various resources
cd ${BaseDir}
git clone https://github.com/ahamilto156/AH_Infra.git
For any required Ansible roles, review: requirements.yml
###NOTE: Must be done first or the yml's won't run cd .../AH_Infra cp hosts_template.yml hosts vim hosts ###-> Fill out between the lines
cd .../AH_Infra/templates vim fwd.LAN.Net.Fwd.j2 rvs.LAN.Net.Fwd.j2 ###for resolution addresses
- vars/main.yml for variables as used in ALL playbooks
- vars/*vault.yml for vaults (Default password is ansible)
The following vaults have been deleted, but will need to be created by you
- IdM_vault.yml
cd .../AH_Infra ./initialiseRepo.sh
ansible-playbook -kK --limit "${CommaDelimitedHOSTS}” --tags "${CommaDelimitedTasksToBeRun}" main.yml
ansible-playbook -kK --limit ${proxy_svr1},${proxy_svr2} --tags hardening,proxy main.yml OR/ ansible-playbook -kK --limit proxy --tags hardening,proxy main.yml
ansible-playbook -kK --limit ipa --tags hardening,ipa main.yml
ansible-playbook -kK --limit ${server1},...,${serverx} -t IdM_client|LDAP_client|AD_client -e SecondDomain=${SecondDomain} main.yml
***** ATM Even though the main.yml comments out various playbooks, 'cause I've not tested them, they are still checked! ***** So the way around this is just to call the specific playbook (e.g. hardening.yml)
1/ If tags are NOT specified then EVERYTHING will be run, which won't work!
ansible-playbook -kK --limit "${CommaDelimitedHOSTS}” ${task}.yml
ansible-playbook -kK --limit ${server} hardening.yml
ansible-playbook -kK --limit ${proxy_svr1},${proxy_svr2} proxy_squid.yml
ansible-playbook -kK --limit ${ipa_svr} ipa.yml
ansible-playbook -kK --limit ${dns1},${dns2} dns.yml
ansible-playbook -kK --limit ${server1},...,${serverx} -t IdM_client|LDAP_client|AD_client -e SecondDomain=${SecondDomain}[,adjoin_configure_sudo=true] auth2_client.yml
1/ You do not need a comma at the end of ${CommaDelimitedHOSTS}
2/ proxy_squid.yml does NOT do HA nor load balancing ATM
3/ auth2_client.yml MUST have SecondDomain defined
Free
Andrew Hamilton MEngSc. (Elec.), Grad Dip. PM, BE (Comp.)
Senior Consultant Red Hat
A: L11, 40 Marcus Clarke Street, Canberra City, ACT, 2601, Australia
M: +61-477-242-645-[+61-477-ahamil]
F: +61-2-6247-4380
- 1: I would like to thank Geoff Gatward [GG] who patiently taught me much of what I know about Ansible and directed me to his playbooks https://github.com/ggatward/GG_Infra.git that I have based these playbooks on [sometimes plagiarised]
- 2: I would like to thank everyone that created roles that I utilise. These roles are listed in roles/requirements.yml
- Clean up vars: currently in vars/main.yml, vars/proxy_squid.yml AND hosts. i.e. put hosts variables in vars/main.yml
- Squid Proxy server => Exclude CIS Level 2.2.13 => Have to rethink variables, but OK for new squid_proxy server, maybe after above.