Refactoring and vmdb2 improvements
This commit is contained in:
parent
e94c68854d
commit
f61468fff5
28 changed files with 1257 additions and 0 deletions
40
ansible/butter-base.yml
Normal file
40
ansible/butter-base.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- name: Butter Base
|
||||
hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: Ensure butter_user user exists
|
||||
ansible.builtin.user:
|
||||
name: "{{ butter_user }}"
|
||||
state: present
|
||||
|
||||
- name: Ensure butter_user group exists
|
||||
ansible.builtin.group:
|
||||
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: 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: Make sure /etc/resolv.conf is populated
|
||||
lineinfile:
|
||||
path: /etc/resolv.conf
|
||||
regexp: '^nameserver 1.1.1.1'
|
||||
line: 'nameserver 1.1.1.1'
|
||||
state: present
|
||||
insertafter: EOF
|
||||
create: yes
|
||||
Loading…
Add table
Add a link
Reference in a new issue