--- 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")