roles/devbox/tasks/main.yml

changeset 6
0fe74156183f
parent 1
18da47fe753c
child 8
b2d82cd36d68
--- a/roles/devbox/tasks/main.yml
+++ b/roles/devbox/tasks/main.yml
@@ -11,6 +11,7 @@
     state: present
     regexp: '^%sudo'
     line: '%sudo ALL=(ALL:ALL) ALL'
+  tags: sudo
 
 
 # Create/update my user, don't clobber my extra groups.
@@ -22,6 +23,7 @@
     groups: sudo
     append: true
   register: user
+  tags: user
 
 
 - name: ssh | Pubkey for user
@@ -31,6 +33,7 @@
     key: "{{item}}"
   with_file:
     - public_keys/{{user.name}}
+  tags: user, ssh
 
 - name: ssh | Ensure known_hosts keys
   sudo: true
@@ -42,6 +45,7 @@
     create: true
     mode: 0600
   with_dict: hostkeys
+  tags: user, ssh
 
 - name: ssh | Purge invalid known_hosts keys
   sudo: true
@@ -51,6 +55,7 @@
     state: absent
     line: "{{item.value}}"
   with_dict: hostkeys_removed
+  tags: user, ssh
 
 
 # I like to make my ~ my dotfiles working directory (some folks symlink
@@ -59,6 +64,7 @@
 - name: Check for dotfiles checkout in homedir
   stat: path={{user.home}}/.hg
   register: dotfiles
+  tags: user, dotfiles
 
 - name: Clone dotfiles
   when: dotfiles.stat.exists == false
@@ -68,6 +74,7 @@
     && rmdir {{user.home}}/_dotfiles_
     && chown -R {{user.name}}:{{user.group}} {{user.home}}/.hg
     && sudo -u {{user.name}} hg -R {{user.home}} update -C
+  tags: user, dotfiles
 
 
 # This is an existing script that clones/updates oh-my-zsh, rbenv, and plenv.
@@ -79,5 +86,6 @@
   register: homedir_setup
   changed_when: homedir_setup.stdout | match("Updating|Installing")
   failed_when: homedir_setup.rc != 0
+  tags: user, install
 
 

mercurial