From a841198654da1dcd62ebd24f4fc59d0db892b01b Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Sun, 20 Jan 2019 17:35:45 +0000 Subject: [PATCH] Fix requirements of Galaxy role inclusion when not required --- .ansible/linux_galaxy.yaml | 1 - .ansible/roles/desktop/meta/main.yaml | 3 --- .ansible/roles/desktop/tasks/software.yaml | 7 +++++++ bin/dotfiles-init | 4 +--- 4 files changed, 8 insertions(+), 7 deletions(-) delete mode 100644 .ansible/linux_galaxy.yaml delete mode 100644 .ansible/roles/desktop/meta/main.yaml diff --git a/.ansible/linux_galaxy.yaml b/.ansible/linux_galaxy.yaml deleted file mode 100644 index b7da449..0000000 --- a/.ansible/linux_galaxy.yaml +++ /dev/null @@ -1 +0,0 @@ -- src: jaredhocutt.gnome_extensions diff --git a/.ansible/roles/desktop/meta/main.yaml b/.ansible/roles/desktop/meta/main.yaml deleted file mode 100644 index a2dd7ca..0000000 --- a/.ansible/roles/desktop/meta/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - - role: jaredhocutt.gnome_extensions - when: ansible_system == 'Linux' diff --git a/.ansible/roles/desktop/tasks/software.yaml b/.ansible/roles/desktop/tasks/software.yaml index 97ba35f..20da86c 100644 --- a/.ansible/roles/desktop/tasks/software.yaml +++ b/.ansible/roles/desktop/tasks/software.yaml @@ -74,3 +74,10 @@ state: present loop: "{{ lookup('vars', lookup('vars', 'ansible_system_vendor') + '_' + lookup('vars', 'ansible_form_factor') + '_packages') }}" become: true + +- name: Galaxy role to install Gnome extensions + command: ansible-galaxy install jaredhocutt.gnome_extensions + +- name: Include jaredhocutt.gnome_extensions + include_role: + name: jaredhocutt.gnome_extensions diff --git a/bin/dotfiles-init b/bin/dotfiles-init index 72d0d62..b0a1000 100755 --- a/bin/dotfiles-init +++ b/bin/dotfiles-init @@ -20,9 +20,7 @@ if [ -x "$(which vim)" -a -e ~/.vim/bundle ]; then ~/bin/vim-upgrade fi -if [ -x "$(which ansible)" -a -f ~/.ansible/${OS}_galaxy.yaml ]; then - echo "[ANSIBLE] Detected: initialising Galaxy dependencies" - ansible-galaxy install -r ~/.ansible/${OS}_galaxy.yaml +if [ -x "$(which ansible)" ]; then echo "[ANSIBLE] Running desktop installation and configuration" ansible-playbook ~/.ansible/desktop.yaml -K fi