maabara/playbooks/fun_with_templates.yml

14 lines
335 B
YAML
Raw Permalink Normal View History

2024-09-04 14:50:51 +00:00
---
- name: template functionality tests
hosts: all
become: yes
tasks:
- name: say hello
debug:
var: hostvars[inventory_hostname]['ansible_facts']['default_ipv4']['address']
- name: create /etc/hosts.test
template:
src: ../templates/hosts.j2
dest: /etc/hosts.test
mode: '0644'