dashboard
repositories
filestore
activity
search
login
rht
/
rh294
additional course material RH294
summary
reflog
commits
tree
tickets
docs
forks
compare
blame
|
history
|
raw
fix hosts template
Student User
2020-02-19
26d781da63ad0368921d6a0eb1f5efcb9bc479d1
[rht/rh294.git]
/
play-with-hosts-template.yaml
1
2
3
4
5
6
7
8
9
10
11
---
- name: Simple play for class DO407 hosts template
hosts: server, desktop, demoext
become: true
tasks:
- debug:
msg: '{{ hostvars["servera"]["ansible_facts"]["default_ipv4"]["address"] }}'
- name: use template to create /etc/hosts-new
template:
src: hosts.j2
dest: /etc/hosts-new