diff --git a/README.md b/README.md index 6d81e4e..d447a6e 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,10 @@ A list of databases to ensure exist on the server. Only the `name` is required; A list of users to ensure exist on the server. Only the `name` is required; all other properties are optional. + postgres_users_no_log: true + +Whether to output user data (which may contain sensitive information, like passwords) when managing users. + postgresql_version: [OS-specific] postgresql_data_dir: [OS-specific] postgresql_bin_path: [OS-specific] diff --git a/defaults/main.yml b/defaults/main.yml index fa6a87f..0e2d503 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -62,3 +62,6 @@ postgresql_users: [] # login_unix_socket: # defaults to 1st of postgresql_unix_socket_directories # port: # defaults to not set # state: # defaults to 'present' + +# Whether to output user data when managing users. +postgres_users_no_log: true diff --git a/tasks/users.yml b/tasks/users.yml index 34746eb..a1ae894 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -14,7 +14,7 @@ port: "{{ item.port | default(omit) }}" state: "{{ item.state | default('present') }}" with_items: "{{ postgresql_users }}" - no_log: true + no_log: "{{ postgres_users_no_log }}" become: true become_user: "{{ postgresql_user }}" # See: https://github.com/ansible/ansible/issues/16048#issuecomment-229012509