fix branding, route cron mail, add msca shim
authorJustin Wind <j.wind@partner.samsung.com>
Tue, 14 Mar 2017 21:53:34 +0000 (14:53 -0700)
committerJustin Wind <j.wind@partner.samsung.com>
Tue, 14 Mar 2017 21:53:34 +0000 (14:53 -0700)
management-d0dev.yml
roles/common/files/31-branding
roles/management/templates/sqs-poll.cron.j2
roles/msca/files/msca.sh [new file with mode: 0755]
roles/msca/tasks/main.yml [new file with mode: 0644]
vpcaccess-d0dev.yml

index a1e1dc0d8e40ca182939b79d560053da03f3a685..c73399afae26ee744972a4579fc750037c4dda1c 100644 (file)
@@ -3,4 +3,5 @@
   become: true
   roles:
   - common
+  - msca
   - management
index cc187207a7cdccd204b9c49cd34336377ab2f35d..97e3d5c5f4ed75185f2c67efa1a7744d86cac09e 100644 (file)
@@ -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
index 872c7bae0ac029fd8b3ff995291033fe93ad16a5..9adc22badd7f718e6ef2815b156aa4648b76382c 100644 (file)
@@ -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 (executable)
index 0000000..674730b
--- /dev/null
@@ -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 (file)
index 0000000..cd3c7e4
--- /dev/null
@@ -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
index f11242ea1f81befc92526014fa4d39a76c6f99bb..b6f1007b9b44841c52683c1deeb492e0ecb6cd85 100644 (file)
@@ -3,4 +3,5 @@
   become: true
   roles:
   - common
+  - msca
   - vpcaccess