Commit 6561a7e1 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

playbook: allow user to change partition number during installation

parent 48311248
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
register: slapos_cfg register: slapos_cfg
- name: Configure SlapOS with slapos node register - name: Configure SlapOS with slapos node register
shell: "slapos node register --token {{ slapostoken }} --master-url {{ slapos_master_url }} --master-url-web {{ slapos_web_master_url }} --interface-name {{ interface_name }} {{ computer_name }}" shell: "slapos node register --token {{ slapostoken }} --master-url {{ slapos_master_url }} --master-url-web {{ slapos_web_master_url }} --interface-name {{ interface_name }} --partition-number {{ partition_number }} {{ computer_name }}"
when: slapos_cfg.stat.exists == False and slapostoken != "notoken" and computer_name != "noname" when: slapos_cfg.stat.exists == False and slapostoken != "notoken" and computer_name != "noname"
- name: Check if configuration exists already - name: Check if configuration exists already
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
- name: Run slapos format for initial bootstrap - name: Run slapos format for initial bootstrap
shell: "slapos node format --now --alter_user=True" shell: "slapos node format --now --alter_user=True"
when: xslapos_cfg.stat.exists == True when: xslapos_cfg.stat.exists == True
\ No newline at end of file
...@@ -24,14 +24,21 @@ ...@@ -24,14 +24,21 @@
when: computer_name != "noname" when: computer_name != "noname"
register: prompt register: prompt
- set_fact: - set_fact:
slapostoken: "{{ prompt.user_input | default('notoken', true) }}" slapostoken: "{{ prompt.user_input | default('notoken', true) }}"
- pause: - pause:
prompt: "Which network interface are you using? (ignore if you already have a configured re6st) [lo]" prompt: "Which interface will provide IPv6? (ignore if you already have a configured re6st) [lo]"
when: slapostoken != "notoken" when: slapostoken != "notoken"
register: prompt register: prompt
- set_fact: - set_fact:
interface_name: "{{ prompt.user_input | default('lo', true) }}" interface_name: "{{ prompt.user_input | default('lo', true) }}"
- pause:
prompt: "How many SlapOS computer partitions would you like? [10]"
when: slapostoken != "notoken"
register: prompt
- set_fact:
partition_number: "{{ prompt.user_input | default('10', true) }}"
roles: roles:
- { role: slapos, package_state: present } - { role: slapos, package_state: present }
......
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