blob: 7e36c46b22c3ff3830c4c8b6dc315f9db84249d6 [file] [log] [blame]
- hosts: all
remote_user: chrome-bot
# override with --extra-vars "output_file=./foo"
output_file: "/tmp/census_output"
# local_action signals to ansible that the output file should be created
# on thehost machine (e.g. jumphost). The variables on the line input
# are taken from the remote machine (e.g. a given RPI).
- local_action:
module: lineinfile
dest: "{{ output_file }}"
mode: 0777
line: "{{ ansible_hostname }} {{ansible_default_ipv4.address}} {{ansible_default_ipv4.macaddress}}"
create: yes