mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-09-30 05:23:25 -07:00
mysql_db: change pipefail default as true (#734)
* mysql_db: change pipefail default as true * Fix CI * major -> breaking in changelog
This commit is contained in:
parent
96828579ac
commit
451f7e617d
3 changed files with 6 additions and 4 deletions
2
changelogs/fragments/0-pipefail.yml
Normal file
2
changelogs/fragments/0-pipefail.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
breaking_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).
|
|
@ -160,10 +160,8 @@ options:
|
||||||
description:
|
description:
|
||||||
- Use C(bash) instead of C(sh) and add C(-o pipefail) to catch errors from the
|
- 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.
|
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
|
type: bool
|
||||||
default: false
|
default: true
|
||||||
version_added: '3.4.0'
|
version_added: '3.4.0'
|
||||||
sql_log_bin:
|
sql_log_bin:
|
||||||
description:
|
description:
|
||||||
|
@ -637,7 +635,7 @@ def main():
|
||||||
check_implicit_admin=dict(type='bool', default=False),
|
check_implicit_admin=dict(type='bool', default=False),
|
||||||
config_overrides_defaults=dict(type='bool', default=False),
|
config_overrides_defaults=dict(type='bool', default=False),
|
||||||
chdir=dict(type='path'),
|
chdir=dict(type='path'),
|
||||||
pipefail=dict(type='bool', default=False),
|
pipefail=dict(type='bool', default=True),
|
||||||
sql_log_bin=dict(type='bool', default=True),
|
sql_log_bin=dict(type='bool', default=True),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@
|
||||||
state: dump
|
state: dump
|
||||||
name: all
|
name: all
|
||||||
target: /tmp/full-dump-without-t1.sql.gz
|
target: /tmp/full-dump-without-t1.sql.gz
|
||||||
|
pipefail: false
|
||||||
register: full_dump_without_t1_gz_without_fix
|
register: full_dump_without_t1_gz_without_fix
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -119,6 +120,7 @@
|
||||||
state: dump
|
state: dump
|
||||||
name: db2
|
name: db2
|
||||||
target: /tmp/dump-db2-without_t1.sql.gz
|
target: /tmp/dump-db2-without_t1.sql.gz
|
||||||
|
pipefail: false
|
||||||
register: dump_db2_without_t1_gz_without_fix
|
register: dump_db2_without_t1_gz_without_fix
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue