aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorClément Delafargue <39330590+clementd-fretlink@users.noreply.github.com>2019-07-02 10:52:30 +0200
committerGitHub <noreply@github.com>2019-07-02 10:52:30 +0200
commit5e0fa991c9e80634ed1fab3bcc2cd0ed977310dd (patch)
tree25cbae9f60b25cee963077773a52d8cd8fc621ee
parent587357dd2edae36fc8a1632c61a62801af31f49f (diff)
parente6872941578e0988b4d1f2eca6fbf59e655a0957 (diff)
downloadansible-clever-5e0fa991c9e80634ed1fab3bcc2cd0ed977310dd.tar.gz
ansible-clever-5e0fa991c9e80634ed1fab3bcc2cd0ed977310dd.tar.zst
ansible-clever-5e0fa991c9e80634ed1fab3bcc2cd0ed977310dd.zip
Merge pull request #46 from clementd-fretlink/cleanupv1.23
update metrics and entrypoint default definitions
-rw-r--r--README.md6
-rw-r--r--defaults/main.yml2
-rw-r--r--dhall/Config.dhall2
-rw-r--r--dhall/mkConfig.dhall4
-rw-r--r--vars/main.yml2
5 files changed, 9 insertions, 7 deletions
diff --git a/README.md b/README.md
index 9141b11..469667b 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,8 @@ Ansible role for clever cloud deployment
7Clever deploy 7Clever deploy
8========= 8=========
9 9
10This roles deploy an haskell app on clever cloud (https://www.clever-cloud.com). 10This role deploys applications on clever cloud (https://www.clever-cloud.com).
11It handles the publication over git, as well as domain names, environment variables and log drains configuration.
11 12
12Requirements 13Requirements
13------------ 14------------
@@ -31,7 +32,8 @@ Variables for the application
31- _Obsolete_: `domain`: Same as above but was replaced by `clever_domain` since v1.4 of this role. 32- _Obsolete_: `domain`: Same as above but was replaced by `clever_domain` since v1.4 of this role.
32- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`. 33- `clever_syslog_server`: UDP Syslog server to be used as UDPSyslog drain for the application, optional. Example: `udp://198.51.100.51:12345`.
33- _Obsolete_: `syslog_server`: Same as above but was replaced by `clever_syslog_server` since v1.5 of this role. 34- _Obsolete_: `syslog_server`: Same as above but was replaced by `clever_syslog_server` since v1.5 of this role.
34- `clever_metrics`: a boolean to enable or disable metrics support. Optional, default to `true`. 35- _Obsolete_: `clever_metrics`: metrics used to be disabled by default. Now they are enabled by default and can be explicitly disabled with `clever_disable_metrics`.
36- `clever_disable_metrics`: a boolean to disable metrics support. Optional, default to `false`.
35- `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. 37- `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.
36 38
37Variables specific to deployment, default should be fine: 39Variables specific to deployment, default should be fine:
diff --git a/defaults/main.yml b/defaults/main.yml
index 3e030cb..1f08a25 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -9,7 +9,7 @@ clever_login_file: "{{ clever_app_confdir }}/login"
9clever_haskell_entry_point: "{{ clever_entry_point | default('') }}" 9clever_haskell_entry_point: "{{ clever_entry_point | default('') }}"
10clever_env: {} 10clever_env: {}
11 11
12clever_metrics: true 12clever_disable_metrics: false
13 13
14clever_addons: [] 14clever_addons: []
15# example 15# example
diff --git a/dhall/Config.dhall b/dhall/Config.dhall
index c095403..5b7eab2 100644
--- a/dhall/Config.dhall
+++ b/dhall/Config.dhall
@@ -17,7 +17,7 @@ in λ(Environment : Type)
17 Optional Text 17 Optional Text
18 , clever_haskell_entry_point : 18 , clever_haskell_entry_point :
19 Optional Text 19 Optional Text
20 , clever_metrics : 20 , clever_disable_metrics :
21 Bool 21 Bool
22 , clever_addons : 22 , clever_addons :
23 List Addon 23 List Addon
diff --git a/dhall/mkConfig.dhall b/dhall/mkConfig.dhall
index 413ea5a..d2ec034 100644
--- a/dhall/mkConfig.dhall
+++ b/dhall/mkConfig.dhall
@@ -23,8 +23,8 @@ in λ(vault : Vault)
23 None Text 23 None Text
24 , clever_haskell_entry_point = 24 , clever_haskell_entry_point =
25 None Text 25 None Text
26 , clever_metrics = 26 , clever_disable_metrics =
27 True 27 False
28 , clever_addons = 28 , clever_addons =
29 [] : List Addon 29 [] : List Addon
30 , clever_env = 30 , clever_env =
diff --git a/vars/main.yml b/vars/main.yml
index a6086fe..3f158b9 100644
--- a/vars/main.yml
+++ b/vars/main.yml
@@ -5,7 +5,7 @@ clever_base_env:
5 # Haskell only 5 # Haskell only
6 # https://www.clever-cloud.com/doc/get-help/reference-environment-variables/#haskell 6 # https://www.clever-cloud.com/doc/get-help/reference-environment-variables/#haskell
7 CC_RUN_COMMAND: "~/.local/bin/{{ clever_haskell_entry_point }}" 7 CC_RUN_COMMAND: "~/.local/bin/{{ clever_haskell_entry_point }}"
8 ENABLE_METRICS: "{{ clever_metrics | lower }}" 8 CC_DISABLE_METRICS: "{{ clever_metrics is defined | ternary(not clever_metrics, clever_disable_metrics) | lower }}"
9 PORT: "8080" 9 PORT: "8080"
10 10
11clever_activity_valid_deploy_keyword: " OK " 11clever_activity_valid_deploy_keyword: " OK "