12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #cloud-config
- preserve_hostname: false
- hostname: ${hostname}
- salt-master: ${saltmaster}
- fqdn: ${fqdn}
- # A lot of this could be done via salt. But for simplicity, i'm presently keeping it out.
- yum_repos:
- epel-release:
- baseurl: http://download.fedoraproject.org/pub/epel/7/$basearch
- enabled: true
- failovermethod: priority
- gpgcheck: true
- gpgkey: http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
- name: Extra Packages for Enterprise Linux 7 - Release
- packages:
- - vim
- package_update: true # Always patch
- growpart:
- mode: auto
- devices: [ '/', '/var', '/var/log', '/var/log/audit', '/var/tmp', '/tmp', '/home' ]
- ignore_growroot_disabled: false
- runcmd:
- - 'echo ${fqdn} > /etc/salt/minion_id'
- - 'echo master: ${saltmaster} > /etc/salt/minion'
- - 'echo grains: > /etc/salt/minion.d/cloud_init_grains.conf'
- - 'echo " environment: " ${ environment } >> /etc/salt/minion.d/cloud_init_grains.conf'
- - 'echo " aws_partition: " ${ aws_partition } >> /etc/salt/minion.d/cloud_init_grains.conf'
- - 'echo " aws_partition_alias: " ${ aws_partition_alias } >> /etc/salt/minion.d/cloud_init_grains.conf'
- - 'echo " interconnect_id: " ${ interconnect_id } >> /etc/salt/minion.d/cloud_init_grains.conf'
- - 'echo " vpc_cidr: " ${ vpc_cidr } >> /etc/salt/minion.d/cloud_init_grains.conf'
- - /bin/systemctl restart salt-minion
- - /bin/systemctl enable salt-minion
- - /bin/systemctl start amazon-ssm-agent
- - /bin/systemctl enable amazon-ssm-agent
- - /usr/sbin/aide --update --verbose=0
- - /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"
- # timeout: 300
- # condition: true
|