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 @@
register: slapos_cfg
- 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"
- name: Check if configuration exists already
......@@ -20,4 +20,4 @@
- name: Run slapos format for initial bootstrap
shell: "slapos node format --now --alter_user=True"
when: xslapos_cfg.stat.exists == True
\ No newline at end of file
when: xslapos_cfg.stat.exists == True
......@@ -24,14 +24,21 @@
when: computer_name != "noname"
register: prompt
- set_fact:
slapostoken: "{{ prompt.user_input | default('notoken', true) }}"
slapostoken: "{{ prompt.user_input | default('notoken', true) }}"
- 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"
register: prompt
- 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:
- { 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