Update Servers/Automation/Ansible/Inventories/Overview.md
This commit is contained in:
@ -1,50 +1,27 @@
|
|||||||
# Host Inventories
|
# Host Inventories
|
||||||
When you are deploying playbooks, you target hosts that exist in "Inventories". These inventories consist of a list of hosts and their corresponding IP addresses, as well as any host-specific variables that may be necessary to declare to run the playbook. You can see an example of my Bunny Lab inventory file at the time of writing this document, below:
|
When you are deploying playbooks, you target hosts that exist in "Inventories". These inventories consist of a list of hosts and their corresponding IP addresses, as well as any host-specific variables that may be necessary to declare to run the playbook. You can see an example inventory file below. Keep in mind the "Group Variables" section varies based on your environment. NTLM is considered insecure, but may be necessary when you are interacting with Windows servers that are not domain-joined. Otherwise you want to use Kerberos authentication. This is outlined more in the [AWX Kerberos Implementation](https://docs.bunny-lab.io/Servers/Automation/Ansible/AWX/AWX%20Kerberos%20Implementation/#job-template-inventory-examples) documentation.
|
||||||
|
|
||||||
!!! note "Inventory Data Relationships"
|
!!! note "Inventory Data Relationships"
|
||||||
An inventory file consists of hosts, groups, and variables. A host belongs to a group, and a group can have variables configured for it. If you run a playbook / job template against a host, it will assign the variables associated to the group that host belongs to (if any) during runtime.
|
An inventory file consists of hosts, groups, and variables. A host belongs to a group, and a group can have variables configured for it. If you run a playbook / job template against a host, it will assign the variables associated to the group that host belongs to (if any) during runtime.
|
||||||
|
|
||||||
```ini title="https://git.bunny-lab.io/GitOps/awx.bunny-lab.io/src/branch/main/inventories/homelab.ini"
|
```ini title="https://git.bunny-lab.io/GitOps/awx.bunny-lab.io/src/branch/main/inventories/homelab.ini"
|
||||||
# Networking
|
# Networking
|
||||||
bunny-pfsense-01 ansible_host=192.168.3.1
|
pfsense-example ansible_host=192.168.3.1
|
||||||
|
|
||||||
# Servers
|
# Servers
|
||||||
pfsense ansible_host=192.168.3.1
|
example01 ansible_host=192.168.3.2
|
||||||
lab-jelly-01 ansible_host=192.168.3.2
|
example02 ansible_host=192.168.3.3
|
||||||
moon-storage-01 ansible_host=192.168.3.3
|
example03 ansible_host=example03.domain.com # FQDN is required for Ansible in Windows environments.
|
||||||
virt-node-01 ansible_host=virt-node-01.bunny-lab.io
|
example04 ansible_host=example04.domain.com # FQDN is required for Ansible in Windows environments.
|
||||||
virt-node-02 ansible_host=virt-node-02.bunny-lab.io
|
|
||||||
lab-photos-01 ansible_host=lab-photos-01.bunny-lab.io
|
|
||||||
lab-veeam-01 ansible_host=192.168.3.8
|
|
||||||
lab-veeam-02 ansible_host=192.168.3.9
|
|
||||||
awx ansible_host=192.168.3.10
|
|
||||||
lab-games-02 ansible_host=lab-games-01.bunny-lab.io
|
|
||||||
bunny-docker-01 ansible_host=192.168.3.12
|
|
||||||
mail ansible_host=mail.bunny-lab.io
|
|
||||||
lab-games-03 ansible_host=lab-games-03.bunny-lab.io
|
|
||||||
lab-veeam-03 ansible_host=192.168.3.15
|
|
||||||
alpine-work-01 ansible_host=192.168.3.17
|
|
||||||
lab-auth-01 ansible_host=192.168.3.18
|
|
||||||
lab-auth-02 ansible_host=192.168.3.20
|
|
||||||
container-node-01 ansible_host=192.168.3.19
|
|
||||||
lab-dc-01 ansible_host=192.168.3.25
|
|
||||||
lab-dc-02 ansible_host=192.168.3.26
|
|
||||||
lab-iris-01 ansible_host=192.168.3.27
|
|
||||||
lab-games-01 ansible_host=192.168.3.28
|
|
||||||
cloud ansible_host=192.168.3.29
|
|
||||||
lab-dt-01 ansible_host=192.168.3.30
|
|
||||||
lab-sophos-01 ansible_host=192.168.3.254
|
|
||||||
|
|
||||||
# Workstations
|
|
||||||
bunny-dsktp-01 ansible_host=10.0.0.20
|
|
||||||
bunny-lptp-01 ansible_host=10.0.0.17
|
|
||||||
bunny-lptp-02 ansible_host=10.0.0.4
|
|
||||||
lab-dt-01 ansible_host=192.168.3.30
|
|
||||||
|
|
||||||
# Group Definitions
|
# Group Definitions
|
||||||
|
[linuxServers]
|
||||||
|
example01
|
||||||
|
example02
|
||||||
|
|
||||||
[domainControllers]
|
[domainControllers]
|
||||||
lab-dc-01
|
example03
|
||||||
lab-dc-02
|
example04
|
||||||
|
|
||||||
[domainControllers:vars]
|
[domainControllers:vars]
|
||||||
ansible_connection=winrm
|
ansible_connection=winrm
|
||||||
@ -52,46 +29,4 @@ ansible_winrm_kerberos_delegation=false
|
|||||||
ansible_port=5986
|
ansible_port=5986
|
||||||
ansible_winrm_transport=ntlm
|
ansible_winrm_transport=ntlm
|
||||||
ansible_winrm_server_cert_validation=ignore
|
ansible_winrm_server_cert_validation=ignore
|
||||||
|
|
||||||
[containerOrchestration]
|
|
||||||
container-node-01
|
|
||||||
|
|
||||||
[windowsServers]
|
|
||||||
lab-dc-01
|
|
||||||
lab-dc-02
|
|
||||||
virt-node-01
|
|
||||||
virt-node-02
|
|
||||||
lab-veeam-01
|
|
||||||
lab-games-01
|
|
||||||
|
|
||||||
[windowsServers:vars]
|
|
||||||
ansible_connection=winrm
|
|
||||||
ansible_winrm_kerberos_delegation=false
|
|
||||||
ansible_port=5986
|
|
||||||
ansible_winrm_transport=ntlm
|
|
||||||
ansible_winrm_server_cert_validation=ignore
|
|
||||||
|
|
||||||
[linuxServers]
|
|
||||||
lab-jelly-01
|
|
||||||
lab-photos-01
|
|
||||||
mail
|
|
||||||
alpine-work-01
|
|
||||||
lab-auth-01
|
|
||||||
lab-auth-02
|
|
||||||
container-node-01
|
|
||||||
lab-dt-01
|
|
||||||
cloud
|
|
||||||
|
|
||||||
[workstations]
|
|
||||||
bunny-dsktp-01
|
|
||||||
bunny-lptp-01
|
|
||||||
bunny-lptp-02
|
|
||||||
bunny-dsktp-01
|
|
||||||
|
|
||||||
[workstations:vars]
|
|
||||||
ansible_connection=winrm
|
|
||||||
ansible_winrm_kerberos_delegation=false
|
|
||||||
ansible_port=5986
|
|
||||||
ansible_winrm_transport=ntlm
|
|
||||||
ansible_winrm_server_cert_validation=ignore
|
|
||||||
```
|
```
|
Reference in New Issue
Block a user