--- # All rights reserved (c) 2021-2024, Vladimir Botka # Simplified BSD License, https://opensource.org/licenses/BSD-2-Clause # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Ansible playbook: pb-wifi-basic.yml # # Description: # # Downloads, mounts, and configures wireless network in the system image. # # Requirements: # # * OS: FreeBSD # * role: vbotka.freebsd_custom_image # # Example: # # * Fit the variables to your needs # * Run the playbook # shell> ansible-playbook pb-wifi-basic.yml # * Dump the image to the media # shell> dd FreeBSD-13.3-RELEASE-arm-armv6-RPI-B.img of=/dev/mmcsd0 \ # bs=1m conv=sync status=progress # * The system should automaticaly connect to the preconfigured AP and # configure IP adress. It should be possible to ssh to the # preinstalled user. # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # https://raw.githubusercontent.com/vbotka/ansible-freebsd-custom-image/master/contrib/playbook/pb-wifi-basic.yml - name: Download, mount, and configure wireless network in the system image hosts: images.example.com connection: ssh remote_user: admin become: true become_user: root become_method: ansible.builtin.sudo vars: bsd_cimage_sanity: false bsd_cimage_install: false bsd_cimage_debug: true bsd_cimage_debug_classified: true bsd_cimage_mount_dir: /export/images/FreeBSD/live bsd_cimage_mount_file: FreeBSD-13.3-RELEASE-arm-armv6-RPI-B.img bsd_cimage_mount_points: - partition: s2a fstype: ufs mountpoint: /mnt3 bsd_cimage_mount_path: /mnt3 bsd_cimage_loaderconf: true bsd_cimage_loaderconf_backup: true bsd_cimage_loaderconf_modules: [wlan, wlan_wep, wlan_ccmp, wlan_tkip, wlan_amrr, rtwn, if_rtwn_usb] bsd_cimage_loaderconf_data: - hw.usb.template=3 - umodem_load="YES" - boot_multicons="YES" - boot_serial="YES" - beastie_disable="YES" - loader_color="NO" - legal.realtek.license_ack=1 bsd_cimage_loaderconf_sysctl: [] bsd_cimage_rcconf: true bsd_cimage_rcconf_backup: true bsd_cimage_rcconf_data: - { key: wlans_rtwn0, value: '"wlan0"' } - { key: ifconfig_wlan0, value: '"WPA SYNCDHCP"' } bsd_cimage_wpasupconf: true bsd_cimage_wpasupconf_backup: true bsd_cimage_wpasupconf_data: - dev: wlan0 network: - conf: - { key: ssid, value: '"my_access_point"' } - { key: psk, value: '"my_password"' } - { key: disabled, value: "0" } bsd_cimage_wpasupconf_link: true bsd_cimage_wpasupconf_link_dev: wlan0 roles: - vbotka.freebsd_custom_image # EOF