Repository URL to install this package:
Version:
2.2.0.0 ▾
|
ansible
/
CHANGELOG.md
|
---|
###Major Changes:
listen
feature for modules. This feature allows tasks to more easily notify multiple handlers, as well as making it easier for handlers from decoupled roles to be notified.serial: [1, 5, 10]
), which allows for so-called "canary" actions in one play.meta
tasks can now use conditionals.raw
now returns changed: true
to be consistent with shell/command/script modules. Add changed_when: false
to raw
tasks to restore the pre-2.2 behavior if necessary.nksu
async:
support for long-running or background tasks.environment:
support for setting module environment vars in play/task.meta
option: end_play
, which can be used to skip to the end of a play.include_role
module, this also allows for making the role import 'loopable' and/or conditional.async:
support for long-running or background tasks.environment:
support for setting module environment vars in play/task.####New Modules:
####New Callbacks:
###Minor Changes:
ksu
raw
now returns changed: true
to be consistent with shell/command/script modules. Add changed_when: false
to raw
tasks to restore the pre-2.2 behavior if necessary.###For custom front ends using the API:
ansible-vault rekey [filename]
to move to VaultAES256.###Removed Deprecated:
{{ }}
or they will be considered as plain strings.|default
to avoid errors.###Deprecations Notice given that the following will be removed in Ansible 2.4:
###Minor Changes:
hosts
of a play resulted in an list of lists (#16583)float
(no issue)Module fixes:
###Deprecations:
_fixup_perms
. Use _fixup_perms2
instead.
This change only impacts custom action plugins using _fixup_perms
.###Incompatible Changes:
_fixup_perms
with recursive=True
(the default) is no longer supported.
Custom action plugins using _fixup_perms
will require changes unless they already use recursive=False
.
Use _fixup_perms2
if support for previous releases is not required.
Otherwise use _fixup_perms
with recursive=False
.###Deprecations:
_fixup_perms
. Use _fixup_perms2
instead.
This change only impacts custom action plugins using _fixup_perms
.###Incompatible Changes:
_fixup_perms
with recursive=True
(the default) is no longer supported.
Custom action plugins using _fixup_perms
will require changes unless they already use recursive=False
.
Use _fixup_perms2
if support for previous releases is not required.
Otherwise use _fixup_perms
with recursive=False
.###Major Changes:
debug
, which allows per-task debugging of playbooks, for more details see https://docs.ansible.com/ansible/playbooks_debugger.htmlloop_control
. This currently only supports one option - loop_var
, which allows a different loop variable from item
to be used.gather_subset
option on the play or in the ansible.cfg configuration file.
See http://docs.ansible.com/ansible/intro_configuration.html#gathering for details on the format of the option.rescue
portion of a block
is started:
ansible_failed_task
, which contains the serialized version of the failed task.ansible_failed_result
, which contains the result of the failed task.meta: clear_host_errors
which will clear any hosts which were marked as failed (but not unreachable hosts).meta: clear_facts
which will remove existing facts for the current host from current memory and facts cache.####New Modules:
####New Strategies:
####New Filters:
####New Callbacks:
####New Tests:
####New Inventory scripts:
###Minor Changes:
foo: !unsafe "Don't template {{me}}"
.<host>:/<mount>
###Deprecations:
with_items: foo
, where foo
is a variable).
The full jinja2 variable syntax of {{foo}}
should always be used instead. This warning will be removed
completely in 2.3, after which time it will be an error.###Major Changes:
Releases are now named after Led Zeppelin songs, 1.9 will be the last Van Halen named release.
The new block/rescue/always directives allow for making task blocks and exception-like semantics
New strategy plugins (e.g. free
) allow control over the flow of task execution per play. The default (linear
) will be the same as before.
Improved error handling, with more detailed parser messages. General exception handling and display has been revamped.
Task includes are now evaluated during execution, allowing more dynamic includes and options. Play includes are unchanged both still use the include
directive.
"with_" loops can now be used with task includes since they are dynamic.
Callback, connection, cache and lookup plugin APIs have changed. Existing plugins might require modification to work with the new versions.
Callbacks are now shipped in the active directory and don't need to be copied, just whitelisted in ansible.cfg.
Many API changes. Those integrating directly with Ansible's API will encounter breaking changes, but the new API is much easier to use and test.
Settings are now more inheritable; what you set at play, block or role will be automatically inherited by the contained tasks. This allows for new features to automatically be settable at all levels, previously we had to manually code this.
Vars are now settable at play, block, role and task level with the vars
directive and scoped to the tasks contained.
Template code now retains types for bools and numbers instead of turning them into strings. If you need the old behaviour, quote the value and it will get passed around as a string
Empty variables and variables set to null in yaml will no longer be converted to empty strings. They will retain the value of None
.
To go back to the old behaviour, you can override the null_representation
setting to an empty string in your config file or
by setting the ANSIBLE_NULL_REPRESENTATION
environment variable.
Added meta: refresh_inventory
to force rereading the inventory in a play.
This re-executes inventory scripts, but does not force them to ignore any cache they might use.
New delegate_facts directive, a boolean that allows you to apply facts to the delegated host (true/yes) instead of the inventory_hostname (no/false) which is the default and previous behaviour.
local connections now work with 'su' as a privilege escalation method
Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host, and ansible_port.
New ssh configuration variables (ansible_ssh_common_args
, ansible_ssh_extra_args
) can be used to configure a
per-group or per-host ssh ProxyCommand or set any other ssh options.
ansible_ssh_extra_args
is used to set options that are accepted only by ssh (not sftp or scp, which have their own analogous settings).
ansible-pull can now verify the code it runs when using git as a source repository, using git's code signing and verification features.
Backslashes used when specifying parameters in jinja2 expressions in YAML dicts sometimes needed to be escaped twice. This has been fixed so that escaping once works. Here's an example of how playbooks need to be modified:
# Syntax in 1.9.x
- debug:
msg: "{{ 'test1_junk 1\\\\3' | regex_replace('(.*)_junk (.*)', '\\\\1 \\\\2') }}"
# Syntax in 2.0.x
- debug:
msg: "{{ 'test1_junk 1\\3' | regex_replace('(.*)_junk (.*)', '\\1 \\2') }}"
# Output:
"msg": "test1 1\\3"
When a string with a trailing newline was specified in the playbook via yaml dict format, the trailing newline was stripped. When specified in key=value format the trailing newlines were kept. In v2, both methods of specifying the string will keep the trailing newlines. If you relied on the trailing newline being stripped you can change your playbook like this:
# Syntax in 1.9.2
vars:
message: >
Testing
some things
tasks:
- debug:
msg: "{{ message }}"
# Syntax in 2.0.x
vars:
old_message: >
Testing
some things
message: "{{ old_messsage[:-1] }}"
- debug:
msg: "{{ message }}"
# Output
"msg": "Testing some things"
When specifying complex args as a variable, the variable must use the full jinja2 variable syntax ('{{var_name}}') - bare variable names there are no longer accepted. In fact, even specifying args with variables has been deprecated, and will not be allowed in future versions:
---
- hosts: localhost
connection: local
gather_facts: false
vars:
my_dirs:
- { path: /tmp/3a, state: directory, mode: 0755 }
- { path: /tmp/3b, state: directory, mode: 0700 }
tasks:
- file:
args: "{{item}}"
with_items: my_dirs
###Plugins
ansible_winrm_*
to the underlying pywinrm client. This allows, for instance, ansible_winrm_server_cert_validation=ignore
to be used with newer versions of pywinrm to disable certificate validation on Python 2.7.9+.####Deprecated Modules (new ones in parens):
####New Modules:
####New Inventory scripts:
####New Lookups:
####New Filters:
####New Connection:
####New Callbacks:
###Minor changes:
Many more tests. The new API makes things more testable and we took advantage of it.
big_ip modules now support turning off ssl certificate validation (use only for self-signed certificates).
Consolidated code from modules using urllib2 to normalize features, TLS and SNI support.
synchronize module's dest_port parameter now takes precedence over the ansible_ssh_port inventory setting.
Play output is now dynamically sized to terminal with a minimum of 80 coluumns (old default).
vars_prompt and pause are now skipped with a warning if the play is called noninteractively (i.e. pull from cron).
Support for OpenBSD's 'doas' privilege escalation method.
Most vault operations can now be done over multilple files.
ansible-vault encrypt/decrypt read from stdin if no other input file is given, and can write to a given --output file
(including stdout, '-').
This lets you avoid ever writing sensitive plaintext to disk.
ansible-vault rekey accepts the --new-vault-password-file option.
ansible-vault now preserves file permissions on edit and rekey and defaults to restrictive permissions for other options.
Configuration items defined as paths (local only) now all support shell style interpolations.
Many fixes and new options added to modules, too many to list here.
Now you can see task file and line number when using verbosity of 3 or above.
The [x-y]
host range syntax is no longer supported. Note that [0:1]
matches two hosts, i.e. the range is inclusive of its endpoints.
We now recommend the use of pattern1,pattern2
to combine host matching patterns.
modules and callbacks have been extended to support no_log to avoid data disclosure.
new managed_syslog option has been added to control output to syslog on managed machines, no_log supersedes this settings.
Lookup, vars and action plugin pathing has been normalized, all now follow the same sequence to find relative files.
We do not ignore the explicitly set login user for ssh when it matches the 'current user' anymore, this allows overriding .ssh/config when it is set explicitly. Leaving it unset will still use the same user and respect .ssh/config. This also means ansible_ssh_user can now return a None value.
environment variables passed to remote shells now default to 'controller' settings, with fallback to en_US.UTF8 which was the previous default.
add_hosts is much stricter about host name and will prevent invalid names from being added.
ansible-pull now defaults to doing shallow checkouts with git, use --full
to return to previous behaviour.
random cows are more random
when: now gets the registered var after the first iteration, making it possible to break out of item loops
Handling of undefined variables has changed. In most places they will now raise an error instead of silently injecting an empty string. Use the default filter if you want to approximate the old behaviour:
- debug: msg="The error message was: {{error_code |default('') }}"
Major changes:
New Modules:
New Filters:
Other Notable Changes:
New lookup plugins:
New callback plugins:
Many new enhancements to the amazon web service modules:
Many new docker improvements:
Several source control modules had force parameters that defaulted to true. These have been changed to default to false so as not to accidentally lose work. Playbooks that depended on the former behaviour simply need to add force=True to the task that needs it. Affected modules:
New inventory scripts:
gce gained the ip_forward parameter to forward ip packets
disk_auto_delete parameter to gce that will remove the boot disk after an instance is destroyed
gce can now spawn instances with no external ip
gce_pd gained the ability to choose a disk type
gce_net gained target_tags parameter for creating firewall rules
rax module has new parameters for making use of a boot volume
Add scheduler_hints to the nova_compute module for optional parameters
vsphere_guest now supports deploying guests from a template
Many fixes for hardlink and softlink handling in file-related modules
Implement user, group, mode, and selinux parameters for the unarchive module
authorized_keys can now use url as a key source
authorized_keys has a new exclusive parameter that determines if keys that weren't specified in the task
The selinux module now sets the current running state to permissive if state='disabled'
Can now set accounts to expire via the user module
Overhaul of the service module to make code simpler and behave better for systems running several popular init systems
yum module now has a parameter to refresh its cache of package metadata
apt module gained a build_dep parameter to install a package's build dependencies
Add parameters to the postgres modules to specify a unix socket to connect to the db
The mount module now supports bind mounts
Add a clone parameter to git module that allows you to get information about a remote repo even if it doesn't exist locally.
Add a refspec argument to the git module that allows pulling commits that aren't part of a branch
Many documentation additions and fixes.
Various bug fixes for packaging issues related to modules.
Various bug fixes for lookup plugins.
Various bug fixes for some modules (continued cleanup of postgresql issues, etc.).
Add a clone parameter to git module that allows you to get information about a remote repo even if it doesn't exist locally.
Major changes:
New Modules:
Some other notable changes:
recursive
parameter to handle submodules, ansible would track the
submodule upstream's head revision. This has been changed to checkout the
version of the submodule specified in the superproject's git repository.
This is inline with what git submodule update does. If you want the old
behaviour use the new module parameter track_submodules=yesAnd various other bug fixes and improvements ...
Major new features:
run_once: true
, meaning they will be executed exactly once. This can be combined with delegate_to to trigger actions you want done just the one time versus for every host in inventory.New inventory scripts:
New Modules:
Other notable changes:
Major features/changes:
accelerate_multi_key = yes
is specified in the ansible.cfg.New Modules:
Other notable changes:
Major features/changes:
New modules:
Other notable changes (many new module params & bugfixes may not be listed):
Highlighted new features:
New modules and plugins.
Plugins:
Misc changes (all module additions/fixes may not listed):
delimiter
field to the assemble module.ansible_env
to the list of facts returned by the setup module.state=touch
to the file module, which functions similarly to the command-line version of touch
.user:
parameter on plays to remote_user:
to prevent confusion with the module of the same name. Still backwards compatible on play parameters.Additional fixes for accelerate mode.
Multiple accelerate mode fixes:
Fixing a bug in accelerate mode whereby the gather_facts step would always be run via sudo regardless of the play settings.
Highlighted new features:
New modules:
Misc changes:
Core Features:
Modules added:
Modules removed
Bugfixes and Misc Changes:
Core Features
Modules Added:
Bugfixes and Misc Changes:
Facts:
Module Changes/Fixes:
Plugins:
New modules:
New config settings:
New playbook/language features:
Module fixes and new flags:
Core fixes and new behaviors:
Inventory files/scripts:
Highlighted core changes:
Other core changes:
Playbook changes:
Module additions:
Module changes:
Plugin changes:
Highlighted Core Changes:
Other Core Changes:
Highlighted playbook changes:
Other playbook changes:
New Modules:
Other module Changes, Upgrades, and Fixes:
Module changes:
Core changes:
Playbooks:
playbooks:
inventory:
modules:
internals:
Internals/Core
Inventory
Playbooks
Incompatible Changes
Module Changes
Misc Bugfixes