Skip to content

Commit

Permalink
Merge pull request #43 from nis65/deployoverwifi
Browse files Browse the repository at this point in the history
feat: install over wifi
  • Loading branch information
fadnincx authored Jun 5, 2023
2 parents 8dc8302 + ee2892e commit eda8fca
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 182 deletions.
4 changes: 4 additions & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ environment: "production"
first_boot_ansible:
runtype: "setup"
full_unattended_install: false
# wifi:
# interface: "wlp1s0"
# ssid: "REDACTED"
# pw: "REDACTED"
os: "jammy"
output:
version: "%Y%m%d"
Expand Down
17 changes: 17 additions & 0 deletions container/autoinstall-user-data.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ autoinstall:
hostname: {{ config['initial_hostname'] | default('potoshostname01') }}
password: {{ config['initial_user']['password'] | default('$6$L36BiUuVCSipvlO8$oGI0C.LXZegkbftFkVDXXaasTM6zs9LM71BkqZToKw5aOZ7Yr70pkzH3P9Xz5R.n0ULJ0Zf8v5ZQ/eH8flDR7/') }}
username: {{ config['initial_user']['username'] | default('admin') }}
{% if config['wifi']['ssid'] is defined %}
early-commands:
- apt-get -y install wpasupplicant
drivers:
install: true
network:
# https://ubuntu.com/server/docs/install/autoinstall-reference#network
# https://netplan.readthedocs.io/en/stable/netplan-yaml/#properties-for-device-type-wifis
version: 2
wifis:
{{ config['wifi']['interface'] }}:
access-points:
"{{ config['wifi']['ssid'] }}":
password: "{{ config['wifi']['pw'] }}"
dhcp4: true
dhcp6: true
{% endif %}
ssh:
allow-pw: true
authorized-keys: []
Expand Down
181 changes: 0 additions & 181 deletions container/build-iso

This file was deleted.

6 changes: 5 additions & 1 deletion container/build-iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
config['initial_user'] = {}
config['initial_user']['username'] = ymlconfig.get("initial_user",{}).get('username',"admin")
config['initial_user']['password'] = ymlconfig.get("initial_user",{}).get('password',"$6$L36BiUuVCSipvlO8$oGI0C.LXZegkbftFkVDXXaasTM6zs9LM71BkqZToKw5aOZ7Yr70pkzH3P9Xz5R.n0ULJ0Zf8v5ZQ/eH8flDR7/")
config['wifi'] = {}
config['wifi']['interface'] = ymlconfig.get("wifi",{}).get('interface',"wlan0")
config['wifi']['ssid'] = ymlconfig.get("wifi",{}).get('ssid',"yourwifissid")
config['wifi']['pw'] = ymlconfig.get("wifi",{}).get('pw',"yourwifipassword")
config['environment'] = ymlconfig.get("environment","production")
config['first_boot_ansible'] = {}
config['first_boot_ansible']['runtype'] = ymlconfig.get("first_boot_ansible",{}).get('runtype',"setup")
Expand Down Expand Up @@ -101,7 +105,7 @@
# Print config info
if config['environment'] == "develop":
print(
"*** config.environment is %s, going to print some more informations for you:"%(
"*** config.environment is %s, going to print some more information for you:"%(
config['environment'],
)
)
Expand Down

0 comments on commit eda8fca

Please sign in to comment.