cloud-init.tpl 1.5 KB

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