diff --git a/localhost.yml b/localhost.yml index e10e680..78d8035 100644 --- a/localhost.yml +++ b/localhost.yml @@ -3,6 +3,7 @@ roles: - dwm - ubuntu + - firefox - docker - java - jetbrains diff --git a/roles/firefox/files/etc/apt/preferences.d/mozillateamppa b/roles/firefox/files/etc/apt/preferences.d/mozillateamppa new file mode 100644 index 0000000..6c871df --- /dev/null +++ b/roles/firefox/files/etc/apt/preferences.d/mozillateamppa @@ -0,0 +1,3 @@ +Package: firefox* +Pin: release o=LP-PPA-mozillateam +Pin-Priority: 501 \ No newline at end of file diff --git a/roles/firefox/tasks/main.yml b/roles/firefox/tasks/main.yml new file mode 100644 index 0000000..50b9808 --- /dev/null +++ b/roles/firefox/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- import_tasks: upstream.yml + when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "22.04" + +- import_tasks: ppa.yml + when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "22.04" \ No newline at end of file diff --git a/roles/firefox/tasks/ppa.yml b/roles/firefox/tasks/ppa.yml new file mode 100644 index 0000000..9920319 --- /dev/null +++ b/roles/firefox/tasks/ppa.yml @@ -0,0 +1,23 @@ +- become: yes + block: + - name: remove snap + community.general.snap: + name: firefox + state: absent + + - 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: install browser + become: yes + apt: + update_cache: yes + state: latest + pkg: + - firefox \ No newline at end of file diff --git a/roles/firefox/tasks/upstream.yml b/roles/firefox/tasks/upstream.yml new file mode 100644 index 0000000..50876f2 --- /dev/null +++ b/roles/firefox/tasks/upstream.yml @@ -0,0 +1,12 @@ +- name: remove snap + become: yes + community.general.snap: + name: firefox + state: absent + +- name: install browser + become: yes + apt: + update_cache: yes + pkg: + - firefox \ No newline at end of file diff --git a/roles/ubuntu/tasks/packages.yml b/roles/ubuntu/tasks/packages.yml index fc92b96..f0ba788 100644 --- a/roles/ubuntu/tasks/packages.yml +++ b/roles/ubuntu/tasks/packages.yml @@ -36,13 +36,6 @@ pkg: - git -- name: install browser - become: yes - apt: - update_cache: yes - pkg: - - firefox - - name: install gui apps become: yes apt: