|
@@ -4,6 +4,16 @@ hostname: ${hostname}
|
|
|
salt-master: ${salt_master}
|
|
|
fqdn: ${fqdn}
|
|
|
|
|
|
+# Ubuntu Advantage - broken? Using cmd.run
|
|
|
+#ubuntu_advantage:
|
|
|
+# token: ${ua_key}
|
|
|
+# enable:
|
|
|
+# - fips
|
|
|
+# - cis
|
|
|
+# - esm-infra
|
|
|
+# - fips-updates
|
|
|
+# - livepatch # no livepatch with fips!
|
|
|
+
|
|
|
# Write files happens early
|
|
|
write_files:
|
|
|
- content: |
|
|
@@ -58,6 +68,12 @@ growpart:
|
|
|
ignore_growroot_disabled: false
|
|
|
|
|
|
runcmd:
|
|
|
+ - find /usr/local/lib -type f -exec chmod o+r {} \;
|
|
|
+ - ua attach ${ua_key}
|
|
|
+ - ua enable --assume-yes cis fips fips-updates
|
|
|
+ - /usr/share/ubuntu-scap-security-guides/cis-hardening/Canonical_Ubuntu_20.04_CIS-harden.sh lvl2_server
|
|
|
+ - apt update
|
|
|
+ - apt upgrade -y
|
|
|
- /bin/systemctl restart salt-minion
|
|
|
- /bin/systemctl enable salt-minion
|
|
|
- /bin/systemctl start amazon-ssm-agent
|
|
@@ -66,10 +82,11 @@ runcmd:
|
|
|
- /bin/cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
|
|
|
|
|
|
# Either final message or power state, but probably not both
|
|
|
-final_message: "The system is up after $UPTIME seconds"
|
|
|
-#power_state:
|
|
|
-# delay: "+30"
|
|
|
-# mode: reboot
|
|
|
-# message: "System configured after $UPTIME seconds"
|
|
|
+#final_message: "The system is up after $UPTIME seconds"
|
|
|
+power_state:
|
|
|
+ # delay is in minutes
|
|
|
+ delay: "+1"
|
|
|
+ mode: reboot
|
|
|
+ message: "System configured after $UPTIME seconds"
|
|
|
# timeout: 300
|
|
|
# condition: true
|