File tree Expand file tree Collapse file tree
ansible/roles/dock_launch_config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 - app_name : " krain"
1212 - enviroment_vars : enviroment_vars
1313
14- # this requires the use of gnu/coreutils base64
14+ # this requires the use of gnu/coreutils base64 (`brew install coreutils`)
15+ # Allows us to use same base64 locally and in host
1516- name : encode krain config to base64
1617 shell : cat ~/{{ app_name }}.conf | base64 -w 0
1718 register : krain_base64
3031 - app_name : " charon"
3132 - enviroment_vars : enviroment_vars
3233
33- # this requires the use of gnu/coreutils base64
34+ # this requires the use of gnu/coreutils base64 (`brew install coreutils`)
35+ # Allows us to use same base64 locally and in host
3436- name : encode charon config to base64
3537 shell : cat ~/{{ app_name }}.conf | base64 -w 0
3638 register : charon_base64
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ chmod 0711 /opt/runnable/dock-init/consul-resources/vault/{{ node_env }}
1818{% for item in tokens %}
1919echo {{ item.value }} > /opt/runnable/dock-init/consul-resources/vault/{{ node_env }}/{{ item.file_name }}
2020{% endfor %}
21+ {% set hasToken = false %}
22+ {% else %}
23+ {% set hasToken = true %}
2124{% endif %}
2225
2326# Add upstart files for charon and krain
@@ -39,5 +42,9 @@ start amazon-ssm-agent
3942service krain start
4043service charon start
4144{% if not is_dock_pool %}
45+ {% if hasToken %}
46+ CONSUL_HOSTNAME={{ consul_host_address }} CONSUL_PORT={{ consul_api_port }} VAULT_PORT={{ vault_port }} S3_ACCESS_KEY={{ S3_ACCESS_KEY }} S3_SECRET_KEY={{ S3_SECRET_KEY }} AWS_ACCESS_KEY={{ AWS_ACCESS_KEY }} AWS_SECRET_KEY={{ AWS_SECRET_KEY }} bash /opt/runnable/dock-init/init.sh | tee /var/log/user-script-dock-init.log
47+ {% else %}
4248CONSUL_HOSTNAME={{ consul_host_address }} CONSUL_PORT={{ consul_api_port }} VAULT_PORT={{ vault_port }} bash /opt/runnable/dock-init/init.sh | tee /var/log/user-script-dock-init.log
4349{% endif %}
50+ {% endif %}
You can’t perform that action at this time.
0 commit comments