]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
Merge pull request #39 from paulrbr-fl/fix-login v1.19
authorpaulrbr-fl <43074087+paulrbr-fl@users.noreply.github.com>
Tue, 26 Feb 2019 18:24:31 +0000 (19:24 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Feb 2019 18:24:31 +0000 (19:24 +0100)
Fix login by removing any existing linked app

tasks/login.yml

index 383be3a9d13a6732df7d1953f178770b0fd999b1..f502be13505dd85beac8f96ce234c4add8a0d6b2 100644 (file)
@@ -9,10 +9,15 @@
     dest: "{{ clever_login_file }}"
   no_log: true
 
+- name: Make sure no apps are already linked
+  file:
+    state: absent
+    path: "{{ clever_app_root }}/.clever.json"
+
 - name: Link app
   command: clever link {{ clever_app }}
   args:
     chdir: "{{ clever_app_root }}"
-  changed_when: true
+    creates: "{{ clever_app_root }}/.clever.json"
   environment:
     CONFIGURATION_FILE: "{{ clever_login_file }}"