From f8fb630c423cdbb229787d637436f8f220e5b2c0 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Sun, 13 Jan 2019 16:52:41 +0000 Subject: [PATCH] Conditionally decide on how to operate on 'Desktop' for Ansible --- .ansible/desktop.yaml | 10 ++++++++++ .ansible/inventory.yaml | 7 +------ .ansible/linux_desktop.yaml | 7 ------- .ansible/mac_desktop.yaml | 4 ---- .ansible/roles/linux_desktop/vars/main.yaml | 2 +- 5 files changed, 12 insertions(+), 18 deletions(-) create mode 100644 .ansible/desktop.yaml delete mode 100644 .ansible/linux_desktop.yaml delete mode 100644 .ansible/mac_desktop.yaml diff --git a/.ansible/desktop.yaml b/.ansible/desktop.yaml new file mode 100644 index 0000000..dac80e7 --- /dev/null +++ b/.ansible/desktop.yaml @@ -0,0 +1,10 @@ +- name: Desktop installation and configuration + hosts: desktop + + roles: + - role: linux_desktop + when: ansible_system == 'Linux' + - role: jaredhocutt.gnome_extensions + when: ansible_system == 'Linux' + - role: mac_desktop + when: ansible_system == 'Darwin' diff --git a/.ansible/inventory.yaml b/.ansible/inventory.yaml index c9780e0..4e43693 100644 --- a/.ansible/inventory.yaml +++ b/.ansible/inventory.yaml @@ -1,9 +1,4 @@ -mac_desktops: - hosts: - localhost: - ansible_connection: local - -linux_desktops: +desktop: hosts: localhost: ansible_connection: local diff --git a/.ansible/linux_desktop.yaml b/.ansible/linux_desktop.yaml deleted file mode 100644 index 132806d..0000000 --- a/.ansible/linux_desktop.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- name: Linux desktops - hosts: linux_desktops - roles: - - linux_desktop - - jaredhocutt.gnome_extensions - vars: - gnome_extension_ids: "{{ gnome_extensions }}" diff --git a/.ansible/mac_desktop.yaml b/.ansible/mac_desktop.yaml deleted file mode 100644 index cbac088..0000000 --- a/.ansible/mac_desktop.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- name: Mac desktops - hosts: mac_desktops - roles: - - mac_desktop diff --git a/.ansible/roles/linux_desktop/vars/main.yaml b/.ansible/roles/linux_desktop/vars/main.yaml index b36f4ac..2d6ecf8 100644 --- a/.ansible/roles/linux_desktop/vars/main.yaml +++ b/.ansible/roles/linux_desktop/vars/main.yaml @@ -45,7 +45,7 @@ linux_apps: - skype - wireguard-ammp -gnome_extensions: +gnome_extension_ids: - 358 # activities configurator - 1206 # clock-override - 28 # gtile