diff --git a/changelogs/fragments/0-pipefail.yml b/changelogs/fragments/0-pipefail.yml new file mode 100644 index 0000000..5a28d1f --- /dev/null +++ b/changelogs/fragments/0-pipefail.yml @@ -0,0 +1,2 @@ +major_changes: +- mysql_db - the ``pipefail`` argument's default value is set to ``true``. If your target machines do not use ``bash`` as a default interpreter, set ``pipefail`` to ``false`` explicitly. However, we strongly recommend setting up ``bash`` as a default and ``pipefail=true`` as it will protect you from getting broken dumps you don't know about (https://github.com/ansible-collections/community.mysql/issues/407). diff --git a/plugins/modules/mysql_db.py b/plugins/modules/mysql_db.py index 4eec625..3d3c816 100644 --- a/plugins/modules/mysql_db.py +++ b/plugins/modules/mysql_db.py @@ -160,10 +160,8 @@ options: description: - Use C(bash) instead of C(sh) and add C(-o pipefail) to catch errors from the mysql_dump command when I(state=dump) and compression is used. - - The default is C(no) to prevent issues on systems without bash as a default interpreter. - - The default will change to C(yes) in community.mysql 4.0.0. type: bool - default: false + default: true version_added: '3.4.0' sql_log_bin: description: @@ -637,7 +635,7 @@ def main(): check_implicit_admin=dict(type='bool', default=False), config_overrides_defaults=dict(type='bool', default=False), chdir=dict(type='path'), - pipefail=dict(type='bool', default=False), + pipefail=dict(type='bool', default=True), sql_log_bin=dict(type='bool', default=True), )