Skip to content

don-rumata/ansible-role-install-firefox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ansible Role: Install Firefox

License Ansible Galaxy CircleCI

Install Firefox for Linux and Windows.

Work on

Ansible Galaxy style

  platforms:
    - name: Fedora
      versions:
        - 31
        - 32
    - name: Ubuntu
      versions:
        - focal
        - bionic
        - xenial
    - name: Debian
      version:
        - oldstable
        - stable
        # - testing
    - name: EL (CentOS)
      versions:
        - 7
        - 8
    - name: opensuse
      vesrion:
        - tumbleweed
    - name: ArchLinux
      version:
        - any
    - name: windows
      version:
        - 2008x64 (7 64bit)
        - 2008x86 (7 32bit)
        - 2019 (10 64bit)

Table style

  • βœ”οΈ - work, tested, ok.
  • 🚧 - TODO. Work in progress.
  • ❌ - not work. Don't try.
. Firefox stable Firefox beta Firefox nightly Firefox developer Firefox esr . Flatpak Snap msi exe tar.bz2 . 32 bit 64 bit
OS
Windows
7 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ ❌ βœ”οΈ βœ”οΈ
10 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ ❌ βœ”οΈ βœ”οΈ
.
Ubuntu
focal βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
eoan βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
disco βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
cosmic βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
bionic βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
xenial βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
.
Debian
jessie βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
stretch βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
buster βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
stable βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
testing βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
.
EL (CentOS)
8 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
7 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
.
opensuse
tumbleweed βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ ❌ ❌ βœ”οΈ βœ”οΈ βœ”οΈ
.
ArchLinux
any βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ 🚧 ❌ ❌ βœ”οΈ ❌ βœ”οΈ
.
Fedora
32 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
31 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
.
Package manager
deb/rpm βœ”οΈ ❌ ❌ βœ”οΈ/❌ ❌
Flatpak βœ”οΈ ❌ ❌ ❌ ❌
Snap βœ”οΈ βœ”οΈ 🚧 🚧 βœ”οΈ ❌ βœ”οΈ
msi βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
exe βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
tar.bz2 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
.
Architecture
32 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
64 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ

Requirements

min_ansible_version: 2.8

Role Variables

---
#--- Firefox Edition ---#

firefox_edition: stable

# https://www.mozilla.org/en-US/firefox/channel/desktop/#beta
# firefox_edition: beta

# https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly
# firefox_edition: nightly

# https://www.mozilla.org/en/firefox/developer/
# firefox_edition: developer

# https://www.mozilla.org/en/firefox/enterprise/
# firefox_edition: esr

#--- Firefox method install ---#

# https://repology.org/project/firefox/versions
firefox_method_install: package-manager

# https://en.wikipedia.org/wiki/Flatpak
# https://flathub.org/apps/details/org.mozilla.firefox
# firefox_method_install: flatpak

# https://en.wikipedia.org/wiki/Snappy_(package_manager)
# https://snapcraft.io/firefox
# firefox_method_install: snap

# https://www.mozilla.org/en/firefox/download/thanks/
# firefox_method_install: tar.bz2

#--- Firefox architecture ---#

firefox_arch: 64

# https://en.wikipedia.org/wiki/64-bit_computing
# firefox_arch: 32

#--- Firefox language ---#

# Default value: firefox_lang == your_windows_system_language

# firefox_lang: ru
# firefox_lang: en-US

#--- Firefox api urls ---#

firefox_versions_url: https://product-details.mozilla.org/1.0/firefox_versions.json

# Need for Windows.
firefox_available_languages_url: https://product-details.mozilla.org/1.0/languages.json

#--- Firefox installer type. Windows only!!! ---#

firefox_win_installer_type: exe

# firefox_win_installer_type: msi

#--- Firefox local download path ---#

firefox_windows_local_download_path: '{{ ansible_env.TMP }}\firefox'

firefox_linux_local_download_path: '/var/cache/firefox'

#--- Firefox install paths. Only for tar.bz2 ---#

firefox_linux_install_path: '/opt/firefox/{{ firefox_edition }}'

firefox_linux_path_to_bin: '{{ firefox_linux_install_path }}/firefox/firefox'

firefox_linux_path_to_icon: '{{ firefox_linux_install_path }}/firefox/browser/chrome/icons/default/default128.png'

#--- Firefox checksum algorithm ---#

firefox_checksum_algorithm: sha256

# firefox_checksum_algorithm: sha512

#--- Firefox version ---#

firefox_version: latest

# firefox_version: 75.0

#--- Apt repo section ---#

# https://repolib.readthedocs.io/en/latest/deb822-format.html

# If you *NOT* use apt-cacher-ng or other caching proxy - select "https".
http_or_https: http
# http_or_https: https

# https://www.opennet.ru/opennews/art.shtml?num=60019

mozilla_apt_repo_path_to_sources: /etc/apt/sources.list.d/mozilla.sources

mozilla_gpg_repo_key_url: https://packages.mozilla.org/apt/repo-signing-key.gpg

mozilla_apt_repo_architectures:
  - amd64
mozilla_apt_repo_components:
  - main
mozilla_apt_repo_suites:
  - mozilla
mozilla_apt_repo_types:
  - deb
mozilla_apt_repo_uris:
  - "{{ http_or_https }}://packages.mozilla.org/apt"
mozilla_apt_repo_x_repolib_name: Official Mozilla repo

Dependencies

If you want install over Flatpak

Version one:

cd /path/to/you/ansible/roles
git clone https://github.com/don-rumata/ansible-role-install-flatpak

Version two:

ansible-galaxy install don_rumata.ansible_role_install_flatpak

If you want install over Snap

Version one:

cd /path/to/you/ansible/roles
git clone https://github.com/don-rumata/ansible-role-install-snap

Version two:

ansible-galaxy install don_rumata.ansible_role_install_snap

If you want deploy to Windows 7

Download and install Windows Management Framework 5.1

HowTo

Quick config WinRM for Windows: https://ru.stackoverflow.com/a/949971/191416

Example Playbooks

Install latest stable Firefox on Windows or Linux over package manager of you distro:

install-firefox.yml:

- name: Install FireFox
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - ansible-role-install-firefox
  tasks:

install-firefox-over-flatpak-v1.yml:

- name: Install FireFox
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - ansible-role-install-flatpak
    - ansible-role-install-firefox
  vars:
    firefox_method_install: flatpak
  tasks:

install-firefox-over-snap-v2.yml:

- name: Install FireFox
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - don_rumata.ansible_role_install_snap
    - ansible-role-install-firefox
  vars:
    firefox_method_install: snap
  tasks:

License

Apache License, Version 2.0

Author Information

don Rumata

TODO

  • Add tests.

  • Add more tests.

  • Add ArchLinux firefox-i18n-{{ system_lang }}

  • Add custom languages.

  • Add get links over http-header

  • Add uninstall.yml

Thanks