Skip to content

Commit

Permalink
Merges user privilages into correct role
Browse files Browse the repository at this point in the history
  • Loading branch information
leonelgalan committed Jan 28, 2015
1 parent f0ad7e4 commit fda0aa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,3 @@
sudo_user: "{{postgresql_admin_user}}"
with_items: postgresql_users
when: postgresql_users|length > 0

- name: PostgreSQL | Update the user privileges
postgresql_user:
name: "{{item.name}}"
db: "{{item.db}}"
port: "{{postgresql_port}}"
priv: "{{item.priv | default('ALL')}}"
state: present
login_user: "{{postgresql_admin_user}}"
role_attr_flags: "{{item.role_attr_flags | default('')}}"
sudo: yes
sudo_user: "{{postgresql_admin_user}}"
with_items: postgresql_user_privileges
when: postgresql_users|length > 0

5 changes: 5 additions & 0 deletions tasks/users_privileges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
postgresql_user:
name: "{{item.name}}"
db: "{{item.db}}"
port: "{{postgresql_port}}"
priv: "{{item.priv | default('ALL')}}"
state: present
login_host: "{{item.host | default('localhost')}}"
login_user: "{{postgresql_admin_user}}"
role_attr_flags: "{{item.role_attr_flags | default('')}}"
sudo: yes
sudo_user: "{{postgresql_admin_user}}"
with_items: postgresql_user_privileges
when: postgresql_users|length > 0

0 comments on commit fda0aa9

Please sign in to comment.