Commit c647ed6f authored by Levin Zimmermann's avatar Levin Zimmermann

playbook: Fix configure SlapOS client

parent a7b02a9b
......@@ -2,21 +2,25 @@
- 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
connection: local
vars_prompt:
- name: "slapos_user_token"
prompt: "Please enter a token from your SlapOS account."
private: no
when: slapos_client_cfg.stat.exists == False
tasks:
- name: Check if client configuration exists already
stat: path=/root/.slapos/slapos-client.cfg
register: slapos_client_cfg
- name: Configure SlapOS client
block:
- pause:
prompt: "Please enter a token from your SlapOS account (Ignore if you already configured the SlapOS Client)."
register: prompt
- set_fact:
slapos_user_token: "{{ prompt.user_input }}"
- 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