mirror of https://github.com/ansible/ansible.git
Mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
If I create a database from scratch and assign permissions by doing:
- name: ensure database is created
action: postgresql_db db=$dbname
- name: ensure django user has access
action: postgresql_user db=$dbname user=$dbuser priv=ALL password=$dbpassword
Then it fails with the error:
File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 565, in <module>
main()
File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 273, in main
changed = grant_privileges(cursor, user, privs) or changed
File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 174, in grant_privileges
changed = grant_func(cursor, user, name, privilege)\
File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 132, in grant_database_privilege
prev_priv = get_database_privileges(cursor, user, db)
File "/tmp/ansible-1347048449.32-29998829936529/postgresql_user", line 118, in get_database_privileges
r = re.search('%s=(C?T?c?)/[a-z]+\,?' % user, datacl)
File "/usr/lib/python2.7/re.py", line 142, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
This fix fixes the problem by not executing the regex if the
db query on pg_database returns None.
|
14 years ago | |
|---|---|---|
| apt | 14 years ago | |
| apt_repository | 14 years ago | |
| assemble | 14 years ago | |
| async_status | 14 years ago | |
| async_wrapper | 14 years ago | |
| authorized_key | 14 years ago | |
| command | 14 years ago | |
| copy | 14 years ago | |
| easy_install | 14 years ago | |
| facter | 14 years ago | |
| fetch | 14 years ago | |
| file | 14 years ago | |
| get_url | 14 years ago | |
| git | 14 years ago | |
| group | 14 years ago | |
| lineinfile | 14 years ago | |
| mount | 14 years ago | |
| mysql_db | 14 years ago | |
| mysql_user | 14 years ago | |
| nagios | 14 years ago | |
| ohai | 14 years ago | |
| ping | 14 years ago | |
| pip | 14 years ago | |
| postgresql_db | 14 years ago | |
| postgresql_user | 14 years ago | |
| raw | 14 years ago | |
| seboolean | 14 years ago | |
| selinux | 14 years ago | |
| service | 14 years ago | |
| setup | 14 years ago | |
| shell | 14 years ago | |
| slurp | 14 years ago | |
| subversion | 14 years ago | |
| supervisorctl | 14 years ago | |
| template | 14 years ago | |
| user | 14 years ago | |
| virt | 14 years ago | |
| wait_for | 14 years ago | |
| yum | 14 years ago | |