|
@@ -8,12 +8,34 @@ write_files:
|
|
|
proxy=http://${proxy}:80
|
|
|
path: /etc/yum.conf
|
|
|
append: true
|
|
|
+- content: |
|
|
|
+ proxy_host: ${proxy}
|
|
|
+ proxy_port: 80
|
|
|
+ path: /etc/salt/minion.d/proxy.conf
|
|
|
+- content: |
|
|
|
+ [global]
|
|
|
+ proxy=${proxy}
|
|
|
+ path: /etc/pip.conf
|
|
|
+- content: |
|
|
|
+ export HTTPS_PROXY=http://${proxy}:80
|
|
|
+ export HTTP_PROXY=http://${proxy}:80
|
|
|
+ export NO_PROXY=localhost,127.0.0.1,169.254.169.254,pvt.xdrtest.accenturefederalcyber.com,pvt.xdr.accenturefederalcyber.com,reposerver.msoc.defpoint.local,jenkins.msoc.defpoint.local,pod1search-splunk-sh.msoc.defpoint.local,s3.amazonaws.com,ssm.${ aws_region }.amazonaws.com,ec2messages.${ aws_region }.amazonaws.com,ec2.${ aws_region }.amazonaws.com,ssmmessages.${ aws_region }.amazonaws.com,iratemoses.mdr.defpoint.com,jira.mdr.defpoint.com,reposerver.pvt.xdr.accenturefederalcyber.com,jenkins.pvt.xdr.accenturefederalcyber.com,pod1search-splunk-sh.pvt.xdr.accenturefederalcyber.com,reposerver.pvt.xdrtest.accenturefederalcyber.com,jenkins.pvt.xdrtest.accenturefederalcyber.com,pod1search-splunk-sh.pvt.xdrtest.accenturefederalcyber.com,iratemoses.xdr.accenturefederalcyber.com,jira.xdr.accenturefederalcyber.com,iratemoses.xdrtest.accenturefederalcyber.com,jira.xdrtest.accenturefederalcyber.com
|
|
|
+ export https_proxy=$HTTPS_PROXY
|
|
|
+ export http_proxy=$HTTP_PROXY
|
|
|
+ export no_proxy=$NO_PROXY
|
|
|
+ path: /etc/profile.d/proxy.sh
|
|
|
+# indexers don't know their fqdn until boot, so this is created below in bootcmd
|
|
|
+#- content: |
|
|
|
+# $ {fqdn}
|
|
|
+# path: /etc/salt/minion_id
|
|
|
- content: |
|
|
|
master: ${salt_master}
|
|
|
+ #log_level: debug
|
|
|
path: /etc/salt/minion
|
|
|
- content: |
|
|
|
grains:
|
|
|
environment: ${ environment }
|
|
|
+ aws_region: ${ aws_region }
|
|
|
aws_partition: ${ aws_partition }
|
|
|
aws_partition_alias: ${ aws_partition_alias }
|
|
|
path: /etc/salt/minion.d/cloud_init_grains.conf
|
|
@@ -52,8 +74,18 @@ runcmd:
|
|
|
# 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
|
|
|
+ # Chicken/egg problem. We need pillars to get correct grains, and grains to get correct pillars.
|
|
|
+ - /bin/salt-call --refresh-grains-cache saltutil.refresh_pillar
|
|
|
+ - /bin/sleep 1
|
|
|
+ - /bin/salt-call --refresh-grains-cache saltutil.refresh_grains
|
|
|
+ - /bin/sleep 1
|
|
|
+ - /bin/salt-call --refresh-grains-cache saltutil.refresh_pillar
|
|
|
+ - /bin/sleep 1
|
|
|
+ - /bin/salt-call --refresh-grains-cache saltutil.refresh_grains
|
|
|
+ - /bin/sleep 1
|
|
|
+ # Recording our initial values is useful for troubleshooting
|
|
|
+ - /bin/salt-call pillar.items > /root/pillars.initial_highstate.yml
|
|
|
+ - /bin/salt-call grains.items > /root/grains.initial_highstate.yml
|
|
|
- /bin/salt-call state.highstate
|
|
|
|
|
|
# Either final message or power state, but probably not both
|