diff --git a/_sync.sh b/_sync.sh index ea597d7..2a89b5a 100755 --- a/_sync.sh +++ b/_sync.sh @@ -11,6 +11,7 @@ mkdirs=( dirs=( "/var/unbound:." "$HOME/bhyve:." + "$HOME/ansible:." "$HOME/.config/i3:i3wm" "$HOME/.config/i3status:i3wm" ) diff --git a/ansible/fedora-bloat.txt b/ansible/fedora-bloat.txt new file mode 100644 index 0000000..42252ab --- /dev/null +++ b/ansible/fedora-bloat.txt @@ -0,0 +1,30 @@ +ModemManager.x86_64 +NetworkManager-bluetooth.x86_64 +NetworkManager-wifi.x86_64 +NetworkManager-wwan.x86_64 +amd-gpu-firmware.noarch +amd-ucode-firmware.noarch +atheros-firmware.noarch +bluez.x86_64 +bluez-libs.x86_64 +brcmfmac-firmware.noarch +intel-audio-firmware.noarch +intel-gpu-firmware.noarch +iw.x86_64 +iwlegacy-firmware.noarch +iwlwifi-dvm-firmware.noarch +iwlwifi-mvm-firmware.noarch +mesa-dri-drivers.x86_64 +mesa-libGL.x86_64 +mesa-libglapi.x86_64 +mesa-va-drivers.x86_64 +microcode_ctl.x86_64 +mt7xxx-firmware.noarch +nvidia-gpu-firmware.noarch +nxpwireless-firmware.noarch +pulseaudio-libs.x86_64 +realtek-firmware.noarch +tiwilink-firmware.noarch +alsa-sof-firmware.noarch +cirrus-audio-firmware.noarch +libertas-firmware.noarch diff --git a/ansible/fedora-debloat.yml b/ansible/fedora-debloat.yml new file mode 100644 index 0000000..1cdbcad --- /dev/null +++ b/ansible/fedora-debloat.yml @@ -0,0 +1,16 @@ +--- +- name: remove useless packages for virtualized environment + hosts: servers + tasks: + - name: copy package list + copy: + src: fedora-bloat.txt + dest: /tmp/fedora-bloat.txt + register: copy_result + - name: dnf remove packages + shell: yes | dnf remove $(cat /tmp/fedora-bloat.txt) + when: copy_result is success + become: true + register: dnf_output + - debug: msg="{{ dnf_output.stdout }}" + - debug: msg="{{ dnf_output.stderr }}" diff --git a/ansible/hosts b/ansible/hosts new file mode 100644 index 0000000..a006c1c --- /dev/null +++ b/ansible/hosts @@ -0,0 +1,16 @@ +servers: + hosts: + srv-master: + srv-slave1: + srv-slave2: + vars: + ansible_connection: ssh + ansible_user: mykola + ansible_password: 12345678 +masters: + hosts: + srv-master: +slaves: + hosts: + srv-slave1: + srv-slave2: diff --git a/ansible/reboot.yml b/ansible/reboot.yml new file mode 100644 index 0000000..14b742c --- /dev/null +++ b/ansible/reboot.yml @@ -0,0 +1,7 @@ +--- +- name: reboot + hosts: servers + tasks: + - name: reboot 'em all + shell: reboot + become: true diff --git a/ansible/uname.yml b/ansible/uname.yml new file mode 100644 index 0000000..814814b --- /dev/null +++ b/ansible/uname.yml @@ -0,0 +1,8 @@ +--- +- name: uname test playbook + hosts: servers + tasks: + - name: run uname + shell: uname -a + register: uname_output + - debug: msg="{{ uname_output.stdout }}" diff --git a/ansible/updoot.yml b/ansible/updoot.yml new file mode 100644 index 0000000..aae6317 --- /dev/null +++ b/ansible/updoot.yml @@ -0,0 +1,15 @@ +--- +- name: update all fedora servers + hosts: servers + tasks: + - name: update + shell: yes | dnf update + register: update_status + become: true + - debug: msg="{{ update_status.stdout }}" + - name: upgrade + shell: yes | dnf upgrade + when: update_status is success + register: upgrade_status + become: true + - debug: msg="{{ upgrade_status.stdout }}" diff --git a/ansible/whoami.yml b/ansible/whoami.yml new file mode 100644 index 0000000..7c4bf5a --- /dev/null +++ b/ansible/whoami.yml @@ -0,0 +1,9 @@ +--- +- name: whoami test playbook + hosts: servers + tasks: + - name: run whoami + shell: whoami + register: whoami_output + become: true + - debug: msg="{{ whoami_output.stdout }}" diff --git a/bhyve/win10.sh b/bhyve/win10.sh index 4774e18..3f0348b 100755 --- a/bhyve/win10.sh +++ b/bhyve/win10.sh @@ -1,13 +1,13 @@ #!/bin/sh -./enroll-tap.sh vnat0 tap0 & +./enroll-tap.sh vnat0 tap4 & bhyve \ -c 2 \ -s 0,hostbridge \ -s 3,ahci-hd,/var/lib/libvirt/images/win10.img \ - -s 10,virtio-net,tap0 \ - -s 15,fbuf,rfb=127.0.0.1:5900,w=1280,h=720 \ + -s 10,virtio-net,tap4 \ + -s 15,fbuf,rfb=127.0.0.1:5969,w=1280,h=720 \ -s 31,lpc \ -l com1,/dev/nmdm0A \ -l com2,/dev/nmdm1A \