Compare commits
No commits in common. "ee2eecf737dcbbe06828df93b1f8910a98759071" and "2eae70f36ac0b09b1070894d8c24ef9264a7f943" have entirely different histories.
ee2eecf737
...
2eae70f36a
@ -2,8 +2,9 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- prepare
|
||||
- systemd-boot
|
||||
- ubuntu
|
||||
- ubuntu-java
|
||||
- ubuntu-firefox
|
||||
- prusa-slicer
|
||||
- dev-java
|
||||
- dev-js
|
||||
|
@ -1,69 +0,0 @@
|
||||
---
|
||||
- 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
|
@ -1,3 +0,0 @@
|
||||
---
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
@ -1,4 +0,0 @@
|
||||
title Arch Linux{{ name }}
|
||||
linux /vmlinuz-{{ version }}
|
||||
initrd /initramfs-{{ version }}{{ variant }}.img
|
||||
options root={{ root }} cryptdevice={{ cryptdevice }} {{ options }}
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
root: /dev/mapper/vgubuntu-root
|
||||
cryptdevice: /dev/nvme0n1p3:cryptlvm
|
||||
options: rw add_efi_memmap amd_pstate=active loglevel=3
|
||||
boot: /boot
|
||||
efs: /boot/efi
|
83
roles/ubuntu-firefox/tasks/linux-mint.yml
Normal file
83
roles/ubuntu-firefox/tasks/linux-mint.yml
Normal file
@ -0,0 +1,83 @@
|
||||
- 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
|
6
roles/ubuntu-firefox/tasks/main.yml
Normal file
6
roles/ubuntu-firefox/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- 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"
|
55
roles/ubuntu-firefox/tasks/ppa.yml
Normal file
55
roles/ubuntu-firefox/tasks/ppa.yml
Normal file
@ -0,0 +1,55 @@
|
||||
- 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
|
6
roles/ubuntu-firefox/tasks/update-alternatives.yml
Normal file
6
roles/ubuntu-firefox/tasks/update-alternatives.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- 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
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
- 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,87 +1,45 @@
|
||||
---
|
||||
- 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: 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: firefox
|
||||
state: disabled
|
||||
name: chromium
|
||||
state: absent
|
||||
when:
|
||||
- "'snapd' in ansible_facts.packages"
|
||||
- "'firefox' in ansible_facts.packages"
|
||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||
- "'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:
|
||||
- firefox
|
||||
- chromium
|
||||
- chromium-browser
|
||||
when:
|
||||
- "'firefox' in ansible_facts.packages"
|
||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||
- "'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 source list
|
||||
ansible.builtin.apt_repository:
|
||||
- name: add linux mint repo
|
||||
apt_repository:
|
||||
repo: deb http://packages.linuxmint.com vera upstream
|
||||
state: present
|
||||
filename: linux-mint
|
||||
|
||||
- name: set linux mint for higher priority
|
||||
- name: pin linux mint version of chromium
|
||||
copy:
|
||||
src: etc/apt/preferences.d/mint-firefox
|
||||
dest: /etc/apt/preferences.d/mint-firefox
|
||||
src: etc/apt/preferences.d/mint-chromium
|
||||
dest: /etc/apt/preferences.d/mint-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
|
||||
- name: install chromium
|
||||
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
|
||||
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
|
||||
- chromium
|
@ -1,4 +1,7 @@
|
||||
---
|
||||
- import_tasks: rearrange-folders.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: cleanup.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
@ -11,14 +14,8 @@
|
||||
- import_tasks: unsnap.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: chromium.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: firefox.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: dconf.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: openjdk.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
8
roles/ubuntu/tasks/rearrange-folders-loop.yml
Normal file
8
roles/ubuntu/tasks/rearrange-folders-loop.yml
Normal file
@ -0,0 +1,8 @@
|
||||
- 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
|
17
roles/ubuntu/tasks/rearrange-folders.yml
Normal file
17
roles/ubuntu/tasks/rearrange-folders.yml
Normal file
@ -0,0 +1,17 @@
|
||||
- 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