Initial changes to integrate new portal

This commit is contained in:
Ana Custura 2026-03-06 09:04:11 +00:00
parent c4ffbb00e2
commit 0fa18af48e
18 changed files with 311 additions and 221 deletions

View file

@ -13,28 +13,28 @@
name: "{{ butter_user }}"
state: present
- name: Get supported interface modes
command: iw list
register: iw_list
ignore_errors: yes
when: not (is_vmdb2 | bool)
- name: Add butter user to sudo group
ansible.builtin.user:
name: "{{ butter_user }}"
groups: sudo
append: true
- name: Search for AP mode support
set_fact:
ap_mode_supported: "{{ 'AP' in iw_list.stdout }}"
when: not (is_vmdb2 | bool)
- name: Show AP mode support result
debug:
msg: >
Wi-Fi AP mode supported: {{ ap_mode_supported }}
when: not (is_vmdb2 | bool)
- name: Allow passwordless sudo for butter user
ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: "^{{ butter_user }}"
line: "{{ butter_user }} ALL=(ALL) NOPASSWD:ALL"
validate: '/usr/sbin/visudo -cf %s'
- name: Make sure /etc/resolv.conf is populated
lineinfile:
ansible.builtin.lineinfile:
path: /etc/resolv.conf
regexp: '^nameserver 1.1.1.1'
line: 'nameserver 1.1.1.1'
state: present
insertafter: EOF
create: yes
create: true
owner: root
group: root
mode: '0644'