ansible_public/playbooks/fast_fixes/change_etc_hosts.yaml

15 lines
288 B
YAML
Raw Permalink Normal View History

2022-06-14 18:53:16 +02:00
- hosts: '{{ variable_host | default("lab15_standard") }}'
gather_facts: no
become: yes
tasks:
- name: Change lab15-9
replace:
path: /etc/hosts
regexp: 'lab15-9'
replace: '{{ inventory_hostname }}'
- name: Print this file
shell: cat /etc/hosts