Add hold for firmware and minor cleanup

This commit is contained in:
Cassiano Aquino 2019-10-10 23:46:10 +01:00
parent 86649c8c46
commit 28e5ba4e13
No known key found for this signature in database
GPG Key ID: 2480258091054B09
2 changed files with 48 additions and 26 deletions

View File

@ -19,5 +19,5 @@ image:
clean: clean:
rm -rf /tmp/packer-builder-arm-image rm -rf /tmp/packer-builder-arm-image
rm -f pwnagotchi-raspbian-lite.img rm -f pwnagotchi-raspbian-lite-*.zip pwnagotchi-raspbian-lite-*.img pwnagotchi-raspbian-lite-*.sha256
rm -rf builder/output-pwnagotchi builder/packer_cache rm -rf builder/output-pwnagotchi builder/packer_cache

View File

@ -33,6 +33,12 @@
url: "https://github.com/bettercap/bettercap/releases/download/v2.25/bettercap_linux_armv6l_2.25.zip" url: "https://github.com/bettercap/bettercap/releases/download/v2.25/bettercap_linux_armv6l_2.25.zip"
ui: "https://github.com/bettercap/ui/releases/download/v1.3.0/ui.zip" ui: "https://github.com/bettercap/ui/releases/download/v1.3.0/ui.zip"
apt: apt:
hold:
- firmware-atheros
- firmware-brcm80211
- firmware-libertas
- firmware-misc-nonfree
- firmware-realtek
remove: remove:
- rasberrypi-net-mods - rasberrypi-net-mods
- dhcpcd5 - dhcpcd5
@ -118,6 +124,12 @@
repo: deb http://http.re4son-kernel.com/re4son/ kali-pi main repo: deb http://http.re4son-kernel.com/re4son/ kali-pi main
state: present state: present
- name: add firmware packages to hold
dpkg_selections:
name: "{{ item }}"
selection: hold
with_items: "{{ packages.apt.hold }}"
- name: update apt package cache - name: update apt package cache
apt: apt:
update_cache: yes update_cache: yes
@ -343,34 +355,48 @@
/opt/vc/bin/tvservice -o /opt/vc/bin/tvservice -o
fi fi
- name: create /etc/pwnagotchi/config.yml - name: create /etc/pwnagotchi folder
blockinfile: file:
path: /etc/pwnagotchi
state: directory
- name: check if user configuration exists
stat:
path: /etc/pwnagotchi/config.yml path: /etc/pwnagotchi/config.yml
create: yes register: user_config
block: |
# put here your custom configuration overrides - name: create /etc/pwnagotchi/config.yml
copy:
dest: /etc/pwnagotchi/config.yml
content: |
# Add your configuration overrides on this file any configuration changes done to defaults.yml will be lost!
# Example:
#
# ui:
# display:
# type: 'inkyphat'
# color: 'black'
#
when: not user_config.stat.exists
- name: configure lo interface - name: configure lo interface
blockinfile: copy:
path: /etc/network/interfaces.d/lo-cfg dest: /etc/network/interfaces.d/lo-cfg
create: yes content: |
block: |
auto lo auto lo
iface lo inet loopback iface lo inet loopback
- name: configure wlan interface - name: configure wlan interface
blockinfile: copy:
path: /etc/network/interfaces.d/wlan0-cfg dest: /etc/network/interfaces.d/wlan0-cfg
create: yes content: |
block: |
allow-hotplug wlan0 allow-hotplug wlan0
iface wlan0 inet static iface wlan0 inet static
- name: configure usb interface - name: configure usb interface
blockinfile: copy:
path: /etc/network/interfaces.d/usb0-cfg dest: /etc/network/interfaces.d/usb0-cfg
create: yes content: |
block: |
allow-hotplug usb0 allow-hotplug usb0
iface usb0 inet static iface usb0 inet static
address 10.0.0.2 address 10.0.0.2
@ -380,10 +406,9 @@
gateway 10.0.0.1 gateway 10.0.0.1
- name: configure eth0 interface (pi2/3/4) - name: configure eth0 interface (pi2/3/4)
blockinfile: copy:
path: /etc/network/interfaces.d/eth0-cfg dest: /etc/network/interfaces.d/eth0-cfg
create: yes content: |
block: |
allow-hotplug eth0 allow-hotplug eth0
iface eth0 inet dhcp iface eth0 inet dhcp
@ -397,8 +422,7 @@
dest: /boot/config.txt dest: /boot/config.txt
insertafter: EOF insertafter: EOF
line: '{{ item }}' line: '{{ item }}'
with_items: with_items: "{{system.boot_options}}"
- "{{system.boot_options}}"
- name: change root partition - name: change root partition
replace: replace:
@ -500,5 +524,3 @@
- name: reload systemd services - name: reload systemd services
systemd: systemd:
daemon_reload: yes daemon_reload: yes