mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixed formating issues with rst
This commit is contained in:
parent
8db2912745
commit
0a112a1b06
1 changed files with 21 additions and 23 deletions
|
@ -56,12 +56,11 @@ uses key=value escaping which has not changed. The other option is to check for
|
||||||
"msg": "Testing some things"
|
"msg": "Testing some things"
|
||||||
|
|
||||||
* porting task includes
|
* porting task includes
|
||||||
* More dynamic. Corner-case formats that were not supposed to work now do not, as expected.
|
* More dynamic. Corner-case formats that were not supposed to work now do not, as expected.
|
||||||
* variables defined in the yaml dict format https://github.com/ansible/ansible/issues/13324
|
* variables defined in the yaml dict format https://github.com/ansible/ansible/issues/13324
|
||||||
* variable precedence
|
|
||||||
* templating (variables in playbooks and template lookups) has improved with regard to keeping the original instead of turning everything into a string.
|
* templating (variables in playbooks and template lookups) has improved with regard to keeping the original instead of turning everything into a string.
|
||||||
If you need the old behavior, quote the value to pass it around as a string.
|
If you need the old behavior, quote the value to pass it around as a string.
|
||||||
Empty variables and variables set to null in yaml are no longer converted to empty strings. They will retain the value of `None`.
|
* Empty variables and variables set to null in yaml are no longer converted to empty strings. They will retain the value of `None`.
|
||||||
You can override the `null_representation` setting to an empty string in your config file by setting the `ANSIBLE_NULL_REPRESENTATION` environment variable.
|
You can override the `null_representation` setting to an empty string in your config file by setting the `ANSIBLE_NULL_REPRESENTATION` environment variable.
|
||||||
* Extras callbacks must be whitelisted in ansible.cfg. Copying is no longer necessary but whitelisting in ansible.cfg must be completed.
|
* Extras callbacks must be whitelisted in ansible.cfg. Copying is no longer necessary but whitelisting in ansible.cfg must be completed.
|
||||||
* dnf module has been rewritten. Some minor changes in behavior may be observed.
|
* dnf module has been rewritten. Some minor changes in behavior may be observed.
|
||||||
|
@ -72,26 +71,26 @@ Deprecated
|
||||||
|
|
||||||
While all items listed here will show a deprecation warning message, they still work as they did in 1.9.x. Please note that they will be removed in 2.2 (Ansible always waits two major releases to remove a deprecated feature).
|
While all items listed here will show a deprecation warning message, they still work as they did in 1.9.x. Please note that they will be removed in 2.2 (Ansible always waits two major releases to remove a deprecated feature).
|
||||||
|
|
||||||
* Bare variables in with_ loops should instead use the “{{var}}” syntax, which helps eliminate ambiguity.
|
* Bare variables in `with_` loops should instead use the “{{var}}” syntax, which helps eliminate ambiguity.
|
||||||
* The ansible-galaxy text format requirements file. Users should use the YAML format for requirements instead.
|
* The ansible-galaxy text format requirements file. Users should use the YAML format for requirements instead.
|
||||||
* Undefined variables within a with_ loop’s list currently do not interrupt the loop, but they do issue a warning; in the future, they will issue an error.
|
* Undefined variables within a `with_` loop’s list currently do not interrupt the loop, but they do issue a warning; in the future, they will issue an error.
|
||||||
* Using variables for task parameters is unsafe and will be removed in a future version. For example::
|
* Using variables for task parameters is unsafe and will be removed in a future version. For example::
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
vars:
|
vars:
|
||||||
debug_params:
|
debug_params:
|
||||||
msg: "hello there"
|
msg: "hello there"
|
||||||
tasks:
|
tasks:
|
||||||
- debug: "{{debug_params}}"
|
- debug: "{{debug_params}}"
|
||||||
|
|
||||||
* Host patterns should use a comma (,) or colon (:) instead of a semicolon (;) to separate hosts/groups in the pattern.
|
* Host patterns should use a comma (,) or colon (:) instead of a semicolon (;) to separate hosts/groups in the pattern.
|
||||||
* Ranges specified in host patterns should use the [x:y] syntax, instead of [x-y].
|
* Ranges specified in host patterns should use the [x:y] syntax, instead of [x-y].
|
||||||
* Playbooks using privilege escalation should always use “become*” options rather than the old su*/sudo* options.
|
* Playbooks using privilege escalation should always use “become*” options rather than the old su*/sudo* options.
|
||||||
* The “short form” for vars_prompt is no longer supported.
|
* The “short form” for vars_prompt is no longer supported.
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
vars_prompt:
|
vars_prompt:
|
||||||
variable_name: "Prompt string"
|
variable_name: "Prompt string"
|
||||||
|
|
||||||
* Specifying variables at the top level of a task include statement is no longer supported. For example::
|
* Specifying variables at the top level of a task include statement is no longer supported. For example::
|
||||||
|
@ -101,21 +100,21 @@ vars_prompt:
|
||||||
|
|
||||||
Should now be::
|
Should now be::
|
||||||
|
|
||||||
- include: foo.yml
|
- include: foo.yml
|
||||||
args:
|
args:
|
||||||
a: 1
|
a: 1
|
||||||
|
|
||||||
* Setting any_errors_fatal on a task is no longer supported. This should be set at the play level only.
|
* Setting any_errors_fatal on a task is no longer supported. This should be set at the play level only.
|
||||||
* Bare variables in the `environment` dictionary (for plays/tasks/etc.) are no longer supported. Variables specified there should use the full variable syntax: ‘{{foo}}’.
|
* Bare variables in the `environment` dictionary (for plays/tasks/etc.) are no longer supported. Variables specified there should use the full variable syntax: ‘{{foo}}’.
|
||||||
* Tags should no longer be specified with other parameters in a task include. Instead, they should be specified as an option on the task.
|
* Tags should no longer be specified with other parameters in a task include. Instead, they should be specified as an option on the task.
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
- include: foo.yml tags=a,b,c
|
- include: foo.yml tags=a,b,c
|
||||||
|
|
||||||
Should be::
|
Should be::
|
||||||
|
|
||||||
- include: foo.yml
|
- include: foo.yml
|
||||||
tags: [a, b, c]
|
tags: [a, b, c]
|
||||||
|
|
||||||
* The first_available_file option on tasks has been deprecated. Users should use the with_first_found option or lookup (‘first_found’, …) plugin.
|
* The first_available_file option on tasks has been deprecated. Users should use the with_first_found option or lookup (‘first_found’, …) plugin.
|
||||||
|
|
||||||
|
@ -125,7 +124,6 @@ Porting plugins
|
||||||
|
|
||||||
In ansible-1.9.x, you would generally copy an existing plugin to create a new one. Simply implementing the methods and attributes that the caller of the plugin expected made it a plugin of that type. In ansible-2.0, most plugins are implemented by subclassing a base class for each plugin type. This way the custom plugin does not need to contain methods which are not customized.
|
In ansible-1.9.x, you would generally copy an existing plugin to create a new one. Simply implementing the methods and attributes that the caller of the plugin expected made it a plugin of that type. In ansible-2.0, most plugins are implemented by subclassing a base class for each plugin type. This way the custom plugin does not need to contain methods which are not customized.
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Lookup plugins
|
Lookup plugins
|
||||||
--------------
|
--------------
|
||||||
|
|
Loading…
Reference in a new issue