Commit a63a468a authored by Alain Takoudjou's avatar Alain Takoudjou

playbook vm-boostrap: send error output to log file in cron task

parent 0e471d42
......@@ -10,13 +10,13 @@
- name: Add a periodical update on the VM
cron: name="Update vm bootstrap"
minute="*/{{ periodicity.stdout }}"
job="bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log"
job="bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log 2>&1"
cron_file=ansible-vm-bootstrap user="root"
- name: Add on reboot update on the VM
cron: name="reboot run vm bootstrap"
special_time=reboot
job="WAIT_TIME=10 bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log"
job="WAIT_TIME=10 bash -lc /usr/local/bin/vm-bootstrap-update >> /var/log/vm-bootstrap.log 2>&1"
cron_file=ansible-vm-bootstrap user="root"
- name: Add PATH env variable to cron
......
......@@ -5,5 +5,5 @@
- name: Add a periodical upload of logs and result
cron: name="Upload ansible files to http server"
minute="*/5"
job="/usr/local/bin/ansible-upload-vm-logs http://10.0.2.100/ /var/log/vm-bootstrap.log > /var/log/ansible-upload.log"
job="/usr/local/bin/ansible-upload-vm-logs http://10.0.2.100/ /var/log/vm-bootstrap.log > /var/log/ansible-upload.log 2>&1"
cron_file=ansible-upload-log user="root"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment