Add clients to server's inventory file.

This commit is contained in:
Andreas B. Mundt 2020-03-12 16:47:22 +01:00
parent 118e9ceac6
commit 0b00ac560c
2 changed files with 10 additions and 0 deletions

View file

@ -17,6 +17,7 @@
## LAN IP address range: ## LAN IP address range:
ipaddr_lan: 192.168.0.10/24 ipaddr_lan: 192.168.0.10/24
dhcp_range: 192.168.0.50,192.168.0.99,2h dhcp_range: 192.168.0.50,192.168.0.99,2h
in_inventory: 192.168.0.[50:99]
di_dist: "{{ ansible_distribution_release }}" di_dist: "{{ ansible_distribution_release }}"
di_version: "{{ ansible_distribution_major_version }}" di_version: "{{ ansible_distribution_major_version }}"

View file

@ -146,3 +146,12 @@
dest: "/etc/systemd/system/git-repo.service" dest: "/etc/systemd/system/git-repo.service"
notify: start git-repo notify: start git-repo
when: not run_in_installer|default(false)|bool when: not run_in_installer|default(false)|bool
######################
- name: add clients to inventory
blockinfile:
dest: /etc/ansible/hosts
block: |
[kerberox-client]
{{ in_inventory }}