Skip to content

Commit

Permalink
servertime for update role
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Dec 26, 2019
1 parent 64c13a8 commit ae76624
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion menu/roles/update/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@
path: '/var/log/upgrades/{{ ansible_hostname }}'
state: directory

- name: Get a timestamp
command: date +%Y-%m-%d-%H:%M:%S
register: timestamp

- name: for {{ansible_hostname}} || Write changes to logfile
copy:
content: "{{ apt_simulate.stdout }}"
dest: "/var/log/upgrades/{{ ansible_hostname }}/{{ansible_hostname}}-{{ansible_date_time.iso8601}}.log"
dest: "/var/log/upgrades/{{ ansible_hostname }}/{{ansible_hostname}}-{{timestamp.stdout}}.log"

- debug:
msg:
Expand Down

0 comments on commit ae76624

Please sign in to comment.