diff options
author | paulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com> | 2018-11-30 16:35:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 16:35:28 +0100 |
commit | 245e7912bf31c7d55541f1be45b3cffc11d7f3b3 (patch) | |
tree | 48e890b1bf5077fdd32abdc4d7057ad608dd5d31 | |
parent | da5c5d4e4f48f3396832ff31c63df2fa5ce71169 (diff) | |
parent | 1dc8c6204aef4692f473c4dbda61bb4e26b1a7c3 (diff) | |
download | ansible-clever-245e7912bf31c7d55541f1be45b3cffc11d7f3b3.tar.gz ansible-clever-245e7912bf31c7d55541f1be45b3cffc11d7f3b3.tar.zst ansible-clever-245e7912bf31c7d55541f1be45b3cffc11d7f3b3.zip |
Merge pull request #26 from paulrbr-fl/chdir-all-the-things
fix(deploy): Make sure to execute clever commands in app_root dir
-rw-r--r-- | tasks/deploy.yml | 6 | ||||
-rw-r--r-- | tasks/login.yml | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 84ebe73..3bd74ee 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml | |||
@@ -1,6 +1,8 @@ | |||
1 | - name: Configure Drain | 1 | - name: Configure Drain |
2 | when: syslog_server is defined or clever_syslog_server is defined | 2 | when: syslog_server is defined or clever_syslog_server is defined |
3 | command: clever-set-drain.sh | 3 | command: clever-set-drain.sh |
4 | args: | ||
5 | chdir: "{{ clever_app_root }}" | ||
4 | environment: | 6 | environment: |
5 | SYSLOG_UDP_SERVER: "{{ clever_syslog_server | default(syslog_server) }}" | 7 | SYSLOG_UDP_SERVER: "{{ clever_syslog_server | default(syslog_server) }}" |
6 | CONFIGURATION_FILE: "{{ clever_login_file }}" | 8 | CONFIGURATION_FILE: "{{ clever_login_file }}" |
@@ -8,12 +10,16 @@ | |||
8 | - name: Configure Domain | 10 | - name: Configure Domain |
9 | when: domain is defined or clever_domain is defined | 11 | when: domain is defined or clever_domain is defined |
10 | command: clever-set-domain.sh | 12 | command: clever-set-domain.sh |
13 | args: | ||
14 | chdir: "{{ clever_app_root }}" | ||
11 | environment: | 15 | environment: |
12 | DOMAIN: "{{ clever_domain | default(domain) }}" | 16 | DOMAIN: "{{ clever_domain | default(domain) }}" |
13 | CONFIGURATION_FILE: "{{ clever_login_file }}" | 17 | CONFIGURATION_FILE: "{{ clever_login_file }}" |
14 | 18 | ||
15 | - name: Push Environment | 19 | - name: Push Environment |
16 | shell: "clever env import < {{ clever_app_confdir }}/env" | 20 | shell: "clever env import < {{ clever_app_confdir }}/env" |
21 | args: | ||
22 | chdir: "{{ clever_app_root }}" | ||
17 | environment: | 23 | environment: |
18 | CONFIGURATION_FILE: "{{ clever_login_file }}" | 24 | CONFIGURATION_FILE: "{{ clever_login_file }}" |
19 | changed_when: false | 25 | changed_when: false |
diff --git a/tasks/login.yml b/tasks/login.yml index bed5dbc..86ba714 100644 --- a/tasks/login.yml +++ b/tasks/login.yml | |||
@@ -12,6 +12,7 @@ | |||
12 | - name: Link app | 12 | - name: Link app |
13 | command: clever link {{ clever_app }} | 13 | command: clever link {{ clever_app }} |
14 | args: | 14 | args: |
15 | chdir: "{{ clever_app_root }}" | ||
15 | creates: "{{ clever_app_root }}/.clever.json" | 16 | creates: "{{ clever_app_root }}/.clever.json" |
16 | environment: | 17 | environment: |
17 | CONFIGURATION_FILE: "{{ clever_login_file }}" | 18 | CONFIGURATION_FILE: "{{ clever_login_file }}" |