From bbc35e65290d7716fa9cc501a13bc4a966962fbf Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Fri, 24 Nov 2017 18:42:08 +0000 Subject: [PATCH] Add tags to Ansible tasks. --- .ansible/roles/mac_desktop/tasks/homebrew.yaml | 12 ++++++++++++ .ansible/roles/mac_desktop/tasks/mas.yaml | 2 ++ .ansible/roles/mac_desktop/tasks/prefs.yaml | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/.ansible/roles/mac_desktop/tasks/homebrew.yaml b/.ansible/roles/mac_desktop/tasks/homebrew.yaml index bbf3d3b..47e9529 100644 --- a/.ansible/roles/mac_desktop/tasks/homebrew.yaml +++ b/.ansible/roles/mac_desktop/tasks/homebrew.yaml @@ -1,10 +1,14 @@ # Install Homebrew - name: Check for Homebrew + tags: + - install stat: path: /usr/local/bin/brew register: st - name: Install Homebrew + tags: + - install command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" when: st.stat.executable != True @@ -13,6 +17,8 @@ # Taps - name: Install Homebrew Taps + tags: + - install homebrew_tap: name: "{{ item }}" state: present @@ -20,12 +26,16 @@ # Update and upgrades - name: Homebrew update and upgrades + tags: + - install homebrew: update_homebrew: True upgrade_all: True # Brews - name: Install Homebrew Brews + tags: + - install homebrew: name: "{{ item }}" state: present @@ -33,6 +43,8 @@ # Casks - name: Install Homebrew Casks + tags: + - install homebrew_cask: name: "{{ item }}" state: present diff --git a/.ansible/roles/mac_desktop/tasks/mas.yaml b/.ansible/roles/mac_desktop/tasks/mas.yaml index f2aebfd..bf2248b 100644 --- a/.ansible/roles/mac_desktop/tasks/mas.yaml +++ b/.ansible/roles/mac_desktop/tasks/mas.yaml @@ -1,2 +1,4 @@ - name: Upgrade App Store apps + tags: + - upgrade command: mas upgrade diff --git a/.ansible/roles/mac_desktop/tasks/prefs.yaml b/.ansible/roles/mac_desktop/tasks/prefs.yaml index 67089ce..6f8e308 100644 --- a/.ansible/roles/mac_desktop/tasks/prefs.yaml +++ b/.ansible/roles/mac_desktop/tasks/prefs.yaml @@ -1,12 +1,18 @@ - name: 'Firefox: Set base path' + tags: + - config set_fact: firefox_path: '~/Library/Application Support/Firefox' - name: 'Firefox: Find profile path' + tags: + - config set_fact: profile_path: "{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}" - name: 'Firefox: Add local config' + tags: + - config copy: content: | user_pref("privacy.firstparty.isolate", true); @@ -34,4 +40,6 @@ mode: 0440 - name: 'OS X: Clear preferences cache' + tags: + - config command: pkill -u ${USER} cfprefsd