Skip to content

Commit

Permalink
[WIP] Backport/2.7/second batch (ansible#45927)
Browse files Browse the repository at this point in the history
* Update influxdb_database.py (ansible#39984)
(cherry picked from commit 049a462)

* Link to the Galaxy platforms list from the meta file template (ansible#34046)
(cherry picked from commit fa18d45)

* fix gce_backend_service examples for healthchecks (ansible#31134)
(cherry picked from commit e26d758)

* Clarify the creates and removes options (ansible#45485)
(cherry picked from commit bf90a44)

* lineinfile note belongs in changelog for 2.6, not 2.7 (ansible#45517)
(cherry picked from commit 228fee4)

* Update keycloak_client.py (ansible#43547)
(cherry picked from commit cb460de)

* The keyword 'cloud' has been deprecated in favor of the 'profile' keyword by os-client-config. (ansible#31389)
(cherry picked from commit 17ca0a9)

* Clarified documentation for the unsafe_writes option (ansible#27471)
(cherry picked from commit dd5d191)
  • Loading branch information
samccann authored and acozine committed Sep 20, 2018
1 parent bf09c86 commit 0c81145
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 23 deletions.
2 changes: 1 addition & 1 deletion contrib/inventory/openstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ clouds:
username: fb886a9b-c37b-442a-9be3-964bed961e04
password: fantastic-password1
rax:
cloud: rackspace
profile: rackspace
auth:
username: example
password: spectacular-password
Expand Down
7 changes: 5 additions & 2 deletions docs/docsite/rst/porting_guides/porting_guide_2.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Deprecated
Modules
=======

Major changes in popular modules are detailed here

Major changes in popular modules are detailed here:


Modules removed
Expand Down Expand Up @@ -74,6 +73,10 @@ Noteworthy module changes
* The ``k8s`` module will not automatically change ``Project`` creation requests into ``ProjectRequest`` creation requests as the ``openshift_raw`` module did. You must now specify the ``ProjectRequest`` kind explicitly.
* The ``k8s`` module will not automatically remove secrets from the Ansible return values (and by extension the log). In order to prevent secret values in a task from being logged, specify the ``no_log`` parameter on the task block.
* The ``k8s_scale`` module now supports scalable OpenShift objects, such as ``DeploymentConfig``.
* The ``lineinfile`` module was changed to show a warning when using an empty string as a regexp.
Since an empty regexp matches every line in a file, it will replace the last line in a file rather
than inserting. If this is the desired behavior, use ``'^'`` which will match every line and
will not trigger the warning.
* Openstack modules are no longer using ``shade`` library. Instead ``openstacksdk`` is used. Since ``openstacksdk`` should be already present as a dependency to ``shade`` no additional actions are required.

Plugins
Expand Down
6 changes: 0 additions & 6 deletions docs/docsite/rst/porting_guides/porting_guide_2.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ Major changes in popular modules are detailed here
:ref:`DEFAULT_SYSLOG_FACILITY`. If you have :ref:`DEFAULT_SYSLOG_FACILITY` configured, the
location of remote logs on systems which use journald may change.

* The ``lineinfile`` module was changed to show a warning when using an empty string as a regexp.
Since an empty regexp matches every line in a file, it will replace the last line in a file rather
than inserting. If this is the desired behavior, use ``'^'`` which will match every line and
will not trigger the warning.


Modules removed
---------------

Expand Down
5 changes: 4 additions & 1 deletion lib/ansible/galaxy/data/container/meta/main.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ galaxy_info:
#github_branch:

#
# platforms is a list of platforms, and each platform has a name and a list of versions.
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
Expand Down
5 changes: 4 additions & 1 deletion lib/ansible/galaxy/data/default/meta/main.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ galaxy_info:
#github_branch:

#
# platforms is a list of platforms, and each platform has a name and a list of versions.
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/cloud/google/gcp_backend_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
backends:
- instance_group: managed_instance_group_1
healthchecks:
- name: healthcheck_name_for_backend_service
- healthcheck_name_for_backend_service
port_name: myhttpport
state: present
Expand All @@ -104,7 +104,7 @@
max_utilization: 0.5
max_rate: 4
healthchecks:
- name: healthcheck_name_for_backend_service
- healthcheck_name_for_backend_service
port_name: myhttpport
state: present
timeout: 60
Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
version_added: "2.6"
creates:
description:
- A filename or (since 2.0) glob pattern, when it already exists, this step will B(not) be run.
- A filename or (since 2.0) glob pattern. If it already exists, this step B(won't) be run.
removes:
description:
- A filename or (since 2.0) glob pattern, when it does not exist, this step will B(not) be run.
- A filename or (since 2.0) glob pattern. If it already exists, this step B(will) be run.
version_added: "0.8"
chdir:
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/database/influxdb/influxdb_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author: "Kamil Szczygiel (@kamsz)"
requirements:
- "python >= 2.6"
- "influxdb >= 0.9"
- "influxdb >= 0.9 & <= 1.2.4"
- requests
options:
database_name:
Expand Down
4 changes: 4 additions & 0 deletions lib/ansible/modules/identity/keycloak/keycloak_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
choices: ['present', 'absent']
default: 'present'
realm:
description:
- The realm to create the client in.
client_id:
description:
- Client id of client to be worked on. This is usually an alphanumeric name chosen by
Expand Down
12 changes: 7 additions & 5 deletions lib/ansible/utils/module_docs_fragments/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ class ModuleDocFragment(object):
default: "s0"
unsafe_writes:
description:
- Normally this module uses atomic operations to prevent data corruption or inconsistent reads from the target files,
sometimes systems are configured or just broken in ways that prevent this. One example are docker mounted files,
they cannot be updated atomically and can only be done in an unsafe manner.
- This boolean option allows ansible to fall back to unsafe methods of updating files for those cases in which you do
not have any other choice. Be aware that this is subject to race conditions and can lead to data corruption.
- By default this module uses atomic operations to prevent data
corruption or inconsistent reads from the target files,
but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files,
which cannot be updated atomically from inside the container and can only be written in an unsafe manner.
- This option allows Ansible to fall back to unsafe methods of
updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes).
IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption.
type: bool
default: 'no'
version_added: "2.2"
Expand Down
1 change: 0 additions & 1 deletion test/sanity/validate-modules/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ lib/ansible/modules/files/synchronize.py E325
lib/ansible/modules/files/synchronize.py E327
lib/ansible/modules/files/unarchive.py E323
lib/ansible/modules/identity/cyberark/cyberark_user.py E324
lib/ansible/modules/identity/keycloak/keycloak_client.py E322
lib/ansible/modules/identity/keycloak/keycloak_client.py E324
lib/ansible/modules/identity/keycloak/keycloak_client.py E325
lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py E324
Expand Down
5 changes: 4 additions & 1 deletion test/units/cli/test_data/role_skeleton/meta/main.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ galaxy_info:
#github_branch:

#
# platforms is a list of platforms, and each platform has a name and a list of versions.
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
Expand Down

0 comments on commit 0c81145

Please sign in to comment.