123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #cloud-config
- preserve_hostname: false
- salt-master: ${salt_master}
- # Write files happens early
- write_files:
- - content: |
- proxy=http://${proxy}:80
- path: /etc/yum.conf
- append: true
- - content: |
- master: ${salt_master}
- path: /etc/salt/minion
- - content: |
- grains:
- environment: ${ environment }
- aws_partition: ${ aws_partition }
- aws_partition_alias: ${ aws_partition_alias }
- path: /etc/salt/minion.d/cloud_init_grains.conf
- #yum_repos:
- # epel-release:
- # baseurl: http://download.fedoraproject.org/pub/epel/7/$basearch
- # enabled: false
- # 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
- bootcmd:
- - "INSTANCE_ID=`/usr/bin/curl -f --connect-timeout 1 --silent http://169.254.169.254/latest/meta-data/instance-id`"
- - "/bin/hostnamectl set-hostname ${prefix}-splunk-indexer-$INSTANCE_ID'.${zone}'"
- - "/bin/hostname > /etc/salt/minion_id"
- runcmd:
- - /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
- # For indexers only
- # legacy slept for 20 seconds, but I think aide update will take care of that delay
- - /bin/salt-call saltutil.sync_all
- - /bin/salt-call saltutil.refresh_pillar
- - /bin/salt-call saltutil.refresh_grains
- - /bin/salt-call state.highstate
- # 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
|