straighten out configuration nomenclature

master
Glenn K. Lockwood 6 years ago
parent 429829f28f
commit da6a1d4aa6
  1. 22
      roles/common/tasks/raspi-config.yml
  2. 24
      roles/common/tasks/raspi-facts.yml
  3. 12
      roles/common/vars/main.yml

@ -0,0 +1,22 @@
---
# Handle boot and autologin settings
- name: enable cli only
command: "raspi-config nonint do_boot_behaviour B1"
when: not macaddrs[my_macaddr].enable_gui and not macaddrs[my_macaddr].enable_autologin and (raspi_gui_enabled or raspi_autologin_enabled)
- name: enable cli with autologin
command: "raspi-config nonint do_boot_behaviour B2"
when: not macaddrs[my_macaddr].enable_gui and macaddrs[my_macaddr].enable_autologin and (raspi_gui_enabled or not raspi_autologin_enabled)
- name: enable desktop gui
command: "raspi-config nonint do_boot_behaviour B3"
when: macaddrs[my_macaddr].enable_gui and not macaddrs[my_macaddr].enable_autologin and (not raspi_gui_enabled or raspi_autologin_enabled)
- name: enable desktop gui with autologin
command: "raspi-config nonint do_boot_behaviour B4"
when: macaddrs[my_macaddr].enable_gui and macaddrs[my_macaddr].enable_autologin and (not raspi_gui_enabled or raspi_autologin_enabled)
#- name: set bootwait option
# command: "raspi-config nonint do_boot_wait {{ not macaddrs[my_macaddr].raspi_bootwait }}"
#when: macaddrs[my_macaddr].raspi_boot_nowait

@ -113,19 +113,19 @@
set_fact: set_fact:
raspi_type: "{{ raspi_type.stdout }}" raspi_type: "{{ raspi_type.stdout }}"
raspi_hostname: "{{ raspi_hostname.stdout }}" raspi_hostname: "{{ raspi_hostname.stdout }}"
raspi_boot_gui: "{{ raspi_boot_gui.stdout }}"
raspi_noautologin: "{{ raspi_noautologin.stdout }}"
raspi_boot_nowait: "{{ raspi_boot_nowait.stdout }}"
raspi_wifi_country: "{{ raspi_wifi_country.stdout }}" raspi_wifi_country: "{{ raspi_wifi_country.stdout }}"
raspi_camera_disabled: "{{ raspi_camera_disabled.stdout }}" raspi_gui_enabled: "{{ raspi_boot_gui.stdout != '0' }}"
raspi_ssh_disabled: "{{ raspi_ssh_disabled.stdout }}" raspi_autologin_enabled: "{{ raspi_noautologin.stdout == '0' }}"
raspi_vnc_disabled: "{{ raspi_vnc_disabled.stdout }}" raspi_bootwait_enabled: "{{ raspi_boot_nowait.stdout == '0' }}"
raspi_spi_disabled: "{{ raspi_spi_disabled.stdout }}" raspi_camera_enabled: "{{ raspi_camera_disabled.stdout == '0' }}"
raspi_i2c_disabled: "{{ raspi_i2c_disabled.stdout }}" raspi_ssh_enabled: "{{ raspi_ssh_disabled.stdout == '0' }}"
raspi_serial_disabled: "{{ raspi_serial_disabled.stdout }}" raspi_vnc_enabled: "{{ raspi_vnc_disabled.stdout == '0' }}"
raspi_serial_hw_disabled: "{{ raspi_serial_hw_disabled.stdout }}" raspi_spi_enabled: "{{ raspi_spi_disabled.stdout == '0' }}"
raspi_onewire_disabled: "{{ raspi_onewire_disabled.stdout }}" raspi_i2c_enabled: "{{ raspi_i2c_disabled.stdout == '0' }}"
raspi_rgpio_disabled: "{{ raspi_rgpio_disabled.stdout }}" raspi_serial_enabled: "{{ raspi_serial_disabled.stdout == '0' }}"
raspi_serial_hw_enabled: "{{ raspi_serial_hw_disabled.stdout == '0' }}"
raspi_onewire_enabled: "{{ raspi_onewire_disabled.stdout == '0' }}"
raspi_rgpio_enabled: "{{ raspi_rgpio_disabled.stdout == '0' }}"
raspi_overclock: "{{ raspi_overclock.stdout }}" raspi_overclock: "{{ raspi_overclock.stdout }}"
raspi_fs_unexpandable: "{{ raspi_fs_unexpandable.stdout }}" raspi_fs_unexpandable: "{{ raspi_fs_unexpandable.stdout }}"
raspi_overscan: "{{ raspi_overscan.stdout }}" raspi_overscan: "{{ raspi_overscan.stdout }}"

@ -5,6 +5,18 @@ macaddrs:
domain: "local" domain: "local"
locale: "en_US.UTF-8" locale: "en_US.UTF-8"
timezone: "America/Los_Angeles" timezone: "America/Los_Angeles"
enable_gui: True
enable_autologin: False
enable_bootwait: True
enable_camera: False
enable_vnc: False
enable_spi: False
enable_i2c: False
enable_serial: True
enable_serial_hw: True
enable_onewire: False
enable_rgpio: False
expand_fs: True
b8:27:eb:ff:35:c7: b8:27:eb:ff:35:c7:
hostname: "cloverleaf" hostname: "cloverleaf"
domain: "local" domain: "local"

Loading…
Cancel
Save