User Tools

Site Tools


intwtask

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
intwtask [2018/10/26 18:46]
c0rn3j
intwtask [2018/10/26 19:46] (current)
c0rn3j
Line 90: Line 90:
  
 [Service] [Service]
-ExecStart=/bin/bash -c "/​usr/​bin/​docker system prune -af"+ExecStart=/​usr/​bin/​docker system prune -af
  
 [Install] [Install]
Line 169: Line 169:
 Harder to debug and test cron jobs vs systemd units, it's not possible to just '​systemctl start test.service'​ a cron job, you need to temporarily rewrite the execution to '* * * * *' or similar, and that's just not elegant or convenient. Harder to debug and test cron jobs vs systemd units, it's not possible to just '​systemctl start test.service'​ a cron job, you need to temporarily rewrite the execution to '* * * * *' or similar, and that's just not elegant or convenient.
  
-Cron has simplicity going for it though as you can't just create a script that launches on a timer in one line with systemd units.+Cron has simplicity going for it thoughas you can't just create a script that launches on a timer in one line with systemd units.
  
 Note: The task specified the task to be ran at UTC+0. This will be done since the provided server'​s local timezone is +0, but if it weren'​t the job would run at a different time. UTC timestamps are supported in systemd 228 but Centos 7 runs a much older version of systemd - https://​github.com/​systemd/​systemd/​blob/​dd050decb6ad131ebdeabb71c4f9ecb4733269c0/​NEWS#​L23-L30 Note: The task specified the task to be ran at UTC+0. This will be done since the provided server'​s local timezone is +0, but if it weren'​t the job would run at a different time. UTC timestamps are supported in systemd 228 but Centos 7 runs a much older version of systemd - https://​github.com/​systemd/​systemd/​blob/​dd050decb6ad131ebdeabb71c4f9ecb4733269c0/​NEWS#​L23-L30
Line 178: Line 178:
  
 Ansible could work with private IPv4 addresses instead of public ones since it's on LAN. I just used the public IPv4 for simplicity. Ansible could work with private IPv4 addresses instead of public ones since it's on LAN. I just used the public IPv4 for simplicity.
- 
-The Ansible playbook could be rewritten so there'​s no "​shell:"​ commands. 
  
 Secondary DNS could be 1.1.1.1. DNS is set by making a config file immutable to work around a bug in cloud-init: https://​bugs.launchpad.net/​cloud-init/​+bug/​1712680 Secondary DNS could be 1.1.1.1. DNS is set by making a config file immutable to work around a bug in cloud-init: https://​bugs.launchpad.net/​cloud-init/​+bug/​1712680
intwtask.1540579580.txt.gz ยท Last modified: 2018/10/26 18:46 by c0rn3j