diff --git a/handlers/main.yml b/handlers/main.yml index b0fbc55..cd445ef 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -35,3 +35,8 @@ loop: - sdpd - hpsecd + +- name: new aliases + become: true + command: newaliases + diff --git a/tasks/FreeBSD-em0.yml b/tasks/FreeBSD-em0.yml new file mode 100644 index 0000000..db46c77 --- /dev/null +++ b/tasks/FreeBSD-em0.yml @@ -0,0 +1,22 @@ +--- +- name: install the updated intel driver + package: + name: intel-em-kmod + state: present + become: true + tags: + - installation + +- name: activate the updated intel driver + lineinfile: + path: "/boot/loader.conf" + regexp: "^{{ item.name }}" + line: "{{ item.name }}={{ item.val }}" + become: true + loop: "{{ sysctl_setting }}" + vars: + sysctl_setting: + - name: "if_em_updated_load" + val: 1 + tags: + - configuration diff --git a/tasks/FreeBSD-power.yml b/tasks/FreeBSD-power.yml index a0cf2c6..aec3347 100644 --- a/tasks/FreeBSD-power.yml +++ b/tasks/FreeBSD-power.yml @@ -42,6 +42,16 @@ tags: - configuration +- name: FreeBSD power| tweaks for use as a desktop + blockinfile: + path: "/boot/loader.conf" + block: "{{ lookup('file', 'block-FreeBSD-power-deskop.j2') }}" + marker: "# {mark} ANSIBLE MANAGED BLOCK tweaks for desktop" + become: true + tags: + - configuration + + - name: setup suspend on lid close sysctl: name: "{{ item.name }}" diff --git a/tasks/main.yml b/tasks/main.yml index eb14c71..abd525b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,7 +4,7 @@ - vars - include_tasks: "{{ tweak }}" - when: "ansible_system == 'FreeBSD'" + when: ansible_facts['os_family'] == "FreeBSD" tags: - installation - configuration @@ -21,8 +21,31 @@ - FreeBSD-chromium.yml - FreeBSD-reader.yml - FreeBSD-shortcuts.yml + - FreeBSD-em0.yml - keyboard.yml +- include_tasks: "{{ tweak }}" + when: ansible_facts['os_family'] == "Debian" + tags: + - installation + - configuration + - vars + loop_control: + loop_var: tweak + loop: + - Debian-power.yml + +- include_tasks: "{{ tweak }}" + when: ansible_facts['os_family'] == "Archlinux" + tags: + - installation + - configuration + - vars + loop_control: + loop_var: tweak + loop: + - Archlinux-power.yml + - include_tasks: "{{ tweaks }}" when: "ansible_system == 'FreeBSD'" tags: @@ -30,9 +53,7 @@ - configuration - vars loop_control: - loop_var: tweak + loop_var: tweaks loop: - "{{ role_path }}/../common/tasks/chip-development.yml" - "{{ role_path }}/../common/tasks/nmap.yml" - -