* Python3 fixes to copy, file, and stat so that the connection integration tests can be run
* Forgot to audit the helper functions as well.
* Fix dest to refledt b_dest (found by @mattclay)
* commands argument now accepts a dict arguments
* rpcs argument now accepts a dict argument
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all
SELinux since 2012 use a configuration file to
convert boolean names from a old name to a new name,
for preserving backward compatibility.
However, this has to be done explicitely when using the python
bindings, and the module was not doing it.
Openshift ansible script use this construct to detect if
a boolean exist or not:
- name: Check for existence of virt_sandbox_use_nfs seboolean
command: getsebool virt_sandbox_use_nfs
register: virt_sandbox_use_nfs_output
failed_when: false
changed_when: false
- name: Set seboolean to allow nfs storage plugin access from containers(sandbox)
seboolean:
name: virt_sandbox_use_nfs
state: yes
persistent: yes
when: virt_sandbox_use_nfs_output.rc == 0
On a system where virt_sandbox_use_nfs do not exist, this work. But
on a system where virt_sandbox_use_nfs is a alias to virt_use_nfs (like
Fedora 24), this fail because the seboolean is not aware of the alias.
On python3, we want to use the surrogateescape error handler if
available for filesystem paths and the like. On python2, have to use
strict in these circumstances. Use the new error strategy for to_text,
to_bytes, and to_native that allows this.
In Ansible 2.x this module gives `changed = True` for all privileges
that are specified including a table with
priv: "database.table:GRANT"
Mysql returns escaped names in the format
`database`.`tables`:GRANT
However in PR #1358, which was intended to support dotted database names
(a crazy idea to begin with), the quotes for the table name were left
out, leading to `curr_priv != new_priv`.
This means that the idempotency comparison between new_priv and
curr_priv is always 'changed'.
This PR re-introduces quoting to the table part of the priv.
dict no longer have a iteritems method, it was replaced
by items. So we need to use six.
Traceback (most recent call last):
File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 587, in <module>
main()
File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 571, in main
changed = user_add(cursor, user, host, host_all, password, encrypted, priv, module.check_mode)
File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 239, in user_add
for db_table, priv in new_priv.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'