# HG changeset patch # User Meredith Howard # Date 1498250227 14400 # Node ID 33181d87b14973f300121373bed6702daa2c01de # Parent 509db8d79ab554b231e5879442de952905125832 disable stock users (pi, pine64, etc) diff --git a/roles/user/defaults/main.yml b/roles/user/defaults/main.yml new file mode 100644 --- /dev/null +++ b/roles/user/defaults/main.yml @@ -0,0 +1,3 @@ +--- +disable_stock_users: false + diff --git a/roles/user/tasks/disable-stock.yml b/roles/user/tasks/disable-stock.yml new file mode 100644 --- /dev/null +++ b/roles/user/tasks/disable-stock.yml @@ -0,0 +1,8 @@ +--- + +- name: Disable stock users + shell: usermod -e 1 {{item}} + ignore_errors: true + with_items: + - pi + - pine64 diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml --- a/roles/user/tasks/main.yml +++ b/roles/user/tasks/main.yml @@ -68,3 +68,6 @@ changed_when: homedir_setup.stdout | match("Updating|Cloning") failed_when: homedir_setup.rc != 0 tags: user, dotfiles + +- include: disable-stock.yml + when: disable_stock_users