ansible-training-test/playbooks/report.yml

13 lines
330 B
YAML
Executable file

- hosts: alpine
tasks:
- name: get uptime
shell: uptime
register: uptime
- set_fact:
uptime: "{{uptime['stdout']}}"
- name: Build HTML report
template:
src: "{{playbook_dir}}/../templates/report.html"
dest: /tmp/report.html
delegate_to: localhost
run_once: true