Fix requirements of Galaxy role inclusion when not required

This commit is contained in:
Scott Wallace 2019-01-20 17:35:45 +00:00
parent 47522e8382
commit a841198654
4 changed files with 8 additions and 7 deletions

View file

@ -1 +0,0 @@
- src: jaredhocutt.gnome_extensions

View file

@ -1,3 +0,0 @@
dependencies:
- role: jaredhocutt.gnome_extensions
when: ansible_system == 'Linux'

View file

@ -74,3 +74,10 @@
state: present state: present
loop: "{{ lookup('vars', lookup('vars', 'ansible_system_vendor') + '_' + lookup('vars', 'ansible_form_factor') + '_packages') }}" loop: "{{ lookup('vars', lookup('vars', 'ansible_system_vendor') + '_' + lookup('vars', 'ansible_form_factor') + '_packages') }}"
become: true 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

View file

@ -20,9 +20,7 @@ if [ -x "$(which vim)" -a -e ~/.vim/bundle ]; then
~/bin/vim-upgrade ~/bin/vim-upgrade
fi fi
if [ -x "$(which ansible)" -a -f ~/.ansible/${OS}_galaxy.yaml ]; then if [ -x "$(which ansible)" ]; then
echo "[ANSIBLE] Detected: initialising Galaxy dependencies"
ansible-galaxy install -r ~/.ansible/${OS}_galaxy.yaml
echo "[ANSIBLE] Running desktop installation and configuration" echo "[ANSIBLE] Running desktop installation and configuration"
ansible-playbook ~/.ansible/desktop.yaml -K ansible-playbook ~/.ansible/desktop.yaml -K
fi fi