Nachtrag zu vorigem commit

This commit is contained in:
Benedikt Wismans 2022-11-25 21:18:44 +01:00
parent 1a706089a3
commit 7506c306b9
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
---
- name: Retrieve ipv4-address for resolution in /etc/hosts on wirt machine
shell: /home/core/Scripte/vhost_getIPv4 "{{ vm_name }}"
register: ipv4
- name: Write vmname and ipv4-address for resolution to /etc/hosts on wirt machine
debug: msg={{ ipv4["stdout"] }}
- name: Write vmname and ipv4-address for resolution to /etc/hosts on wirt machine iXXXXXXXXXXXXXXXXXXXXX
ansible.builtin.lineinfile:
path: /etc/hosts
regexp: '^{{ ipv4["stdout"] }} ='
line: "{{ ipv4['stdout'] + ' ' + vm_name }}"
...

View File

@ -1,7 +1,7 @@
---
- import_tasks: packages_install.yml
- import_tasks: script_upload.yml
# - import_tasks: tomcatlib_upload.yml
- import_tasks: hosts_vm2ip.yml