From dbae7da6bcfeea9c1c64060b577dec72b8f9f2a0 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 25 Nov 2020 08:04:50 +0100 Subject: [PATCH] Improve docker, hetzner and postgresql migration (#1382) * Improve fragment formatting. * Remove docker fragments. * Remove postgresql fragments. --- .../1048-postgresql_privs_add_procedure_type.yml | 2 -- ...privs_fix_failings_when_using_roles_with_hyphen.yml | 2 -- ...xt_fix_version_selection_when_version_is_latest.yml | 2 -- .../1091-postgresql_info_add_in_recovery_ret_val.yml | 2 -- ...ext_fix_failing_when_version_cannot_be_compared.yml | 2 -- .../fragments/1118-docker_login-config-store.yml | 2 -- .../fragments/1119-docker_container-device-reqests.yml | 2 -- changelogs/fragments/1124-pg_hba-dictkey_bugfix.yaml | 2 -- changelogs/fragments/547-start-service-condition.yaml | 10 ---------- ...ker_container_use_config_macaddress_by_default.yaml | 2 -- changelogs/fragments/642-docker_container-python-2.yml | 2 -- ...rm-remove-advertise_addr-from-join-requirement.yaml | 2 -- .../fragments/651-fix-postgresql_set-warning.yaml | 4 ---- .../653-postgresql_query_add_search_path_param.yml | 2 -- changelogs/fragments/656-name-with-hyphen.yml | 3 --- .../776-postgresql_set_allow_empty_string.yaml | 2 -- .../796-postgresql_privs-grant-option-bug.yaml | 2 -- changelogs/fragments/805-docker_image-build-output.yml | 2 -- ...resql_privs_should_allow_public_role_lowercased.yml | 2 -- .../fragments/886-postgresql_query_add_ret_vals.yml | 2 -- .../fragments/887-rollback-if-nothing-changed.yml | 2 -- .../941-postgresql_privs_usage_on_types_option.yml | 2 -- ...ker_container-published_ports-empty-idempotency.yml | 2 -- .../996-postgresql_privs_fix_function_handling.yml | 2 -- .../fragments/community.docker-31-docker-secret.yml | 2 -- changelogs/fragments/docker-migration-removal.yml | 4 ++-- changelogs/fragments/hetzner-migration-removal.yml | 4 ++-- changelogs/fragments/postgresql-migration-removal.yml | 6 ++++-- 28 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 changelogs/fragments/1048-postgresql_privs_add_procedure_type.yml delete mode 100644 changelogs/fragments/1059-postgresql_privs_fix_failings_when_using_roles_with_hyphen.yml delete mode 100644 changelogs/fragments/1078-postgresql_ext_fix_version_selection_when_version_is_latest.yml delete mode 100644 changelogs/fragments/1091-postgresql_info_add_in_recovery_ret_val.yml delete mode 100644 changelogs/fragments/1099-postgresql_ext_fix_failing_when_version_cannot_be_compared.yml delete mode 100644 changelogs/fragments/1118-docker_login-config-store.yml delete mode 100644 changelogs/fragments/1119-docker_container-device-reqests.yml delete mode 100644 changelogs/fragments/1124-pg_hba-dictkey_bugfix.yaml delete mode 100644 changelogs/fragments/547-start-service-condition.yaml delete mode 100644 changelogs/fragments/564-docker_container_use_config_macaddress_by_default.yaml delete mode 100644 changelogs/fragments/642-docker_container-python-2.yml delete mode 100644 changelogs/fragments/646-docker_swarm-remove-advertise_addr-from-join-requirement.yaml delete mode 100644 changelogs/fragments/651-fix-postgresql_set-warning.yaml delete mode 100644 changelogs/fragments/653-postgresql_query_add_search_path_param.yml delete mode 100644 changelogs/fragments/656-name-with-hyphen.yml delete mode 100644 changelogs/fragments/776-postgresql_set_allow_empty_string.yaml delete mode 100644 changelogs/fragments/796-postgresql_privs-grant-option-bug.yaml delete mode 100644 changelogs/fragments/805-docker_image-build-output.yml delete mode 100644 changelogs/fragments/858-postgresql_privs_should_allow_public_role_lowercased.yml delete mode 100644 changelogs/fragments/886-postgresql_query_add_ret_vals.yml delete mode 100644 changelogs/fragments/887-rollback-if-nothing-changed.yml delete mode 100644 changelogs/fragments/941-postgresql_privs_usage_on_types_option.yml delete mode 100644 changelogs/fragments/979-docker_container-published_ports-empty-idempotency.yml delete mode 100644 changelogs/fragments/996-postgresql_privs_fix_function_handling.yml delete mode 100644 changelogs/fragments/community.docker-31-docker-secret.yml diff --git a/changelogs/fragments/1048-postgresql_privs_add_procedure_type.yml b/changelogs/fragments/1048-postgresql_privs_add_procedure_type.yml deleted file mode 100644 index f5702cc24e..0000000000 --- a/changelogs/fragments/1048-postgresql_privs_add_procedure_type.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- postgresql_privs - add ``procedure`` type support (https://github.com/ansible-collections/community.general/issues/1002). diff --git a/changelogs/fragments/1059-postgresql_privs_fix_failings_when_using_roles_with_hyphen.yml b/changelogs/fragments/1059-postgresql_privs_fix_failings_when_using_roles_with_hyphen.yml deleted file mode 100644 index d814799cf1..0000000000 --- a/changelogs/fragments/1059-postgresql_privs_fix_failings_when_using_roles_with_hyphen.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_privs - fix module fails when ``type`` group and passing ``objs`` value containing hyphens (https://github.com/ansible-collections/community.general/issues/1058). diff --git a/changelogs/fragments/1078-postgresql_ext_fix_version_selection_when_version_is_latest.yml b/changelogs/fragments/1078-postgresql_ext_fix_version_selection_when_version_is_latest.yml deleted file mode 100644 index 1c72755dce..0000000000 --- a/changelogs/fragments/1078-postgresql_ext_fix_version_selection_when_version_is_latest.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_ext - fix version selection when ``version=latest`` (https://github.com/ansible-collections/community.general/pull/1078). diff --git a/changelogs/fragments/1091-postgresql_info_add_in_recovery_ret_val.yml b/changelogs/fragments/1091-postgresql_info_add_in_recovery_ret_val.yml deleted file mode 100644 index 39f6f66359..0000000000 --- a/changelogs/fragments/1091-postgresql_info_add_in_recovery_ret_val.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- postgresql_info - add ``in_recovery`` return value to show if a service in recovery mode or not (https://github.com/ansible-collections/community.general/issues/1068). diff --git a/changelogs/fragments/1099-postgresql_ext_fix_failing_when_version_cannot_be_compared.yml b/changelogs/fragments/1099-postgresql_ext_fix_failing_when_version_cannot_be_compared.yml deleted file mode 100644 index bb102ecc82..0000000000 --- a/changelogs/fragments/1099-postgresql_ext_fix_failing_when_version_cannot_be_compared.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_ext - fix the module crashes when available ext versions cannot be compared with current version (https://github.com/ansible-collections/community.general/issues/1095). diff --git a/changelogs/fragments/1118-docker_login-config-store.yml b/changelogs/fragments/1118-docker_login-config-store.yml deleted file mode 100644 index 4106d675df..0000000000 --- a/changelogs/fragments/1118-docker_login-config-store.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- "docker_login - fix internal config file storage to handle credentials for more than one registry (https://github.com/ansible-collections/community.general/issues/1117)." \ No newline at end of file diff --git a/changelogs/fragments/1119-docker_container-device-reqests.yml b/changelogs/fragments/1119-docker_container-device-reqests.yml deleted file mode 100644 index 29347f1dfa..0000000000 --- a/changelogs/fragments/1119-docker_container-device-reqests.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- "docker_container - now supports the ``device_requests`` option, which allows to request additional resources such as GPUs (https://github.com/ansible/ansible/issues/65748, https://github.com/ansible-collections/community.general/pull/1119)." diff --git a/changelogs/fragments/1124-pg_hba-dictkey_bugfix.yaml b/changelogs/fragments/1124-pg_hba-dictkey_bugfix.yaml deleted file mode 100644 index 5dbda57d7a..0000000000 --- a/changelogs/fragments/1124-pg_hba-dictkey_bugfix.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - postgresql_pg_hba - fix a crash when a new rule with an 'options' field replaces a rule without or vice versa (https://github.com/ansible-collections/community.general/issues/1108). diff --git a/changelogs/fragments/547-start-service-condition.yaml b/changelogs/fragments/547-start-service-condition.yaml deleted file mode 100644 index 408156c301..0000000000 --- a/changelogs/fragments/547-start-service-condition.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -bugfixes: - - docker_compose - add a condition to prevent service startup - if parameter ``stopped`` is true. Otherwise, the service will be - started on each play and stopped again immediately due to - the ``stopped`` parameter and breaks the idempotency of the module - (https://github.com/ansible-collections/community.general/issues/532). - - docker_compose - disallow usage of the parameters ``stopped`` and ``restarted`` - at the same time. This breaks also the idempotency - (https://github.com/ansible-collections/community.general/issues/532). diff --git a/changelogs/fragments/564-docker_container_use_config_macaddress_by_default.yaml b/changelogs/fragments/564-docker_container_use_config_macaddress_by_default.yaml deleted file mode 100644 index b2eab62644..0000000000 --- a/changelogs/fragments/564-docker_container_use_config_macaddress_by_default.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - docker_container - use Config MacAddress by default instead of Networks. Networks MacAddress is empty in some cases (https://github.com/ansible/ansible/issues/70206). diff --git a/changelogs/fragments/642-docker_container-python-2.yml b/changelogs/fragments/642-docker_container-python-2.yml deleted file mode 100644 index f579761f4a..0000000000 --- a/changelogs/fragments/642-docker_container-python-2.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- "docker_container - various error fixes in string handling for Python 2 to avoid crashes when non-ASCII characters are used in strings (https://github.com/ansible-collections/community.general/issues/640)." diff --git a/changelogs/fragments/646-docker_swarm-remove-advertise_addr-from-join-requirement.yaml b/changelogs/fragments/646-docker_swarm-remove-advertise_addr-from-join-requirement.yaml deleted file mode 100644 index b247190f08..0000000000 --- a/changelogs/fragments/646-docker_swarm-remove-advertise_addr-from-join-requirement.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - docker_swarm - removes ``advertise_addr`` from list of required arguments when ``state`` is ``"join"`` (https://github.com/ansible-collections/community.general/issues/439). diff --git a/changelogs/fragments/651-fix-postgresql_set-warning.yaml b/changelogs/fragments/651-fix-postgresql_set-warning.yaml deleted file mode 100644 index 8369a4cef5..0000000000 --- a/changelogs/fragments/651-fix-postgresql_set-warning.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -bugfixes: - - postgresql_set - only display a warning about restarts, when - restarting is needed (https://github.com/ansible-collections/community.general/pull/651). diff --git a/changelogs/fragments/653-postgresql_query_add_search_path_param.yml b/changelogs/fragments/653-postgresql_query_add_search_path_param.yml deleted file mode 100644 index 72ba15b8ab..0000000000 --- a/changelogs/fragments/653-postgresql_query_add_search_path_param.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- postgresql_query - add search_path parameter (https://github.com/ansible-collections/community.general/issues/625). diff --git a/changelogs/fragments/656-name-with-hyphen.yml b/changelogs/fragments/656-name-with-hyphen.yml deleted file mode 100644 index ad326f73ec..0000000000 --- a/changelogs/fragments/656-name-with-hyphen.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -bugfixes: -- postgresql_privs - fix crash when set privileges on schema with hyphen in the name (https://github.com/ansible-collections/community.general/issues/656). diff --git a/changelogs/fragments/776-postgresql_set_allow_empty_string.yaml b/changelogs/fragments/776-postgresql_set_allow_empty_string.yaml deleted file mode 100644 index f02b735d8f..0000000000 --- a/changelogs/fragments/776-postgresql_set_allow_empty_string.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_set - allow to pass an empty string to the ``value`` parameter (https://github.com/ansible-collections/community.general/issues/775). diff --git a/changelogs/fragments/796-postgresql_privs-grant-option-bug.yaml b/changelogs/fragments/796-postgresql_privs-grant-option-bug.yaml deleted file mode 100644 index 48799923f2..0000000000 --- a/changelogs/fragments/796-postgresql_privs-grant-option-bug.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - postgresql_privs - the module was attempting to revoke grant options even though ``grant_option`` was not specified (https://github.com/ansible-collections/community.general/pull/796). diff --git a/changelogs/fragments/805-docker_image-build-output.yml b/changelogs/fragments/805-docker_image-build-output.yml deleted file mode 100644 index ed762094aa..0000000000 --- a/changelogs/fragments/805-docker_image-build-output.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "docker_image - return docker build output (https://github.com/ansible-collections/community.general/pull/805)." diff --git a/changelogs/fragments/858-postgresql_privs_should_allow_public_role_lowercased.yml b/changelogs/fragments/858-postgresql_privs_should_allow_public_role_lowercased.yml deleted file mode 100644 index 1e51ec729b..0000000000 --- a/changelogs/fragments/858-postgresql_privs_should_allow_public_role_lowercased.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_privs - allow to pass ``PUBLIC`` role written in lowercase letters (https://github.com/ansible-collections/community.general/issues/857). diff --git a/changelogs/fragments/886-postgresql_query_add_ret_vals.yml b/changelogs/fragments/886-postgresql_query_add_ret_vals.yml deleted file mode 100644 index 02601ba889..0000000000 --- a/changelogs/fragments/886-postgresql_query_add_ret_vals.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- postgresql_query - add ``query_list`` and ``query_all_results`` return values (https://github.com/ansible-collections/community.general/issues/838). diff --git a/changelogs/fragments/887-rollback-if-nothing-changed.yml b/changelogs/fragments/887-rollback-if-nothing-changed.yml deleted file mode 100644 index 7ae40ebb5a..0000000000 --- a/changelogs/fragments/887-rollback-if-nothing-changed.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_privs - rollback if nothing changed (https://github.com/ansible-collections/community.general/issues/885). diff --git a/changelogs/fragments/941-postgresql_privs_usage_on_types_option.yml b/changelogs/fragments/941-postgresql_privs_usage_on_types_option.yml deleted file mode 100644 index bfcafe5cd5..0000000000 --- a/changelogs/fragments/941-postgresql_privs_usage_on_types_option.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- postgresql_privs - add the ``usage_on_types`` option (https://github.com/ansible-collections/community.general/issues/884). diff --git a/changelogs/fragments/979-docker_container-published_ports-empty-idempotency.yml b/changelogs/fragments/979-docker_container-published_ports-empty-idempotency.yml deleted file mode 100644 index 5df2f7ca12..0000000000 --- a/changelogs/fragments/979-docker_container-published_ports-empty-idempotency.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- "docker_container - fix idempotency problem with ``published_ports`` when strict comparison is used and list is empty (https://github.com/ansible-collections/community.general/issues/978)." diff --git a/changelogs/fragments/996-postgresql_privs_fix_function_handling.yml b/changelogs/fragments/996-postgresql_privs_fix_function_handling.yml deleted file mode 100644 index 975cf3cd59..0000000000 --- a/changelogs/fragments/996-postgresql_privs_fix_function_handling.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- postgresql_privs - fix the module mistakes a procedure for a function (https://github.com/ansible-collections/community.general/issues/994). diff --git a/changelogs/fragments/community.docker-31-docker-secret.yml b/changelogs/fragments/community.docker-31-docker-secret.yml deleted file mode 100644 index d4fcca3f93..0000000000 --- a/changelogs/fragments/community.docker-31-docker-secret.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "docker_secret - add a warning when the secret does not have an ``ansible_key`` label but the ``force`` parameter is not set (https://github.com/ansible-collections/community.docker/issues/30, https://github.com/ansible-collections/community.docker/pull/31)." diff --git a/changelogs/fragments/docker-migration-removal.yml b/changelogs/fragments/docker-migration-removal.yml index 6a650cecce..5740aeea44 100644 --- a/changelogs/fragments/docker-migration-removal.yml +++ b/changelogs/fragments/docker-migration-removal.yml @@ -1,12 +1,12 @@ removed_features: -- > +- | All ``docker`` modules and plugins have been removed from this collection. They have been migrated to the `community.docker `_ collection. If you use ansible-base 2.10 or newer, redirections have been provided. If you use Ansible 2.9 and installed this collection, you need to adjust the FQCNs (``community.general.docker_container`` → ``community.docker.docker_container``) and make sure to install the community.docker collection. breaking_changes: -- > +- | If you use Ansible 2.9 and the ``docker`` plugins or modules from this collections, community.general 2.0.0 results in errors when trying to use the docker content by FQCN, like ``community.general.docker_container``. Since Ansible 2.9 is not able to use redirections, you will have to adjust your playbooks and roles manually to use the new FQCNs (``community.docker.docker_container`` for the previous example) and to make sure that you have ``community.docker`` installed. diff --git a/changelogs/fragments/hetzner-migration-removal.yml b/changelogs/fragments/hetzner-migration-removal.yml index 7bd39dd10f..23518ffabb 100644 --- a/changelogs/fragments/hetzner-migration-removal.yml +++ b/changelogs/fragments/hetzner-migration-removal.yml @@ -1,12 +1,12 @@ removed_features: -- > +- | All ``hetzner`` modules have been removed from this collection. They have been migrated to the `community.hrobot `_ collection. If you use ansible-base 2.10 or newer, redirections have been provided. If you use Ansible 2.9 and installed this collection, you need to adjust the FQCNs (``community.general.hetzner_firewall`` → ``community.hrobot.firewall``) and make sure to install the community.hrobot collection. breaking_changes: -- > +- | If you use Ansible 2.9 and the ``hetzner`` modules from this collections, community.general 2.0.0 results in errors when trying to use the hetzner content by FQCN, like ``community.general.hetzner_firewall``. Since Ansible 2.9 is not able to use redirections, you will have to adjust your playbooks and roles manually to use the new FQCNs (``community.hrobot.firewall`` for the previous example) and to make sure that you have ``community.hrobot`` installed. diff --git a/changelogs/fragments/postgresql-migration-removal.yml b/changelogs/fragments/postgresql-migration-removal.yml index 7bb8b8f511..7a6f0b5c07 100644 --- a/changelogs/fragments/postgresql-migration-removal.yml +++ b/changelogs/fragments/postgresql-migration-removal.yml @@ -1,12 +1,14 @@ removed_features: -- > +- | All ``postgresql`` modules have been removed from this collection. They have been migrated to the `community.postgresql `_ collection. + If you use ansible-base 2.10 or newer, redirections have been provided. If you use Ansible 2.9 and installed this collection, you need to adjust the FQCNs (``community.general.postgresql_info`` → ``community.postgresql.postgresql_info``) and make sure to install the community.postgresql collection. breaking_changes: -- > +- | If you use Ansible 2.9 and the ``postgresql`` modules from this collections, community.general 2.0.0 results in errors when trying to use the postgresql content by FQCN, like ``community.general.postgresql_info``. Since Ansible 2.9 is not able to use redirections, you will have to adjust your playbooks and roles manually to use the new FQCNs (``community.postgresql.postgresql_info`` for the previous example) and to make sure that you have ``community.postgresql`` installed. + If you use ansible-base 2.10 or newer and did not install Ansible 3.0.0, but installed (and/or upgraded) community.general manually, you need to make sure to also install ``community.postgresql`` if you are using any of the ``postgresql`` modules. While ansible-base 2.10 or newer can use the redirects that community.general 2.0.0 adds, the collection they point to (community.postgresql) must be installed for them to work.