sudo deprecated for 'become'

Sat, 19 Mar 2016 03:13:12 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 19 Mar 2016 03:13:12 -0400
changeset 11
8e5dcc6e199a
parent 10
ee86092e374a
child 12
90280b50c134

sudo deprecated for 'become'

roles/devbox/tasks/main.yml file | annotate | diff | comparison | revisions
--- a/roles/devbox/tasks/main.yml
+++ b/roles/devbox/tasks/main.yml
@@ -42,8 +42,8 @@
   tags: user, ssh
 
 - name: ssh | Ensure known_hosts keys
-  sudo: true
-  sudo_user: "{{user.name}}"
+  become: true
+  become_user: "{{user.name}}"
   lineinfile:
     dest: "{{user.home}}/.ssh/known_hosts"
     state: present
@@ -54,8 +54,8 @@
   tags: user, ssh
 
 - name: ssh | Purge invalid known_hosts keys
-  sudo: true
-  sudo_user: "{{user.name}}"
+  become: true
+  become_user: "{{user.name}}"
   lineinfile:
     dest: "{{user.home}}/.ssh/known_hosts"
     state: absent
@@ -83,11 +83,11 @@
   tags: user, dotfiles
 
 
-# This is an existing script that clones/updates oh-my-zsh, rbenv, and plenv.
+# This is an existing script that clones/updates zgen, rbenv, and plenv.
 # My dotfiles use each if the right directory exists.
 - name: Run homedir-setup
-  sudo: true
-  sudo_user: "{{user.name}}"
+  become: true
+  become_user: "{{user.name}}"
   shell: bin/homedir-setup chdir={{user.home}}
   register: homedir_setup
   changed_when: homedir_setup.stdout | match("Updating|Cloning")

mercurial