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.
 
 
 
 
 
Go to file
Lorin Hochstein 9eb12a2b81 Fix postgresql_user bug
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.
12 years ago
apt Fix invalid usage or fail_json in apt module 12 years ago
apt_repository Merge branch 'binpath' of https://github.com/sfromm/ansible into devel 12 years ago
assemble backuplocal => backup_local for API standardization reasons 12 years ago
async_status Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library 12 years ago
async_wrapper whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added 12 years ago
authorized_key whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added 12 years ago
command Add support to removes control param 12 years ago
copy backuplocal => backup_local for API standardization reasons 12 years ago
easy_install Add option required=(True|False) to get_bin_path and update modules 12 years ago
facter Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library 12 years ago
fetch Setup module no longer saves to disk, as templates are mostly useful in playbooks and this allows lots of simplifications 13 years ago
file Handle special files just like normal files 12 years ago
get_url Adds a thirsty=yes|no to the get_url module, such that if downloading a large file from the internet you can decide 12 years ago
git Remove obsolete comment 12 years ago
group Add option required=(True|False) to get_bin_path and update modules 12 years ago
lineinfile backuplocal => backup_local for API standardization reasons 12 years ago
mount fixed missing module argument for mount module 12 years ago
mysql_db Added login_unix_socket option to mysql_db module 12 years ago
mysql_user Added login_unix_socket option to mysql_user module 12 years ago
nagios Change from a module config file to brute force locating the nagios configs so we can find the command file. 12 years ago
ohai Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library 12 years ago
ping Add encoding lines to python modules such that they can take unicode options if they are fed them, since the 12 years ago
pip Add option required=(True|False) to get_bin_path and update modules 12 years ago
postgresql_db added support for custom port definition 12 years ago
postgresql_user Fix postgresql_user bug 12 years ago
raw Setup module no longer saves to disk, as templates are mostly useful in playbooks and this allows lots of simplifications 13 years ago
seboolean chmod +x 12 years ago
selinux chmod +x 12 years ago
service Migrate remaining modules to use get_bin_path in module_common.py 12 years ago
setup Merge pull request #1005 from dagwieers/cmdline 12 years ago
shell Add module common code to allow it to be easier to indicate whether arguments are mutually exclusive, required in conjunction, or whether one of a list of arguments is required. This simplifies writing Python modules. 12 years ago
slurp Add encoding lines to python modules such that they can take unicode options if they are fed them, since the 12 years ago
subversion Subversion dest should allow ~ expansion 12 years ago
supervisorctl Use `get_bin_path` properly 12 years ago
template Setup module no longer saves to disk, as templates are mostly useful in playbooks and this allows lots of simplifications 13 years ago
user Add option required=(True|False) to get_bin_path and update modules 12 years ago
virt Make pep8 tests run against the library directory as well, and associated tweaks (mostly to indentation) in the library 12 years ago
wait_for chmod +x 12 years ago
yum fix up local_nvra 12 years ago