uprava popisu, a zjednodušení Inventory

This commit is contained in:
2024-11-22 01:05:46 +01:00
parent 67441569ae
commit 4169e31d2d
3 changed files with 21 additions and 23 deletions

View File

@@ -9,15 +9,15 @@
stat:
path: host_vars/{{item.hostname}}.yml
register: st
- name: Vytvoření souboru v host_vars
- name: Vytvoreni souboru v host_vars
template:
src: templates/host_vars.j2
dest: host_vars/{{item.hostname}}.yml
when: not st.stat.exists
- name: Aktualizovat seznam volných IP adres po přidělení
- name: Aktualizovat seznam volnych IP adres po prideleni
set_fact:
free_subnet_ips: "{{ free_subnet_ips | combine({ip_subnet: free_subnet_ips[ip_subnet][1:]}) }}"
- name: Přidat blok s novým přístupovým bodem na konec souboru
- name: Pridat blok s novym pristupovym bodem na konec souboru
lineinfile:
path: inventory.yml # Cesta k souboru
line: |2