Compare commits
3 Commits
2eae70f36a
...
ee2eecf737
Author | SHA1 | Date | |
---|---|---|---|
ee2eecf737 | |||
f378f95d4c | |||
5ae29af922 |
@ -2,9 +2,8 @@
|
|||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
roles:
|
roles:
|
||||||
- prepare
|
- prepare
|
||||||
|
- systemd-boot
|
||||||
- ubuntu
|
- ubuntu
|
||||||
- ubuntu-java
|
|
||||||
- ubuntu-firefox
|
|
||||||
- prusa-slicer
|
- prusa-slicer
|
||||||
- dev-java
|
- dev-java
|
||||||
- dev-js
|
- dev-js
|
||||||
|
69
roles/systemd-boot/tasks/arch.yml
Normal file
69
roles/systemd-boot/tasks/arch.yml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
- name: "[Arch] install efi drivers for ext4"
|
||||||
|
become: yes
|
||||||
|
community.general.pacman:
|
||||||
|
update_cache: yes
|
||||||
|
name:
|
||||||
|
- efifs
|
||||||
|
|
||||||
|
- name: "[Arch] Install systemd-boot"
|
||||||
|
become: yes
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
bootctl --esp-path {{ efs }} --boot-path {{ boot }} install
|
||||||
|
|
||||||
|
- name: "[Arch] Copy ext4 driver to systemd drivers"
|
||||||
|
become: yes
|
||||||
|
copy:
|
||||||
|
remote_src: true
|
||||||
|
content: /usr/lib/efifs-x64/ext2_x64.efi
|
||||||
|
dest: "{{ efs }}/EFI/systemd/drivers/ext2_x64.efi"
|
||||||
|
|
||||||
|
- name: "[Arch] Add main entry"
|
||||||
|
become: yes
|
||||||
|
template:
|
||||||
|
src: loader/entries/arch.conf.j2
|
||||||
|
dest: "{{ boot }}/loader/entries/arch.conf"
|
||||||
|
vars:
|
||||||
|
name: ""
|
||||||
|
variant: ""
|
||||||
|
version: "linux"
|
||||||
|
|
||||||
|
- name: "[Arch] Add fallback entry"
|
||||||
|
become: yes
|
||||||
|
template:
|
||||||
|
src: loader/entries/arch.conf.j2
|
||||||
|
dest: "{{ boot }}/loader/entries/arch-fallback.conf"
|
||||||
|
vars:
|
||||||
|
name: " Fallback"
|
||||||
|
variant: "-fallback"
|
||||||
|
version: "linux"
|
||||||
|
|
||||||
|
- name: "[Arch] Check if lts kernel is installed"
|
||||||
|
stat:
|
||||||
|
path: "{{ boot }}/vmlinuz-linux-lts"
|
||||||
|
register: lts_kernel
|
||||||
|
|
||||||
|
- name: "[Arch] Add lts entry"
|
||||||
|
become: yes
|
||||||
|
template:
|
||||||
|
src: loader/entries/arch.conf.j2
|
||||||
|
dest: "{{ boot }}/loader/entries/arch-lts.conf"
|
||||||
|
vars:
|
||||||
|
name: " LTS"
|
||||||
|
variant: ""
|
||||||
|
version: "linux-lts"
|
||||||
|
when:
|
||||||
|
- lts_kernel.stat.exists
|
||||||
|
|
||||||
|
- name: "[Arch] Add lts fallback entry"
|
||||||
|
become: yes
|
||||||
|
template:
|
||||||
|
src: loader/entries/arch.conf.j2
|
||||||
|
dest: "{{ boot }}/loader/entries/arch-lts-fallback.conf"
|
||||||
|
vars:
|
||||||
|
name: " LTS Fallback"
|
||||||
|
variant: "-fallback"
|
||||||
|
version: "linux-lts"
|
||||||
|
when:
|
||||||
|
- lts_kernel.stat.exists
|
3
roles/systemd-boot/tasks/main.yml
Normal file
3
roles/systemd-boot/tasks/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: arch.yml
|
||||||
|
when: ansible_distribution == "Archlinux"
|
4
roles/systemd-boot/templates/loader/entries/arch.conf.j2
Normal file
4
roles/systemd-boot/templates/loader/entries/arch.conf.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
title Arch Linux{{ name }}
|
||||||
|
linux /vmlinuz-{{ version }}
|
||||||
|
initrd /initramfs-{{ version }}{{ variant }}.img
|
||||||
|
options root={{ root }} cryptdevice={{ cryptdevice }} {{ options }}
|
6
roles/systemd-boot/vars/main.yml
Normal file
6
roles/systemd-boot/vars/main.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
root: /dev/mapper/vgubuntu-root
|
||||||
|
cryptdevice: /dev/nvme0n1p3:cryptlvm
|
||||||
|
options: rw add_efi_memmap amd_pstate=active loglevel=3
|
||||||
|
boot: /boot
|
||||||
|
efs: /boot/efi
|
@ -1,83 +0,0 @@
|
|||||||
- become: yes
|
|
||||||
block:
|
|
||||||
- name: Gather the package facts
|
|
||||||
ansible.builtin.package_facts:
|
|
||||||
manager: auto
|
|
||||||
|
|
||||||
- name: remove snap
|
|
||||||
community.general.snap:
|
|
||||||
name: firefox
|
|
||||||
state: absent
|
|
||||||
when:
|
|
||||||
- "'snapd' in ansible_facts.packages"
|
|
||||||
- "'firefox' in ansible_facts.packages"
|
|
||||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
||||||
|
|
||||||
- name: remove snap
|
|
||||||
community.general.snap:
|
|
||||||
name: firefox
|
|
||||||
state: disabled
|
|
||||||
when:
|
|
||||||
- "'snapd' in ansible_facts.packages"
|
|
||||||
- "'firefox' in ansible_facts.packages"
|
|
||||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
||||||
|
|
||||||
- name: remove apt snap wrapper version
|
|
||||||
apt:
|
|
||||||
state: absent
|
|
||||||
pkg:
|
|
||||||
- firefox
|
|
||||||
when:
|
|
||||||
- "'firefox' in ansible_facts.packages"
|
|
||||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
||||||
|
|
||||||
- name: Add linux mint source list
|
|
||||||
ansible.builtin.apt_repository:
|
|
||||||
repo: deb http://packages.linuxmint.com vera upstream
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: set linux mint for higher priority
|
|
||||||
copy:
|
|
||||||
src: etc/apt/preferences.d/mint-firefox
|
|
||||||
dest: /etc/apt/preferences.d/mint-firefox
|
|
||||||
|
|
||||||
- name: Remove unattended upgrades
|
|
||||||
file:
|
|
||||||
path: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Remove mozilla ppa
|
|
||||||
apt_repository:
|
|
||||||
repo: ppa:mozillateam/ppa
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: install equivs
|
|
||||||
become: yes
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
state: latest
|
|
||||||
pkg:
|
|
||||||
- equivs
|
|
||||||
|
|
||||||
- name: copy fakepackage to satisfy dependencies
|
|
||||||
copy:
|
|
||||||
src: tmp/fakepkg
|
|
||||||
dest: /tmp/fakepkg
|
|
||||||
|
|
||||||
- name: make fake ubuntu-system-adjustments package
|
|
||||||
shell:
|
|
||||||
cmd: equivs-build /tmp/fakepkg
|
|
||||||
chdir: /tmp
|
|
||||||
|
|
||||||
- name: Install a .deb package
|
|
||||||
ansible.builtin.apt:
|
|
||||||
deb: /tmp/ubuntu-system-adjustments_2021.12.16_all.deb
|
|
||||||
|
|
||||||
- name: install browser
|
|
||||||
become: yes
|
|
||||||
apt:
|
|
||||||
allow_downgrade: true
|
|
||||||
update_cache: yes
|
|
||||||
state: latest
|
|
||||||
pkg:
|
|
||||||
- firefox
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- import_tasks: linux-mint.yml
|
|
||||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >= 22
|
|
||||||
|
|
||||||
- import_tasks: update-alternatives.yml
|
|
||||||
when: ansible_distribution == "Ubuntu"
|
|
@ -1,55 +0,0 @@
|
|||||||
- become: yes
|
|
||||||
block:
|
|
||||||
- name: Gather the package facts
|
|
||||||
ansible.builtin.package_facts:
|
|
||||||
manager: auto
|
|
||||||
|
|
||||||
- name: remove snap
|
|
||||||
community.general.snap:
|
|
||||||
name: firefox
|
|
||||||
state: absent
|
|
||||||
when:
|
|
||||||
- "'snapd' in ansible_facts.packages"
|
|
||||||
- "'firefox' in ansible_facts.packages"
|
|
||||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
||||||
|
|
||||||
- name: remove snap
|
|
||||||
community.general.snap:
|
|
||||||
name: firefox
|
|
||||||
state: disabled
|
|
||||||
when:
|
|
||||||
- "'snapd' in ansible_facts.packages"
|
|
||||||
- "'firefox' in ansible_facts.packages"
|
|
||||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
||||||
|
|
||||||
- name: remove apt snap wrapper version
|
|
||||||
apt:
|
|
||||||
state: absent
|
|
||||||
pkg:
|
|
||||||
- firefox
|
|
||||||
when:
|
|
||||||
- "'firefox' in ansible_facts.packages"
|
|
||||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
|
||||||
|
|
||||||
- name: add ppa
|
|
||||||
apt_repository:
|
|
||||||
repo: ppa:mozillateam/ppa
|
|
||||||
|
|
||||||
- name: set mozillateam higher priority
|
|
||||||
copy:
|
|
||||||
src: etc/apt/preferences.d/mozillateamppa
|
|
||||||
dest: /etc/apt/preferences.d/mozillateamppa
|
|
||||||
|
|
||||||
- name: set mozillateam for unattended upgrades
|
|
||||||
copy:
|
|
||||||
src: etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
|
||||||
dest: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
|
||||||
|
|
||||||
- name: install browser
|
|
||||||
become: yes
|
|
||||||
apt:
|
|
||||||
allow_downgrade: true
|
|
||||||
update_cache: yes
|
|
||||||
state: latest
|
|
||||||
pkg:
|
|
||||||
- firefox
|
|
@ -1,6 +0,0 @@
|
|||||||
- name: Set firefox as x-www-browser
|
|
||||||
become: yes
|
|
||||||
command: update-alternatives --set x-www-browser /usr/bin/firefox
|
|
||||||
|
|
||||||
- name: update xdg default-web-browser
|
|
||||||
command: xdg-settings set default-web-browser firefox.desktop
|
|
45
roles/ubuntu/tasks/chromium.yml
Normal file
45
roles/ubuntu/tasks/chromium.yml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
- become: yes
|
||||||
|
block:
|
||||||
|
- name: Gather the package facts
|
||||||
|
ansible.builtin.package_facts:
|
||||||
|
manager: auto
|
||||||
|
|
||||||
|
- name: add mint gpg key
|
||||||
|
command: apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A1715D88E1DF1F24 40976EAF437D05B5 3B4FE6ACC0B21F32 A6616109451BBBF2
|
||||||
|
|
||||||
|
- name: remove snap
|
||||||
|
community.general.snap:
|
||||||
|
name: chromium
|
||||||
|
state: absent
|
||||||
|
when:
|
||||||
|
- "'snapd' in ansible_facts.packages"
|
||||||
|
- "'chromium-browser' in ansible_facts.packages"
|
||||||
|
- ansible_facts.packages['chromium-browser'][0].version == "1:85.0.4183.83-0ubuntu2.22.04.1"
|
||||||
|
|
||||||
|
- name: remove apt snap wrapper version
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
pkg:
|
||||||
|
- chromium
|
||||||
|
- chromium-browser
|
||||||
|
when:
|
||||||
|
- "'chromium-browser' in ansible_facts.packages"
|
||||||
|
- ansible_facts.packages['chromium-browser'][0].version == "1:85.0.4183.83-0ubuntu2.22.04.1"
|
||||||
|
|
||||||
|
- name: add linux mint repo
|
||||||
|
apt_repository:
|
||||||
|
repo: deb http://packages.linuxmint.com vera upstream
|
||||||
|
state: present
|
||||||
|
filename: linux-mint
|
||||||
|
|
||||||
|
- name: pin linux mint version of chromium
|
||||||
|
copy:
|
||||||
|
src: etc/apt/preferences.d/mint-chromium
|
||||||
|
dest: /etc/apt/preferences.d/mint-chromium
|
||||||
|
|
||||||
|
- name: install chromium
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
pkg:
|
||||||
|
- chromium
|
@ -1,45 +1,87 @@
|
|||||||
---
|
|
||||||
- become: yes
|
- become: yes
|
||||||
block:
|
block:
|
||||||
- name: Gather the package facts
|
- name: Gather the package facts
|
||||||
ansible.builtin.package_facts:
|
ansible.builtin.package_facts:
|
||||||
manager: auto
|
manager: auto
|
||||||
|
|
||||||
- name: add mint gpg key
|
|
||||||
command: apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A1715D88E1DF1F24 40976EAF437D05B5 3B4FE6ACC0B21F32 A6616109451BBBF2
|
|
||||||
|
|
||||||
- name: remove snap
|
- name: remove snap
|
||||||
community.general.snap:
|
community.general.snap:
|
||||||
name: chromium
|
name: firefox
|
||||||
state: absent
|
state: absent
|
||||||
when:
|
when:
|
||||||
- "'snapd' in ansible_facts.packages"
|
- "'snapd' in ansible_facts.packages"
|
||||||
- "'chromium-browser' in ansible_facts.packages"
|
- "'firefox' in ansible_facts.packages"
|
||||||
- ansible_facts.packages['chromium-browser'][0].version == "1:85.0.4183.83-0ubuntu2.22.04.1"
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||||
|
|
||||||
|
- name: remove snap
|
||||||
|
community.general.snap:
|
||||||
|
name: firefox
|
||||||
|
state: disabled
|
||||||
|
when:
|
||||||
|
- "'snapd' in ansible_facts.packages"
|
||||||
|
- "'firefox' in ansible_facts.packages"
|
||||||
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||||
|
|
||||||
- name: remove apt snap wrapper version
|
- name: remove apt snap wrapper version
|
||||||
apt:
|
apt:
|
||||||
state: absent
|
state: absent
|
||||||
pkg:
|
pkg:
|
||||||
- chromium
|
- firefox
|
||||||
- chromium-browser
|
|
||||||
when:
|
when:
|
||||||
- "'chromium-browser' in ansible_facts.packages"
|
- "'firefox' in ansible_facts.packages"
|
||||||
- ansible_facts.packages['chromium-browser'][0].version == "1:85.0.4183.83-0ubuntu2.22.04.1"
|
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||||
|
|
||||||
- name: add linux mint repo
|
- name: Add linux mint source list
|
||||||
apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: deb http://packages.linuxmint.com vera upstream
|
repo: deb http://packages.linuxmint.com vera upstream
|
||||||
state: present
|
state: present
|
||||||
filename: linux-mint
|
|
||||||
|
|
||||||
- name: pin linux mint version of chromium
|
- name: set linux mint for higher priority
|
||||||
copy:
|
copy:
|
||||||
src: etc/apt/preferences.d/mint-chromium
|
src: etc/apt/preferences.d/mint-firefox
|
||||||
dest: /etc/apt/preferences.d/mint-chromium
|
dest: /etc/apt/preferences.d/mint-firefox
|
||||||
|
|
||||||
- name: install chromium
|
- name: Remove unattended upgrades
|
||||||
|
file:
|
||||||
|
path: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Remove mozilla ppa
|
||||||
|
apt_repository:
|
||||||
|
repo: ppa:mozillateam/ppa
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: install equivs
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
state: latest
|
||||||
pkg:
|
pkg:
|
||||||
- chromium
|
- equivs
|
||||||
|
|
||||||
|
- name: copy fakepackage to satisfy dependencies
|
||||||
|
copy:
|
||||||
|
src: tmp/fakepkg
|
||||||
|
dest: /tmp/fakepkg
|
||||||
|
|
||||||
|
- name: make fake ubuntu-system-adjustments package
|
||||||
|
shell:
|
||||||
|
cmd: equivs-build /tmp/fakepkg
|
||||||
|
chdir: /tmp
|
||||||
|
|
||||||
|
- name: Install a .deb package
|
||||||
|
ansible.builtin.apt:
|
||||||
|
deb: /tmp/ubuntu-system-adjustments_2021.12.16_all.deb
|
||||||
|
|
||||||
|
- name: install browser
|
||||||
|
apt:
|
||||||
|
allow_downgrade: true
|
||||||
|
update_cache: yes
|
||||||
|
state: latest
|
||||||
|
pkg:
|
||||||
|
- firefox
|
||||||
|
|
||||||
|
- name: Set firefox as x-www-browser
|
||||||
|
command: update-alternatives --set x-www-browser /usr/bin/firefox
|
||||||
|
|
||||||
|
- name: update xdg default-web-browser
|
||||||
|
command: xdg-settings set default-web-browser firefox.desktop
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
---
|
---
|
||||||
- import_tasks: rearrange-folders.yml
|
|
||||||
when: ansible_distribution == "Ubuntu"
|
|
||||||
|
|
||||||
- import_tasks: cleanup.yml
|
- import_tasks: cleanup.yml
|
||||||
when: ansible_distribution == "Ubuntu"
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
@ -14,8 +11,14 @@
|
|||||||
- import_tasks: unsnap.yml
|
- import_tasks: unsnap.yml
|
||||||
when: ansible_distribution == "Ubuntu"
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
- import_tasks: chromium.yml
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
- import_tasks: firefox.yml
|
- import_tasks: firefox.yml
|
||||||
when: ansible_distribution == "Ubuntu"
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
- import_tasks: dconf.yml
|
- import_tasks: dconf.yml
|
||||||
when: ansible_distribution == "Ubuntu"
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
- import_tasks: openjdk.yml
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
- name: "Lookup for {{ item }} directory"
|
|
||||||
stat:
|
|
||||||
path: "{{ desktop.old_source_dir }}/{{ item }}"
|
|
||||||
register: old_directory
|
|
||||||
- name: "Move {{ desktop.old_source_dir }}/{{ item }} to {{ desktop.apps_source_dir }}/{{ item }}"
|
|
||||||
command: mv {{ desktop.old_source_dir }}/{{ item }} {{ desktop.apps_source_dir }}/{{ item }}
|
|
||||||
when:
|
|
||||||
- old_directory.stat.exists
|
|
@ -1,17 +0,0 @@
|
|||||||
- name: create directory
|
|
||||||
file:
|
|
||||||
state: directory
|
|
||||||
path: "{{ desktop.apps_source_dir }}"
|
|
||||||
|
|
||||||
- include_tasks: rearrange-folders-loop.yml
|
|
||||||
loop:
|
|
||||||
- asusctl
|
|
||||||
- dotfiles
|
|
||||||
- dwm
|
|
||||||
- dwm-nest
|
|
||||||
- ego
|
|
||||||
- dwmstatus
|
|
||||||
- polybar
|
|
||||||
- streamdeck
|
|
||||||
- stterm
|
|
||||||
- supergfxctl
|
|
Loading…
Reference in New Issue
Block a user