aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>2018-11-30 16:15:20 +0100
committerGitHub <noreply@github.com>2018-11-30 16:15:20 +0100
commitda5c5d4e4f48f3396832ff31c63df2fa5ce71169 (patch)
treea3515e66da83c0f2818c885979df82992c3e0342
parente3f725a16f48d303ddbd8afed0bcdd50c923b33f (diff)
parent567977285542274d3fef0fd3df556e5f9bbc1f79 (diff)
downloadansible-clever-da5c5d4e4f48f3396832ff31c63df2fa5ce71169.tar.gz
ansible-clever-da5c5d4e4f48f3396832ff31c63df2fa5ce71169.tar.zst
ansible-clever-da5c5d4e4f48f3396832ff31c63df2fa5ce71169.zip
Merge pull request #25 from paulrbr-fl/feat-get-env
feat(post_deploy): Add a post deploy task to fetch deployed env
-rw-r--r--README.md1
-rw-r--r--tasks/post_deploy.yml9
2 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index b932c7f..f156f5c 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,7 @@ Variables for the application
31- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`. 31- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`.
32- _Obsolete_: `syslog_server`: Same as above but was replaced by `clever_syslog_server` since v1.5 of this role. 32- _Obsolete_: `syslog_server`: Same as above but was replaced by `clever_syslog_server` since v1.5 of this role.
33- `clever_metrics`: a boolean to enable or disable metrics support. Optional, default to `true`. 33- `clever_metrics`: a boolean to enable or disable metrics support. Optional, default to `true`.
34- `clever_env_output_file`: as a post deploy task you might need to retrieve the full Clever environment configuration (i.e. with addon env variables). If this variable is set to a filename then the env will be retrieved after a successful deploy inside this file. Optional.
34 35
35Variables specific to deployment, default should be fine: 36Variables specific to deployment, default should be fine:
36- `clever_cli_version`: Version of clever cli tools, default to `0.9.3`. 37- `clever_cli_version`: Version of clever cli tools, default to `0.9.3`.
diff --git a/tasks/post_deploy.yml b/tasks/post_deploy.yml
new file mode 100644
index 0000000..11116e8
--- /dev/null
+++ b/tasks/post_deploy.yml
@@ -0,0 +1,9 @@
1---
2- name: Retrieve clever env if needed
3 shell: "clever env > {{ clever_env_output_file }}"
4 args:
5 chdir: "{{ clever_app_root }}"
6 creates: "{{ clever_env_output_file }}"
7 environment:
8 CONFIGURATION_FILE: "{{ clever_login_file }}"
9 when: clever_env_output_file is defined