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
# Simply import both playbooks so that all variables can be set by the user
- import_playbook: re6stnet.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
hosts: 127.0.0.1
......@@ -10,7 +14,9 @@
- name: "slapos_user_token"
prompt: "Please enter a token from your SlapOS account."
private: no
when: slapos_client_cfg.stat.exists == False
tasks:
- name: Configure SlapOS Client
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