Upgrade notes

The upgrade notes only describe necessary changes that you might need to make to your setup in order to use a new role release. Refer to the Changelog for more details about what has changed.

From v0.1.x to v0.2.x

All role variables have been renamed from users_* to users__* to move them to a separate namespace.

List of renamed user list variables:

Old variable name New variable name
users_list users__accounts
users_group_list users__group_accounts
users_host_list users__host_accounts
users_root users__root_accounts
users_admins users__admin_accounts
users_default users__default_accounts
users_groups users__groups
  users__group_groups
  users__host_groups

List of other renamed variables:

Old variable name New variable name
users_default_dotfiles users__dotfiles_enabled
users_default_dotfiles_key users__dotfiles_name
users_dotfiles users__dotfiles_default_map

This script can come in handy to update the inventory variable names, assuming that your inventory is stored in a git repository:

#!/bin/bash

## Upgrade inventory variables for migration from debops.users v0.1.x to v0.2.x.
## The script is idempotent.

git ls-files -z "$(git rev-parse --show-toplevel)" | xargs --null -I '{}' find '{}' -type f -print0 \
 | xargs --null sed --in-place --regexp-extended '
     s/\<users__?default_dotfiles\>/users__dotfiles_enabled/g;
     s/\<users__?default_dotfiles_key\>/users__dotfiles_name/g;
     s/\<users__?default_shell\>/users__default_shell/g;
     s/\<users__?dotfiles\>/users__dotfiles_default_map/g;
     s/\<users__?list\>/users__accounts/g;
     s/\<users__?group_list\>/users__group_accounts/g;
     s/\<users__?host_list\>/users__host_accounts/g;
     s/\<users__?root\>/users__root_accounts/g;
     s/\<users__?admins\>/users__admin_accounts/g;
     s/\<users__?default\>/users__default_accounts/g;
     s/\<users__?groups\>/users__groups/g;
     s/\<([^.]users)_([^_])/\1__\2/g;
   '

The script is bundled with this role under docs/scripts/upgrade-from-v0.1.x-to-v0.2.x.sh and can be invoked from there.