diff --git a/roles/apt-meta/tasks/main.yml b/roles/apt-meta/tasks/main.yml index 6b17162..b3eeb9a 100644 --- a/roles/apt-meta/tasks/main.yml +++ b/roles/apt-meta/tasks/main.yml @@ -1,24 +1,25 @@ --- -- name: ensure apt cache is up to date - apt: - force_apt_get: yes - update_cache: yes - cache_valid_time: 3600 - become: yes - changed_when: False - check_mode: False +#- name: ensure apt cache is up to date +# apt: +# force_apt_get: yes +# update_cache: yes +# cache_valid_time: 3600 +# become: yes +# changed_when: False +# check_mode: False - name: ensure apt packages are managed apt: state: "{{ apt_state }}" - name: "{{ item }}" + name: "{{ packages }}" autoclean: yes autoremove: yes force_apt_get: yes update_cache: yes cache_valid_time: 3600 install_recommends: no + vars: + packages: "{{ apt_packages }}" become: yes - with_items: "{{ apt_packages }}" #notify: clean apt diff --git a/roles/apt-repo-meta/tasks/main.yml b/roles/apt-repo-meta/tasks/main.yml index 27cf359..f912102 100644 --- a/roles/apt-repo-meta/tasks/main.yml +++ b/roles/apt-repo-meta/tasks/main.yml @@ -3,11 +3,10 @@ - name: ensure required packages are installed apt: state: latest - name: "{{ item }}" + name: "{{ apt_repo_packages }}" update_cache: yes install_recommends: no become: yes - with_items: "{{ apt_repo_packages }}" - name: ensure default sources.list is removed file: diff --git a/roles/autorunner/tasks/install.yml b/roles/autorunner/tasks/install.yml index fc6806b..66ce9f1 100644 --- a/roles/autorunner/tasks/install.yml +++ b/roles/autorunner/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ autorunner_shared_packages }}" + apt_packages: "{{ autorunner_shared_packages }}" - name: ensure autorunner is downloaded get_url: diff --git a/roles/chromium/tasks/install.yml b/roles/chromium/tasks/install.yml index c189b3d..825b02d 100644 --- a/roles/chromium/tasks/install.yml +++ b/roles/chromium/tasks/install.yml @@ -4,9 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ chromium_package_name }}" - - "{{ chromium_shared_packages }}" + apt_packages: "{{ [chromium_package_name] + chromium_shared_packages }}" - name: ensure chromium extension directory exists file: diff --git a/roles/chromium/tasks/uninstall.yml b/roles/chromium/tasks/uninstall.yml index d14e4dc..385fcc0 100644 --- a/roles/chromium/tasks/uninstall.yml +++ b/roles/chromium/tasks/uninstall.yml @@ -5,5 +5,4 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ chromium_package_name }}" + apt_packages: "{{ chromium_package_name }}" diff --git a/roles/clipmenu/tasks/install.yml b/roles/clipmenu/tasks/install.yml index 0493eb7..8fcfce3 100644 --- a/roles/clipmenu/tasks/install.yml +++ b/roles/clipmenu/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ clipmenu_shared_packages }}" + apt_packages: "{{ clipmenu_shared_packages }}" - name: ensure clipmenu is downloaded get_url: diff --git a/roles/dbeaver/tasks/install.yml b/roles/dbeaver/tasks/install.yml index 0326490..8e5e2ad 100644 --- a/roles/dbeaver/tasks/install.yml +++ b/roles/dbeaver/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ dbeaver_shared_packages }}" + apt_packages: "{{ dbeaver_shared_packages }}" - name: ensure dbeaver deb path exists file: diff --git a/roles/dbeaver/tasks/uninstall.yml b/roles/dbeaver/tasks/uninstall.yml index 9c5219a..f174d3c 100644 --- a/roles/dbeaver/tasks/uninstall.yml +++ b/roles/dbeaver/tasks/uninstall.yml @@ -5,8 +5,7 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ dbeaver_package_name }}" + apt_packages: "{{ dbeaver_package_name }}" - name: ensure dbeaver deb directory is removed file: diff --git a/roles/docker-compose/tasks/install.yml b/roles/docker-compose/tasks/install.yml index 3c92966..bddbefd 100644 --- a/roles/docker-compose/tasks/install.yml +++ b/roles/docker-compose/tasks/install.yml @@ -1,26 +1,32 @@ --- -- name: fetch docker compose info - uri: - url: https://api.github.com/repos/docker/compose/releases/latest - method: GET - register: docker_json - check_mode: no +- name: ensure docker-compose is installed + include_role: + name: apt-meta + vars: + apt_packages: "{{ [docker_compose_package_name] }}" -- name: set latest docker compose version - set_fact: - docker_compose_version: "{{ docker_json.json.name }}" - check_mode: no - -- name: ensure docker compose is downloaded - get_url: - url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64" - dest: "{{ docker_compose_path }}" - mode: 0755 - force: yes - timeout: 30 - register: task_result - until: task_result | succeeded - retries: 10 - delay: 5 - become: yes +#- name: fetch docker compose info +# uri: +# url: https://api.github.com/repos/docker/compose/releases/latest +# method: GET +# register: docker_json +# check_mode: no +# +#- name: set latest docker compose version +# set_fact: +# docker_compose_version: "{{ docker_json.json.name }}" +# check_mode: no +# +#- name: ensure docker compose is downloaded +# get_url: +# url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64" +# dest: "{{ docker_compose_path }}" +# mode: 0755 +# force: yes +# timeout: 30 +# register: task_result +# until: task_result is succeeded +# retries: 10 +# delay: 5 +# become: yes diff --git a/roles/docker-compose/tasks/uninstall.yml b/roles/docker-compose/tasks/uninstall.yml index cd9161d..48a346b 100644 --- a/roles/docker-compose/tasks/uninstall.yml +++ b/roles/docker-compose/tasks/uninstall.yml @@ -1,7 +1,14 @@ --- -- name: ensure docker compose is removed - file: - state: absent - path: "{{ docker_compose_path }}" - become: yes +- name: ensure docker-compose is removed + include_role: + name: apt-meta + vars: + apt_state: absent + apt_packages: "{{ docker_compose_package_name }}" + +#- name: ensure docker compose is removed +# file: +# state: absent +# path: "{{ docker_compose_path }}" +# become: yes diff --git a/roles/docker-compose/vars/main.yml b/roles/docker-compose/vars/main.yml index ef802e4..6ce7834 100644 --- a/roles/docker-compose/vars/main.yml +++ b/roles/docker-compose/vars/main.yml @@ -1,3 +1,3 @@ --- -docker_compose_path: /usr/local/bin/docker-compose +docker_compose_package_name: docker-compose diff --git a/roles/docker/tasks/install.yml b/roles/docker/tasks/install.yml index 6770ba3..33a6e4e 100644 --- a/roles/docker/tasks/install.yml +++ b/roles/docker/tasks/install.yml @@ -13,8 +13,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ docker_package_name }}" + apt_packages: "{{ [docker_package_name] }}" - name: set username command: whoami diff --git a/roles/docker/tasks/uninstall.yml b/roles/docker/tasks/uninstall.yml index 137b1ed..0da5162 100644 --- a/roles/docker/tasks/uninstall.yml +++ b/roles/docker/tasks/uninstall.yml @@ -5,8 +5,7 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ docker_package_name }}" + apt_packages: "{{ [docker_package_name] }}" - name: ensure docker repo is removed include_role: diff --git a/roles/ffscreencast/tasks/install.yml b/roles/ffscreencast/tasks/install.yml index cd4b6b8..09f6284 100644 --- a/roles/ffscreencast/tasks/install.yml +++ b/roles/ffscreencast/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ ffscreencast_shared_packages }}" + apt_packages: "{{ ffscreencast_shared_packages }}" - name: ensure ffscreencast is downloaded get_url: diff --git a/roles/fzf/tasks/install.yml b/roles/fzf/tasks/install.yml index a56bfd1..605a817 100644 --- a/roles/fzf/tasks/install.yml +++ b/roles/fzf/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ fzf_shared_packages }}" + apt_packages: "{{ fzf_shared_packages }}" - name: ensure ./local/share directory exists file: diff --git a/roles/gimp/tasks/install.yml b/roles/gimp/tasks/install.yml index b10e4d1..f21783c 100644 --- a/roles/gimp/tasks/install.yml +++ b/roles/gimp/tasks/install.yml @@ -11,9 +11,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ gimp_package_name }}" - - "{{ gimp_required_packages }}" + apt_packages: "{{ [gimp_package_name] + gimp_required_packages }}" - name: ensure gimp configuration directories exist file: diff --git a/roles/gimp/tasks/uninstall.yml b/roles/gimp/tasks/uninstall.yml index 094bcdc..1344e0c 100644 --- a/roles/gimp/tasks/uninstall.yml +++ b/roles/gimp/tasks/uninstall.yml @@ -5,9 +5,7 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ gimp_package_name }}" - - "{{ gimp_required_packages }}" + apt_packages: "{{ [gimp_package_name] + gimp_required_packages }}" - name: ensure gimp configuration directory is removed file: diff --git a/roles/hipchat/tasks/install.yml b/roles/hipchat/tasks/install.yml index 775e952..f2816f3 100644 --- a/roles/hipchat/tasks/install.yml +++ b/roles/hipchat/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ hipchat_shared_packages }}" + apt_packages: "{{ hipchat_shared_packages }}" - name: ensure hipchat repo is present include_role: diff --git a/roles/i3-gaps/tasks/install.yml b/roles/i3-gaps/tasks/install.yml index 16c1e59..a8d24e8 100644 --- a/roles/i3-gaps/tasks/install.yml +++ b/roles/i3-gaps/tasks/install.yml @@ -4,9 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ i3_gaps_shared_packages }}" - - "{{ i3_gaps_build_dependencies }}" + apt_packages: "{{ i3_gaps_shared_packages + i3_gaps_build_dependencies }}" - name: ensure git parent path exists file: diff --git a/roles/i3-utils-bin/tasks/install.yml b/roles/i3-utils-bin/tasks/install.yml index cd2462a..c5170e9 100644 --- a/roles/i3-utils-bin/tasks/install.yml +++ b/roles/i3-utils-bin/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ i3_utils_bin_shared_packages }}" + apt_packages: "{{ i3_utils_bin_shared_packages }}" - name: ensure i3-utils-bin tools are downloaded get_url: diff --git a/roles/i3-utils-systemd/tasks/install.yml b/roles/i3-utils-systemd/tasks/install.yml index 89f408e..99afb8b 100644 --- a/roles/i3-utils-systemd/tasks/install.yml +++ b/roles/i3-utils-systemd/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ i3_utils_systemd_shared_packages }}" + apt_packages: "{{ i3_utils_systemd_shared_packages }}" - name: ensure xlock is downloaded get_url: diff --git a/roles/i3blocks-modules/tasks/install.yml b/roles/i3blocks-modules/tasks/install.yml index 57d8cbd..b7634c4 100644 --- a/roles/i3blocks-modules/tasks/install.yml +++ b/roles/i3blocks-modules/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ i3blocks_modules_shared_packages }}" + apt_packages: "{{ i3blocks_modules_shared_packages }}" - name: ensure ./local/share directory exists file: diff --git a/roles/libreoffice/defaults/main.yml b/roles/libreoffice/defaults/main.yml index e37d936..80e9325 100644 --- a/roles/libreoffice/defaults/main.yml +++ b/roles/libreoffice/defaults/main.yml @@ -2,5 +2,3 @@ # 'install', 'remove' or 'ignore' libreoffice: 'ignore' - -libreoffice_dpi: 96 diff --git a/roles/libreoffice/tasks/install.yml b/roles/libreoffice/tasks/install.yml index a5c0158..c7902b7 100644 --- a/roles/libreoffice/tasks/install.yml +++ b/roles/libreoffice/tasks/install.yml @@ -1,84 +1,10 @@ --- -- name: check if libreoffice is already installed - command: "dpkg-query -W {{ libreoffice_package_name }}" - register: libreoffice_installed - check_mode: no - failed_when: libreoffice_installed.rc > 1 - changed_when: libreoffice_installed.rc == 1 - -- name: create temporary download directory - tempfile: - state: directory - suffix: build - register: libreoffice_tmp_dir - when: libreoffice_installed.rc == 1 - -- name: fetch libreoffice download page - uri: - url: "{{ libreoffice_download_url }}" - method: GET - follow_redirects: yes - return_content: yes - register: libreoffice_download_page_raw - check_mode: no - when: libreoffice_installed.rc == 1 - -- name: extract libreoffice mirror url - set_fact: - libreoffice_mirror_url: "{{ libreoffice_download_page_raw.content | regex_search(qry) }}" - vars: - qry: 'https://www.libreoffice.org/donate/dl/deb-x86_64/[.0-9]+/en-US/LibreOffice_[.0-9]+_Linux_x86-64_deb.tar.gz' - check_mode: no - when: libreoffice_installed.rc == 1 - -- name: fetch libreoffice mirror page - uri: - url: "{{ libreoffice_mirror_url }}" - method: GET - follow_redirects: yes - return_content: yes - register: libreoffice_mirror_page_raw - check_mode: no - when: libreoffice_installed.rc == 1 - -- name: extract libreoffice real download link - set_fact: - libreoffice_download_link_base: "{{ libreoffice_mirror_page_raw.content | regex_search(qry) }}" +- name: ensure libreoffice is installed + include_role: + name: apt-meta vars: - qry: 'download.documentfoundation.org/libreoffice/.*/[.0-9]+/deb/x86_64/LibreOffice_[.0-9]+_Linux_x86-64_deb.tar.gz' - check_mode: no - when: libreoffice_installed.rc == 1 - -- name: ensure libreoffice is downloaded - unarchive: - src: "https://{{ libreoffice_download_link_base }}" - dest: "{{ libreoffice_tmp_dir.path }}" - remote_src: yes - when: libreoffice_installed.rc == 1 - -- name: find libreoffice deb files - find: - path: "{{ libreoffice_tmp_dir.path }}" - pattern: '.*lib.*\_amd64\.deb$' - file_type: file - use_regex: yes - recurse: yes - register: libreoffice_deb - when: libreoffice_installed.rc == 1 - -- name: ensure libreoffice deb files are installed - shell: "dpkg -i {% for item in libreoffice_deb['files'] %}{{ item['path'] }} {% endfor %}" - args: - executable: /bin/bash - become: yes - when: libreoffice_installed.rc == 1 - -- name: ensure libreoffice tmp directory is removed - file: - path: "{{ libreoffice_tmp_dir.path }}" - state: absent - when: libreoffice_installed.rc == 1 + apt_packages: "{{ [libreoffice_package_name] }}" ### @@ -98,32 +24,9 @@ path: "{{ libreoffice_config_path }}" state: directory mode: 0700 - when: libreoffice_installed.rc == 1 - name: ensure libreoffice base config is copied once copy: src: "files/registrymodifications.xcu" dest: "{{ libreoffice_config_path }}/registrymodifications.xcu" mode: 0600 - when: libreoffice_installed.rc == 1 - - -### -### HDPI Wrapper -### - -- name: ensure dpi wrapper requirements are installed - include_role: - name: apt-meta - vars: - apt_packages: - - "{{ libreoffice_shared_packages }}" - -- name: ensure libreoffice wrapper is present - template: - src: templates/libreoffice6.0.j2 - dest: "{{ libreoffice_wrapper_path }}" - owner: root - group: root - mode: 0755 - become: yes diff --git a/roles/libreoffice/tasks/uninstall.yml b/roles/libreoffice/tasks/uninstall.yml index d957f69..e0491f5 100644 --- a/roles/libreoffice/tasks/uninstall.yml +++ b/roles/libreoffice/tasks/uninstall.yml @@ -1,20 +1,11 @@ --- -- name: check if libreoffice is still installed - command: "dpkg-query -W {{ libreoffice_package_name }}" - register: libreoffice_installed - check_mode: no - failed_when: libreoffice_installed.rc > 1 - changed_when: libreoffice_installed.rc == 0 - -- name: ensure libreoffice is uninstalled +- name: ensure libreoffice is removed include_role: name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ libreoffice_package_name }}*" - when: libreoffice_installed.rc == 0 + apt_packages: "{{ libreoffice_package_name }}" - name: ensure libreoffice config directory is removed file: diff --git a/roles/libreoffice/templates/libreoffice6.0.j2 b/roles/libreoffice/templates/libreoffice6.0.j2 deleted file mode 100755 index ebb688f..0000000 --- a/roles/libreoffice/templates/libreoffice6.0.j2 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "Xft.dpi:{{ libreoffice_dpi }}" | xrdb -merge -exec {{ libreoffice_bin_path }} "$@" diff --git a/roles/libreoffice/vars/main.yml b/roles/libreoffice/vars/main.yml index 298d886..8cf223c 100644 --- a/roles/libreoffice/vars/main.yml +++ b/roles/libreoffice/vars/main.yml @@ -1,19 +1,9 @@ --- -libreoffice_package_name: libreoffice6.0 - -# Required for DPI wrapper -libreoffice_shared_packages: - - x11-xserver-utils - -libreoffice_download_url: https://www.libreoffice.org/download/download/?type=deb-x86_64&version=6.0.0&lang=en-US +libreoffice_package_name: libreoffice libreoffice_icon_name: images_office2013.zip -libreoffice_icon_path: /opt/libreoffice6.0/share/config +libreoffice_icon_path: /usr/share/libreoffice/share/config libreoffice_base_config: "{{ lookup('env','HOME') }}/.config/libreoffice" libreoffice_config_path: "{{ libreoffice_base_config }}/4/user" - -# Vars for wrapper -libreoffice_wrapper_path: /usr/bin/libreoffice6.0 -libreoffice_bin_path: /opt/libreoffice6.0/program/soffice diff --git a/roles/lxdm/tasks/install.yml b/roles/lxdm/tasks/install.yml index 26bcf26..8e2398a 100644 --- a/roles/lxdm/tasks/install.yml +++ b/roles/lxdm/tasks/install.yml @@ -4,9 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - lxdm - - "{{ lxdm_shared_packages }}" + apt_packages: "{{ ['lxdm'] + lxdm_shared_packages }}" - name: ensure lxdm.conf is present template: diff --git a/roles/neovim/tasks/install.yml b/roles/neovim/tasks/install.yml index 49959a6..a5d7038 100644 --- a/roles/neovim/tasks/install.yml +++ b/roles/neovim/tasks/install.yml @@ -4,14 +4,11 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ neovim_package_name }}" - - "{{ neovim_shared_packages }}" - - "{{ neovim_exclusive_packages }}" + apt_packages: "{{ [neovim_package_name] + neovim_shared_packages + neovim_exclusive_packages }}" - name: ensure neovim python packages are installed include_role: name: python-meta vars: - pip2_packages: "{{ neovim_pip2_packages }}" - pip3_packages: "{{ neovim_pip3_packages }}" + python_2_apt_packages: "{{ neovim_python2_packages }}" + python_3_apt_packages: "{{ neovim_python3_packages }}" diff --git a/roles/neovim/tasks/uninstall.yml b/roles/neovim/tasks/uninstall.yml index 9ca7b13..e52977f 100644 --- a/roles/neovim/tasks/uninstall.yml +++ b/roles/neovim/tasks/uninstall.yml @@ -5,6 +5,4 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ neovim_package_name }}" - - "{{ neovim_exclusive_packages }}" + apt_packages: "{{ [neovim_package_name] + neovim_exclusive_packages }}" diff --git a/roles/neovim/vars/main.yml b/roles/neovim/vars/main.yml index 79743f4..46df701 100644 --- a/roles/neovim/vars/main.yml +++ b/roles/neovim/vars/main.yml @@ -11,8 +11,8 @@ neovim_shared_packages: neovim_exclusive_packages: - lua-nvim -neovim_pip2_packages: - - neovim +neovim_python2_packages: + - python-neovim -neovim_pip3_packages: - - neovim +neovim_python3_packages: + - python3-neovim diff --git a/roles/network-manager/tasks/install.yml b/roles/network-manager/tasks/install.yml index 23bae6f..7515490 100644 --- a/roles/network-manager/tasks/install.yml +++ b/roles/network-manager/tasks/install.yml @@ -7,9 +7,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ network_manager_package_name }}" - - "{{ network_manager_shared_packages }}" + apt_packages: "{{ [network_manager_package_name] + network_manager_shared_packages }}" ### @@ -32,9 +30,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ network_manager_gnome_package }}" - - "{{ network_manager_shared_gnome_packages }}" + apt_packages: "{{ [network_manager_gnome_package] + network_manager_shared_gnome_packages }}" when: network_manager_nm_applet diff --git a/roles/oh-my-zsh/tasks/install.yml b/roles/oh-my-zsh/tasks/install.yml index 34a7c4c..562ca9a 100644 --- a/roles/oh-my-zsh/tasks/install.yml +++ b/roles/oh-my-zsh/tasks/install.yml @@ -1,10 +1,10 @@ --- + - name: ensure requirements are installed include_role: name: apt-meta vars: - apt_packages: - - "{{ oh_my_zsh_shared_packages }}" + apt_packages: "{{ oh_my_zsh_shared_packages }}" - name: Clone oh-my-zsh repo git: repo=https://github.com/robbyrussell/oh-my-zsh.git dest=/root/.oh-my-zsh diff --git a/roles/oh-my-zsh/tasks/uninstall.yml b/roles/oh-my-zsh/tasks/uninstall.yml index b661553..6de79d2 100644 --- a/roles/oh-my-zsh/tasks/uninstall.yml +++ b/roles/oh-my-zsh/tasks/uninstall.yml @@ -1,4 +1,5 @@ --- + - name: reset bash as default shell user: name=root shell=/bin/bash become: yes @@ -8,8 +9,7 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ oh_my_zsh_shared_packages }}" + apt_packages: "{{ oh_my_zsh_shared_packages }}" - name: remove zshrc and oh-my-zsh base path file: path=/root/.oh-my-zsh state=absent diff --git a/roles/packer/tasks/install.yml b/roles/packer/tasks/install.yml index bde758a..6d7ef05 100644 --- a/roles/packer/tasks/install.yml +++ b/roles/packer/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ packer_shared_packages }}" + apt_packages: "{{ packer_shared_packages }}" - name: fetch packer info uri: @@ -33,3 +32,14 @@ remote_src: yes mode: 0755 become: yes + + +### +### Add bash completion +### +- name: ensure packer bash completion is available + template: + src: bash-completion.j2 + dest: "{{ packer_bash_completion_path }}/packer" + mode: 0644 + become: yes diff --git a/roles/packer/tasks/uninstall.yml b/roles/packer/tasks/uninstall.yml index 1e9001f..bf7c758 100644 --- a/roles/packer/tasks/uninstall.yml +++ b/roles/packer/tasks/uninstall.yml @@ -3,5 +3,8 @@ - name: ensure packer is removed file: state: absent - path: "{{ packer_path }}/packer " + path: "{{ item }}" + with_items: + - "{{ packer_path }}/packer" + - "{{ packer_bash_completion_path }}/packer" become: yes diff --git a/roles/packer/templates/bash-completion.j2 b/roles/packer/templates/bash-completion.j2 new file mode 100644 index 0000000..57039df --- /dev/null +++ b/roles/packer/templates/bash-completion.j2 @@ -0,0 +1 @@ +complete -C {{ packer_path }}/packer packer diff --git a/roles/packer/vars/main.yml b/roles/packer/vars/main.yml index 6bb5b90..314cc48 100644 --- a/roles/packer/vars/main.yml +++ b/roles/packer/vars/main.yml @@ -2,5 +2,8 @@ packer_path: /usr/local/bin +packer_bash_completion_path: /usr/share/bash-completion/completions + packer_shared_packages: + - bash-completion - unzip diff --git a/roles/pinta/tasks/install.yml b/roles/pinta/tasks/install.yml index 6629e63..643b535 100644 --- a/roles/pinta/tasks/install.yml +++ b/roles/pinta/tasks/install.yml @@ -38,8 +38,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ pinta_package_name }}" + apt_packages: "{{ pinta_package_name }}" when: pinta_repo_avail.rc == 1 - name: ensure debian stretch repo is absent diff --git a/roles/pinta/tasks/uninstall.yml b/roles/pinta/tasks/uninstall.yml index 196eeba..66076a0 100644 --- a/roles/pinta/tasks/uninstall.yml +++ b/roles/pinta/tasks/uninstall.yml @@ -5,5 +5,4 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ pinta_package_name }}" + apt_packages: "{{ pinta_package_name }}" diff --git a/roles/python-meta/tasks/main.yml b/roles/python-meta/tasks/main.yml index 840bbfc..51b34b4 100644 --- a/roles/python-meta/tasks/main.yml +++ b/roles/python-meta/tasks/main.yml @@ -10,38 +10,28 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ python_2_required_apt_packages }}" - - "{{ python2_apt_packages }}" + apt_packages: "{{ python_2_required_apt_packages + python2_apt_packages }}" when: python_2 - name: ensure python3 packages are installed include_role: name: apt-meta vars: - apt_packages: - - "{{ python_3_required_apt_packages }}" - - "{{ python3_apt_packages }}" + apt_packages: "{{ python_3_required_apt_packages + python3_apt_packages }}" when: python_3 - name: ensure python2 pip packages are installed pip: state: latest - name: "{{ item }}" + name: "{{ python_2_required_pip_packages + pip2_packages }}" executable: pip2 become: yes when: python_2 - with_items: - - "{{ python_2_required_pip_packages }}" - - "{{ pip2_packages }}" - name: ensure python3 pip packages are installed pip: state: latest - name: "{{ item }}" + name: "{{ python_3_required_pip_packages + pip3_packages }}" executable: pip3 become: yes when: python_3 - with_items: - - "{{ python_3_required_pip_packages }}" - - "{{ pip3_packages }}" diff --git a/roles/ranger/tasks/install.yml b/roles/ranger/tasks/install.yml index 6a9502f..cf6b673 100644 --- a/roles/ranger/tasks/install.yml +++ b/roles/ranger/tasks/install.yml @@ -4,10 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ ranger_package_name }}" - - "{{ ranger_shared_packages }}" - - "{{ ranger_exclusive_packages }}" + apt_packages: "{{ [ranger_package_name] + ranger_shared_packages + ranger_exclusive_packages }}" - name: ensure ranger python packages are installed include_role: diff --git a/roles/ranger/tasks/uninstall.yml b/roles/ranger/tasks/uninstall.yml index defbfa6..13fbaaa 100644 --- a/roles/ranger/tasks/uninstall.yml +++ b/roles/ranger/tasks/uninstall.yml @@ -5,6 +5,4 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ ranger_package_name }}" - - "{{ ranger_exclusive_packages }}" + apt_packages: "{{ [ranger_package_name] + ranger_exclusive_packages }}" diff --git a/roles/sxiv/tasks/install.yml b/roles/sxiv/tasks/install.yml index 5253f47..e097b50 100644 --- a/roles/sxiv/tasks/install.yml +++ b/roles/sxiv/tasks/install.yml @@ -4,9 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ sxiv_package_name }}" - - "{{ sxiv_shared_packages }}" + apt_packages: "{{ [sxiv_package_name] + sxiv_shared_packages }}" - name: ensure sxiv wrapper is downloaded get_url: diff --git a/roles/sxiv/tasks/uninstall.yml b/roles/sxiv/tasks/uninstall.yml index 517bdbf..9290b67 100644 --- a/roles/sxiv/tasks/uninstall.yml +++ b/roles/sxiv/tasks/uninstall.yml @@ -5,8 +5,7 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ sxiv_package_name }}" + apt_packages: "{{ sxiv_package_name }}" - name: ensure sxiv wrapper is removed file: diff --git a/roles/telegram/tasks/install.yml b/roles/telegram/tasks/install.yml index d1a2b25..7e0d8d9 100644 --- a/roles/telegram/tasks/install.yml +++ b/roles/telegram/tasks/install.yml @@ -4,9 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - xz-utils - - "{{ telegram_shared_packages }}" + apt_packages: "{{ ['xz-utils'] + telegram_shared_packages }}" - name: ensure opt directory exists file: diff --git a/roles/thunar-custom-actions/tasks/install.yml b/roles/thunar-custom-actions/tasks/install.yml index ba88815..b47c87b 100644 --- a/roles/thunar-custom-actions/tasks/install.yml +++ b/roles/thunar-custom-actions/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ thunar_custom_actions_shared_packages }}" + apt_packages: "{{ thunar_custom_actions_shared_packages }}" - name: ensure thunar custom actions are downloaded get_url: diff --git a/roles/thunar/tasks/install.yml b/roles/thunar/tasks/install.yml index 9f9c14f..fc69b8e 100644 --- a/roles/thunar/tasks/install.yml +++ b/roles/thunar/tasks/install.yml @@ -11,16 +11,12 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ thunar_volman_package_name }}" - - "{{ thunar_volman_shared_packages }}" - when: thunar_volman_enable == yes + apt_packages: "{{ [thunar_volman_package_name] + thunar_volman_shared_packages }}" + when: thunar_volman_enable == True - name: ensure thunar archive plugin is installed include_role: name: apt-meta vars: - apt_packages: - - "{{ thunar_archive_plugin_package_name }}" - - "{{ thunar_archive_plugin_shared_packages }}" - when: thunar_archive_plugin_enable == yes + apt_packages: "{{ [thunar_archive_plugin_package_name] + thunar_archive_plugin_shared_packages }}" + when: thunar_archive_plugin_enable == True diff --git a/roles/thunar/vars/main.yml b/roles/thunar/vars/main.yml index 8555fde..f9bef07 100644 --- a/roles/thunar/vars/main.yml +++ b/roles/thunar/vars/main.yml @@ -1,11 +1,9 @@ --- -thunar_package_name: - - thunar +thunar_package_name: thunar # Volman -thunar_volman_package_name: - - thunar-volman +thunar_volman_package_name: thunar-volman thunar_volman_shared_packages: - eject # ---- gvfs @@ -21,10 +19,10 @@ thunar_volman_shared_packages: # ---- Fuse - fuse - fuse2fs - - fuseext2 - - fusefat + #- fuseext2 # Does not seem to be available anymore + #- fusefat # Does not seem to be available anymore - fuseiso - - fuseiso9660 + #- fuseiso9660 # Does not seem to be available anymore - fusesmb # ---- Filesystem tools - btrfs-progs @@ -40,8 +38,7 @@ thunar_volman_shared_packages: - keyutils # Archiver Plugin -thunar_archive_plugin_package_name: - - thunar-archive-plugin +thunar_archive_plugin_package_name: thunar-archive-plugin thunar_archive_plugin_shared_packages: - xarchiver - bzip2 diff --git a/roles/thunderbird/tasks/fetch-xpi-uri-official.yml b/roles/thunderbird/tasks/fetch-xpi-uri-official.yml index 964ffbd..828d9c2 100644 --- a/roles/thunderbird/tasks/fetch-xpi-uri-official.yml +++ b/roles/thunderbird/tasks/fetch-xpi-uri-official.yml @@ -8,7 +8,7 @@ # 'thunderbird_ext_url': Extension url. # Example value: -# https://addons.mozilla.org/en-US/thunderbird/addon/x-unsent-support/ +# https://addons.thunderbird.net/en-US/thunderbird/addon/x-unsent-support/ # - name: fetch xpi download page @@ -24,7 +24,7 @@ set_fact: thunderbird_ext_xpi_url: "{{ thunderbird_ext_page_raw.content | regex_search(qry) }}" vars: - qry: 'https://addons.mozilla.org/thunderbird/downloads/file/[0-9]+/.*.xpi' + qry: 'https://addons\.(.+?)/thunderbird/downloads/file/[0-9]+/(.+?)\.xpi' check_mode: no - name: ensure thunderbird remote xpi is installed diff --git a/roles/thunderbird/tasks/install.yml b/roles/thunderbird/tasks/install.yml index 86c5967..b80e2b6 100644 --- a/roles/thunderbird/tasks/install.yml +++ b/roles/thunderbird/tasks/install.yml @@ -15,9 +15,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ thunderbird_package_name }}" - - "{{ thunderbird_shared_packages }}" + apt_packages: "{{ [thunderbird_package_name] + thunderbird_shared_packages }}" - name: ensure thunderbird extensions directory exist file: diff --git a/roles/timemachine/tasks/install.yml b/roles/timemachine/tasks/install.yml index f51c549..e859c47 100644 --- a/roles/timemachine/tasks/install.yml +++ b/roles/timemachine/tasks/install.yml @@ -4,8 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ timemachine_shared_packages }}" + apt_packages: "{{ timemachine_shared_packages }}" - name: ensure linux timemachine is downloaded get_url: diff --git a/roles/urxvt/tasks/install.yml b/roles/urxvt/tasks/install.yml index d3675a6..2810064 100644 --- a/roles/urxvt/tasks/install.yml +++ b/roles/urxvt/tasks/install.yml @@ -4,9 +4,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ urxvt_package_name }}" - - "{{ urxvt_shared_packages }}" + apt_packages: "{{ [urxvt_package_name] + urxvt_shared_packages }}" - name: ensure urxvt extensions directory is present file: diff --git a/roles/virtualbox/defaults/main.yml b/roles/virtualbox/defaults/main.yml index 382956f..458c0fa 100644 --- a/roles/virtualbox/defaults/main.yml +++ b/roles/virtualbox/defaults/main.yml @@ -2,7 +2,3 @@ # 'install', 'remove' or 'ignore' virtualbox: 'ignore' - -# 'stretch', 'jessie', 'wheezy' -# see vars/main.yml: virtualbox_avail_repo_dists -virtualbox_repo_dist: stretch diff --git a/roles/virtualbox/tasks/install.yml b/roles/virtualbox/tasks/install.yml index 48320a6..70970df 100644 --- a/roles/virtualbox/tasks/install.yml +++ b/roles/virtualbox/tasks/install.yml @@ -1,21 +1,10 @@ --- -- name: ensure virtualbox repo is present - include_role: - name: apt-repo-meta - vars: - apt_repo_keys: - - "{{ virtualbox_apt_key }}" - apt_repo_repositories: - - "{{ virtualbox_apt_repo }}" - - name: ensure virtualbox is installed include_role: name: apt-meta vars: - apt_packages: - - "{{ virtualbox_package_name }}" - - "{{ virtualbox_shared_packages }}" + apt_packages: "{{ [virtualbox_package_name] + virtualbox_exclusive_packages + virtualbox_shared_packages }}" - name: set username command: whoami diff --git a/roles/virtualbox/tasks/main.yml b/roles/virtualbox/tasks/main.yml index f093bbc..a758cd4 100644 --- a/roles/virtualbox/tasks/main.yml +++ b/roles/virtualbox/tasks/main.yml @@ -1,11 +1,5 @@ --- -- name: assert that virtualbox repository distribution is set correctly - assert: - that: - - virtualbox_repo_dist in virtualbox_avail_repo_dists - msg: "virtualbox_repo_dist must be in {{ virtualbox_avail_repo_dists | join(',') }}" - - include_tasks: install.yml when: virtualbox == 'install' diff --git a/roles/virtualbox/tasks/uninstall.yml b/roles/virtualbox/tasks/uninstall.yml index f9b8d3f..087b3c9 100644 --- a/roles/virtualbox/tasks/uninstall.yml +++ b/roles/virtualbox/tasks/uninstall.yml @@ -5,15 +5,4 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ virtualbox_package_name }}" - -- name: ensure virtualbox repo is removed - include_role: - name: apt-repo-meta - vars: - apt_repo_state: absent - apt_repo_keys: - - "{{ virtualbox_apt_key }}" - apt_repo_repositories: - - "{{ virtualbox_apt_repo }}" + apt_packages: "{{ [virtualbox_package_name] + virtualbox_exclusive_packages }}" diff --git a/roles/virtualbox/vars/main.yml b/roles/virtualbox/vars/main.yml index f324dc6..db0479c 100644 --- a/roles/virtualbox/vars/main.yml +++ b/roles/virtualbox/vars/main.yml @@ -1,21 +1,17 @@ --- -virtualbox_package_name: virtualbox-5.2 +virtualbox_package_name: virtualbox + +virtualbox_exclusive_packages: + - virtualbox-dkms + - virtualbox-ext-pack + - virtualbox-guest-additions-iso + - virtualbox-guest-dkms + - virtualbox-guest-utils + - virtualbox-guest-x11 + - virtualbox-qt virtualbox_shared_packages: - dkms - linux-headers-amd64 - -virtualbox_apt_repo: - file: virtualbox - repo: "deb http://download.virtualbox.org/virtualbox/debian {{ virtualbox_repo_dist }} contrib" - -# ID: curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --list-packets -virtualbox_apt_key: - url: https://www.virtualbox.org/download/oracle_vbox_2016.asc - id: A2F683C52980AECF - -virtualbox_avail_repo_dists: - - wheezy - - jessie - - stretch + - xmount diff --git a/roles/xorg/tasks/install.yml b/roles/xorg/tasks/install.yml index bc0771f..3d2c8af 100644 --- a/roles/xorg/tasks/install.yml +++ b/roles/xorg/tasks/install.yml @@ -7,10 +7,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ xorg_package_name }}" - - "{{ xorg_exclusive_packages }}" - - "{{ xorg_shared_packages }}" + apt_packages: "{{ [xorg_package_name] + xorg_exclusive_packages + xorg_shared_packages }}" - name: ensure xorg config dir exists file: @@ -36,11 +33,7 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ xorg_gpu_vaapi_packages }}" - - "{{ xorg_gpu_vdpau_packages }}" - - "{{ xorg_gpu_vulkan_packages }}" - - "{{ xorg_gpu_mesa_packages }}" + apt_packages: "{{ xorg_gpu_vaapi_packages + xorg_gpu_vdpau_packages + xorg_gpu_vulkan_packages + xorg_gpu_mesa_packages }}" - name: gather tentative gpu vaapi packages shell: "apt search {{ item }} 2>/dev/null | grep -o '^{{ item }}/' | awk -F '/' '{print $1}'" @@ -54,9 +47,8 @@ include_role: name: apt-meta vars: - apt_packages: - # Filters .stdout into list and removes any empty items (which are non-existing packages) - - "{{ reg_xorg_tentative_packages | json_query('results[*].stdout') | difference(['']) }}" + # Filters .stdout into list and removes any empty items (which are non-existing packages) + apt_packages: "{{ reg_xorg_tentative_packages | json_query('results[*].stdout') | difference(['']) }}" - name: ensure xorg gpu config is present template: diff --git a/roles/xorg/tasks/uninstall.yml b/roles/xorg/tasks/uninstall.yml index 3963084..90954b5 100644 --- a/roles/xorg/tasks/uninstall.yml +++ b/roles/xorg/tasks/uninstall.yml @@ -7,11 +7,17 @@ apt_state: absent apt_packages: - "{{ xorg_package_name }}" - - "{{ xorg_exclusive_packages }}" - - xserver-xorg-input-libinput - - xserver-xorg-input-synaptics + - "xserver-xorg-input-libinput" + - "xserver-xorg-input-synaptics" - "xserver-xorg-video-{{ xorg_gpu }}" +- name: ensure xorg and its components are removed + include_role: + name: apt-meta + vars: + apt_state: absent + apt_packages: "{{ xorg_exclusive_packages }}" + - name: ensure xorg configuration files are removed file: state: absent diff --git a/roles/xorg/templates/xorg.conf.d/40-touchpad.conf.j2 b/roles/xorg/templates/xorg.conf.d/40-touchpad.conf.j2 index 140c99d..3d26da3 100644 --- a/roles/xorg/templates/xorg.conf.d/40-touchpad.conf.j2 +++ b/roles/xorg/templates/xorg.conf.d/40-touchpad.conf.j2 @@ -24,7 +24,9 @@ Section "InputClass" Option "HorizEdgeScroll" "on" Option "CircularScrolling" "off" Option "CircScrollTrigger" "2" - + # Natural scrolling via inverted values + Option "VertScrollDelta" "-111" + Option "HorizScrollDelta" "-111" #Option "VertScrollDelta" "-75" #Option "HorizScrollDelta" "-75" diff --git a/roles/zathura/tasks/install.yml b/roles/zathura/tasks/install.yml index a232aed..6adcfd3 100644 --- a/roles/zathura/tasks/install.yml +++ b/roles/zathura/tasks/install.yml @@ -4,6 +4,4 @@ include_role: name: apt-meta vars: - apt_packages: - - "{{ zathura_package_name }}" - - "{{ zathura_exclusive_packages }}" + apt_packages: "{{ [zathura_package_name] + zathura_exclusive_packages }}" diff --git a/roles/zathura/tasks/uninstall.yml b/roles/zathura/tasks/uninstall.yml index df346f2..1e3324e 100644 --- a/roles/zathura/tasks/uninstall.yml +++ b/roles/zathura/tasks/uninstall.yml @@ -5,6 +5,4 @@ name: apt-meta vars: apt_state: absent - apt_packages: - - "{{ zathura_package_name }}" - - "{{ zathura_exclusive_packages }}" + apt_packages: "{{ [zathura_package_name] + zathura_exclusive_packages }}"