diff --git a/roles/browser/tasks/main.yaml b/roles/browser/tasks/main.yaml new file mode 100644 index 0000000..cb64c80 --- /dev/null +++ b/roles/browser/tasks/main.yaml @@ -0,0 +1,29 @@ +--- + +- name: "add the mozilla signing key" + apt_key: + url: "https://packages.mozilla.org/apt/repo-signing-key.gpg" + id: "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3" + keyring: "{{ mozilla_apt_keyring }}" + tags: + - "mozilla" + - "browser" + +- name: "add the mozilla apt repository" + apt_repository: + repo: "{{ item }}" + with_items: + - "deb [ signed-by={{ mozilla_apt_keyring }} ] https://packages.mozilla.org/apt mozilla main" + - "deb-src [ signed-by={{ mozilla_apt_keyring }} ] https://packages.mozilla.org/apt mozilla main" + tags: + - "mozilla" + - "browser" + +- name: "add browsers of choice" + apt: + pkg: + - "chromium" + - "firefox-devedition" + - "lynx" + tags: + - "browser" diff --git a/roles/browser/vars/main.yaml b/roles/browser/vars/main.yaml new file mode 100644 index 0000000..50845fe --- /dev/null +++ b/roles/browser/vars/main.yaml @@ -0,0 +1,3 @@ +--- + +mozilla_apt_keyring: "{{ apt_keyring_dir }}/mozilla-keyring.gpg" diff --git a/roles/firefox_de/tasks/main.yml b/roles/firefox_de/tasks/main.yml deleted file mode 100644 index 7d81011..0000000 --- a/roles/firefox_de/tasks/main.yml +++ /dev/null @@ -1,64 +0,0 @@ ---- -# File: roles/firefox_de/tasks/main.yml - -- name: "check to find whether Firefox DE is already installed" - command: "{{ executable_path }} --version" - register: firefox_version_result - failed_when: false - changed_when: false - tags: - - "firefox-de" - -- name: "get Firefox DE's redirect link (to parse version)" - uri: - url: "{{ latest_url }}" - method: GET - follow_redirects: none - status_code: 302 - register: latest_redirect_result - tags: - - "firefox-de" - -- name: "extract Firefox DE's version number" - set_fact: - latest_version: "{{ latest_redirect_result.location | regex_replace('^.*/releases/', '') | regex_replace('/linux.*$', '') }}" - tags: - - "firefox-de" - -- name: "download and unarchive Firefox DE" - unarchive: - src: "{{ download_url }}" - remote_src: "yes" - dest: "{{ destination_directory }}" - when: firefox_version_result.rc > 0 - tags: - - "firefox-de" - -- name: "move unarchive directory to final location" - command: "mv {{ destination_directory }}/{{ archive_path }} {{ destination_directory }}/{{ local_path }}" - when: firefox_version_result.rc > 0 - tags: - - "firefox-de" - -- name: "create a symlink to the executable" - file: - src: "{{ executable_path }}" - dest: "{{ destination_directory }}/{{ executable_name }}" - state: "link" - tags: - - "firefox-de" - -- name: "copy Firefox DE's icon in user-space" - copy: - src: "{{ icon_path }}" - dest: "~/.local/share/icons/firefox.png" - remote_src: yes - tags: - - "firefox-de" - -- name: "add the Firefox DE desktop file" - template: - src: ../templates/firefox-de.desktop - dest: ~/.local/share/applications - tags: - - "firefox-de" diff --git a/roles/firefox_de/templates/firefox-de.desktop b/roles/firefox_de/templates/firefox-de.desktop deleted file mode 100644 index 148cbf3..0000000 --- a/roles/firefox_de/templates/firefox-de.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Encoding=UTF-8 -Exec=firefox -P dev-edition-default -Icon=firefox -StartupNotify=false -Categories=Development;GNOME;GTK;Network;WebBrowser; -Name=Firefox Developer Edition - {{ latest_version }} -Comment=Debug, Profile, Optimize and Repair the World Wide Web -Terminal=false diff --git a/roles/firefox_de/vars/main.yml b/roles/firefox_de/vars/main.yml deleted file mode 100644 index 1af7c68..0000000 --- a/roles/firefox_de/vars/main.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# File: roles/firefox_de/vars/main.yml - -# This URL: -# https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US -# redirects to something like this (with a different version) -# https://download-installer.cdn.mozilla.net/pub/devedition/releases/128.0b9/linux-x86_64/en-US/firefox-128.0b9.tar.bz2 - -latest_url: "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US" - -host: "https://download-installer.cdn.mozilla.net" -path: "pub/devedition/releases/{{ latest_version }}/linux-x86_64/en-US" -file: firefox-{{ latest_version }}.tar.bz2 - -download_url: "{{ host }}/{{ path }}/{{ file }}" - -destination_directory: "~/bin" -archive_path: "firefox" -local_path: "firefox-de" -executable_name: "firefox" - -executable_path: "{{ destination_directory }}/{{ local_path }}/{{ executable_name }}" -icon_path: "{{ destination_directory }}/{{ local_path }}/browser/chrome/icons/default/default48.png" diff --git a/workstation.sh b/workstation.sh index e592525..fe1cc35 100755 --- a/workstation.sh +++ b/workstation.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash export ANSIBLE_NOCOWS=1 ansible-playbook -K -i localhost, -e GITHUB_API_TOKEN=$GITHUB_API_TOKEN workstation.yml $* diff --git a/workstation.yml b/workstation.yml index 4997e32..4a4d695 100644 --- a/workstation.yml +++ b/workstation.yml @@ -14,16 +14,17 @@ when: ansible_architecture == "i386" become: yes vars_files: + - config.yaml - versions.yml roles: - # - common - # - communication - # - development + - "common" + - "browser" + - "communication" + - "development" # - containerization # - networking - - iac - # - java - # - jmeter + # - java ***** ASDF by project ***** + # - jmeter ***** ASDF by project ***** # - zaproxy # - burp_suite # - sqlmap @@ -38,31 +39,30 @@ # - micro # - pencil # - postman - - ratpoison + - "ratpoison" # - cloud # - visual_studio # - security -- hosts: localhost - connection: local - pre_tasks: - - name: Fail if Ansible version is too old - fail: - msg: "Workstation requires a minimum Ansible version of {{ ansible_minimum_version }}. Please update Ansible and run workstation.sh again." - when: ansible_version.full is version(ansible_minimum_version, operator='lt', strict=True) - - name: abort execution on 32-bit environments - fail: - msg: "These playbooks are now only available on 64-bit OSes" - when: ansible_architecture == "i386" - vars_files: - - local.yaml - - versions.yml - roles: - - local - - asdf - - firefox_de +# - hosts: localhost +# connection: local +# pre_tasks: +# - name: Fail if Ansible version is too old +# fail: +# msg: "Workstation requires a minimum Ansible version of {{ ansible_minimum_version }}. Please update Ansible and run workstation.sh again." +# when: ansible_version.full is version(ansible_minimum_version, operator='lt', strict=True) +# - name: abort execution on 32-bit environments +# fail: +# msg: "These playbooks are now only available on 64-bit OSes" +# when: ansible_architecture == "i386" +# vars_files: +# - local.yaml +# - versions.yml +# roles: + # - local + # - asdf # - go - - codium + # - codium # - krew - - kubenav + # - kubenav # - freemind