From: Justin Wind Date: Tue, 14 Mar 2017 21:53:34 +0000 (-0700) Subject: fix branding, route cron mail, add msca shim X-Git-Url: http://git.squeep.com/?p=awsible;a=commitdiff_plain;h=10384761f1fb4c08dde46333bc35ff107cb6800b fix branding, route cron mail, add msca shim --- diff --git a/management-d0dev.yml b/management-d0dev.yml index a1e1dc0..c73399a 100644 --- a/management-d0dev.yml +++ b/management-d0dev.yml @@ -3,4 +3,5 @@ become: true roles: - common + - msca - management diff --git a/roles/common/files/31-branding b/roles/common/files/31-branding index cc18720..97e3d5c 100644 --- a/roles/common/files/31-branding +++ b/roles/common/files/31-branding @@ -1,5 +1,5 @@ #!/bin/sh source /etc/profile figlet -f small ' AWSible' -echo "This is a ${CLOUD_MODULE} system in the ${CLOUD_ACCOUNT} environment." +echo "This is a ${CLOUD_CLUSTER} system in the ${CLOUD_ENVIRONMENT} environment." echo diff --git a/roles/management/templates/sqs-poll.cron.j2 b/roles/management/templates/sqs-poll.cron.j2 index 872c7ba..9adc22b 100644 --- a/roles/management/templates/sqs-poll.cron.j2 +++ b/roles/management/templates/sqs-poll.cron.j2 @@ -1 +1,4 @@ +{% if MANAGEMENT_EMAIL is defined %} +MAILTO={{ MANAGEMENT_EMAIL }} +{% endif %} * * * * * ec2-user {{ MANAGEMENT_DATA_ROOT }}/sqs-action.py {{ MANAGEMENT_DATA_ROOT }} {{ MANAGEMENT_EVENT_QUEUE }} {{ management_notice_topic.sns_arn }} diff --git a/roles/msca/files/msca.sh b/roles/msca/files/msca.sh new file mode 100755 index 0000000..674730b --- /dev/null +++ b/roles/msca/files/msca.sh @@ -0,0 +1,12 @@ +# configure environment for MSCA AWS things + +# as of pip2.7, all pip installed binaries are here +# pathmunge /usr/local/bin + +## Add user-data to environment. Because we use asgard this should be safe... +## came from http://stackoverflow.com/questions/10520605/bashs-source-command-not-working-with-a-file-curld-from-internet +## NOTE, if you create your own init script you must copy the below to /etc/default/myScriptName +source /dev/stdin <<< "$(curl -s --fail http://169.254.169.254/latest/user-data)" + +# set 'screen' title +echo -n -e "\033k$INSTANCE_ID-$CLOUD_CLUSTER\033\\" diff --git a/roles/msca/tasks/main.yml b/roles/msca/tasks/main.yml new file mode 100644 index 0000000..cd3c7e4 --- /dev/null +++ b/roles/msca/tasks/main.yml @@ -0,0 +1,8 @@ +--- +- name: install cloud env var thingy + copy: + dest: /etc/profile.d/msca.sh + src: msca.sh + mode: "0644" + owner: root + group: root diff --git a/vpcaccess-d0dev.yml b/vpcaccess-d0dev.yml index f11242e..b6f1007 100644 --- a/vpcaccess-d0dev.yml +++ b/vpcaccess-d0dev.yml @@ -3,4 +3,5 @@ become: true roles: - common + - msca - vpcaccess