Commit a7b02a9b authored by levinericzimmermann's avatar levinericzimmermann Committed by Levin Zimmermann

playbook: Fix SlapOS client configuration

It won't run in an issue anymore if the file already exists.
parent f32d831d
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
- import_playbook: re6stnet.yml - import_playbook: re6stnet.yml
- import_playbook: slapos.yml - import_playbook: slapos.yml
- name: Check if client configuration exists already
stat: path=/root/.slapos/slapos-client.cfg
register: slapos_client_cfg
- name: a play that runs entirely on the ansible host - name: a play that runs entirely on the ansible host
hosts: 127.0.0.1 hosts: 127.0.0.1
connection: local connection: local
...@@ -10,7 +14,9 @@ ...@@ -10,7 +14,9 @@
- name: "slapos_user_token" - name: "slapos_user_token"
prompt: "Please enter a token from your SlapOS account." prompt: "Please enter a token from your SlapOS account."
private: no private: no
when: slapos_client_cfg.stat.exists == False
tasks: tasks:
- name: Configure SlapOS Client - name: Configure SlapOS Client
shell: slapos configure client --token {{ slapos_user_token }} shell: slapos configure client --token {{ slapos_user_token }}
when: slapos_client_cfg.stat.exists == False
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment