15 lines
288 B
YAML
15 lines
288 B
YAML
- 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
|
|
|
|
|