cloud-init.tpl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #cloud-config
  2. preserve_hostname: false
  3. hostname: ${hostname}
  4. salt-master: ${salt_master}
  5. fqdn: ${fqdn}
  6. # Write files happens early
  7. write_files:
  8. - content: |
  9. proxy=http://${proxy}:80
  10. path: /etc/yum.conf
  11. append: true
  12. - content: |
  13. ${fqdn}
  14. path: /etc/salt/minion_id
  15. - content: |
  16. master: ${salt_master}
  17. path: /etc/salt/minion
  18. - content: |
  19. grains:
  20. environment: ${ environment }
  21. aws_partition: ${ aws_partition }
  22. aws_partition_alias: ${ aws_partition_alias }
  23. path: /etc/salt/minion.d/cloud_init_grains.conf
  24. #yum_repos:
  25. # epel-release:
  26. # baseurl: http://download.fedoraproject.org/pub/epel/7/$basearch
  27. # enabled: false
  28. # failovermethod: priority
  29. # gpgcheck: true
  30. # gpgkey: http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
  31. # name: Extra Packages for Enterprise Linux 7 - Release
  32. packages:
  33. - vim
  34. package_update: true # Always patch
  35. growpart:
  36. mode: auto
  37. devices: [ '/', '/var', '/var/log', '/var/log/audit', '/var/tmp', '/tmp', '/home' ]
  38. ignore_growroot_disabled: false
  39. runcmd:
  40. - /bin/systemctl restart salt-minion
  41. - /bin/systemctl enable salt-minion
  42. - /bin/systemctl start amazon-ssm-agent
  43. - /bin/systemctl enable amazon-ssm-agent
  44. - /usr/sbin/aide --update --verbose=0
  45. - /bin/cp /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
  46. # Either final message or power state, but probably not both
  47. final_message: "The system is up after $UPTIME seconds"
  48. #power_state:
  49. # delay: "+30"
  50. # mode: reboot
  51. # message: "System configured after $UPTIME seconds"
  52. # timeout: 300
  53. # condition: true