Replace cfn-hup cron job with os-collect-config
Os-collect-config is meant as a replacement for cfn-hup. The @reboot job can go because os-collect-config will be run when the system is booted. The periodic job is handled by os-collect-config's default behaviour of running its command (by default, os-refresh-config) whenever any of its metadata sources change. Change-Id: Id768927ddfc4e7b4873fac347905e44458fd341a
This commit is contained in:
parent
c80f822046
commit
37f5a9b454
@ -1 +1,2 @@
|
||||
source-repositories
|
||||
os-collect-config
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
# This cannot be an os-apply-config template as this is what runs
|
||||
# os-apply-config for the first time.
|
||||
cat > /etc/cron.d/cfn-hup <<EOF
|
||||
SHELL=/bin/sh
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
# Ensure cfn-hup has a configuration
|
||||
@reboot root os-refresh-config 2>&1 | logger -t os-refresh-config
|
||||
# This is a workaround for cfn-hup not actually being a daemon
|
||||
*/5 * * * * root cfn-hup --no-daemon
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user