Compare commits

...

170 Commits

Author SHA1 Message Date
1a6fe6cc05 New release v2.6.1 2018-07-05 11:48:35 -07:00
e433f82fc2 callback/grafana_annotations: define validate_grafana_certs type as bool (#42318)
Fixes #42317
2018-07-05 08:39:53 -07:00
56cca2a312 Allow documentation of module options type (#42285)
* Allow documentation of module options

Pass through the `type` of a modules option so it's displayed on the
html module docs

* docs

(cherry picked from commit d962611528)
2018-07-05 08:36:17 -07:00
ffd660f2d7 Fix broken links. (#42323)
(cherry picked from commit df2e0c7c00)
2018-07-05 08:33:25 -07:00
1e427b1b34 Fix Ansible Galaxy documentation link. (#42316)
More info: https://github.com/ansible/galaxy/issues/830
(cherry picked from commit 1dafd92c8e)
2018-07-05 07:40:40 -07:00
e65f7d218d win_domain: fix typo in cmdlet call (#41993)
(cherry picked from commit 77526a5036)
2018-07-03 15:22:08 -07:00
1024f53ffd Win group membership sid refactor 2.6 (#41990)
* Refactor/fix win_group_membership to use SIDs for internal comparisons (#40725)

* refactor win_group_membership to use SIDs for comparisons instead of name parsing

* carry over previous doc cleanup changes

* remove trailing whitespace from docs

(cherry picked from commit bcb49f2575)

* Added changelog fragment
2018-07-03 15:21:21 -07:00
4cecbe81ad [stable-2.6] ignore ansible.cfg in world writable cwd (#42070)
* ignore ansible.cfg in world writable cwd
 * also added 'warnings' to config
 * updated man page template
(cherry picked from commit b6f2aad)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-03 15:19:59 -07:00
25ee10cd9a [stable-2.6] Fix file module with check_mode - Fixes #42111 (#42115)
* Fix file module check_mode
(cherry picked from commit 22a6927)

Co-authored-by: Sloane Hertel <shertel@redhat.com>
2018-07-03 15:18:46 -07:00
e6aac0e1ff pamd module regression fix (#42025)
* pamd: typo fix sufficicent->sufficient

* pamd: is_valid is a property, not a method; return a tuple

* pamd: define is_valid for all PamdLine classes

* pamd: use validate() for verbose errors, define generically

* pamd: PamdRule: rule_control is always str, use _control

Fixes https://github.com/ansible/ansible/issues/41179
2018-07-03 15:09:59 -07:00
d1a92f85d2 Update changelog 2018-07-03 15:09:16 -07:00
1bf1af8dde Fix junos_config confirm commit issue (#41527)
* Fix junos_config confirm commit issue

Fixes #40626

* Due to issue in ncclient commit() method for Juniper
  device (ncclient/ncclient#238)
  add a workaround in junos netconf plugin to generate proper
  commit-configuration xml and execute it using ncclient
  generic `rpc()` method.

* Update junos_config doc

(cherry picked from commit 88b966e23b)
2018-07-03 15:09:16 -07:00
149acedf6d Corrects typos in net_get/put module docs 2018-07-03 15:08:16 -07:00
851725d72a Fix setting required options for inventory plugins - backport/2.6/42049 (#42120)
* Fix setting required options for inventory plugins (#42049)

* Fix setting required options for inventory plugins

* call set_options for yaml and script plugin

(cherry picked from commit 44e5886385)

* changelog
2018-07-03 15:07:35 -07:00
3cbf319ee7 Update supervisorctl.py (#42031)
<!--- Your description here -->

+label: docsite_pr

(cherry picked from commit 5ea414422b)
2018-07-03 15:06:15 -07:00
1f80949f96 [stable-2.6] avoid loading vars on unspecified basedir (cwd) (#42067)
* avoid loading vars on unspecified basedir (cwd)
(cherry picked from commit de0e11c)

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2018-07-03 15:03:52 -07:00
ed26ee73ff Restore BOOLEANS import in basic.py (#42008)
This import was removed by mistake. This is required for backward
compatibility.

Fixes: #41988

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-03 14:58:03 -07:00
e436806e91 Change idempotency check to be single pass (#42087)
- Previously all data between both data structures was compared
- Results in situations where updates are done when not needed
- Changes to single pass so only data in payload is compared

(cherry picked from commit 3ee3fc893d)
2018-07-03 14:57:14 -07:00
d2b447e8a1 Fixes idempotency check for partial configurations (#41941)
- Previous PR would overwrite new and existing values improperly

(cherry picked from commit 7ab3f755ce)
2018-07-03 14:55:43 -07:00
4226fb6e1a nsupdate_fix_hmac-sha384 2018-07-03 10:19:34 -07:00
975d93b4e8 nsupdate.py: Fix typo (#42209)
Signed-off-by: David Galloway <dgallowa@redhat.com>
(cherry picked from commit 9539284010)
2018-07-03 10:19:34 -07:00
587a920d50 [2.6] Add CoC and mailing lists links to PYPI
PR #42101
(cherry picked from commit fc25d28)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2018-07-02 13:48:50 -07:00
f2af5e0053 Fix some broken links (#42079)
* Fix some broken links

* We now only serve via https
* redirects don't work with anchors, so update those links (devel/dev_guide)

(cherry picked from commit e9dbebfa57)
2018-06-29 15:30:49 -07:00
8ba4f23290 Format fix on VMware Guide (#41272)
* Updating format of VMware Guide: small formatting error - hyperlink to module
(cherry picked from commit 91803c6ad3)
2018-06-29 11:29:34 -07:00
84f28cbf3b VMware: Add scenario guide (#40075)
This adds a scenario guide for vmware

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 19ece7b740)
2018-06-29 11:29:09 -07:00
3012c3c0b8 Documentation: add parameter types, and version_added for return values and facts (#41999)
* Add types for parameters.

* Add version_added for return facts and return values.

(cherry picked from commit fb0b804988)
2018-06-29 11:28:24 -07:00
7b816a072f updates docs links to changelogs (#41289)
* updates docs links to changelogs for all versions

* updates latest 2.5 release

(cherry picked from commit e0a9a71b04)
2018-06-29 11:26:05 -07:00
fdf78dc34f Update Ansible release version to 2.6.0.dev0. 2018-06-28 19:09:28 -07:00
8ce3bd6dea New release v2.6.0 2018-06-28 14:38:38 -07:00
f91fb2ea5e Update Ansible release version to 2.6.0rc5.dev0. 2018-06-26 21:40:49 -07:00
478ab3f8b1 New release v2.6.0rc5 2018-06-26 18:33:36 -07:00
bd1ecd016b Backport #41767 for 2.6 - Skip if insertbefore is using BOF until later in the module (#41929)
* Skip if insertbefore BOF until later (#41767)

If a line match is found in the file and no regexp is specified, insertbefore would improperly try to add a line if set to BOF.

Add tests for this scenario.

(cherry picked from commit eaae1318f8)

* Add changelog fragment
2018-06-26 14:02:38 -07:00
08e016780b Backport #41860 for 2.6 - support group_by with implicit localhost (#41927)
* Use inventory.get_host instead of direct access to inventory.hosts (#41860)

* Use inventory.get_host instead of direct access to inventory.hosts. Fixes #32152

* Prevent potential side effect, by using self._inventory.localhost directly instead of get_host

(cherry picked from commit 1a2ef0922f)

* Add changelog for #41860
2018-06-26 13:49:26 -07:00
c15f99f95a Backport #41907 for 2.6 - fix password lookup loading (#41928)
* Don't import password lookup from network filters. Fixes #41874 (#41907)

(cherry picked from commit 93537425a0)

* Add changelog for #41907
2018-06-26 13:48:09 -07:00
cfb4a8236f win_iis_webapppool: do not output some cmdlet outputs (#41884)
(cherry picked from commit abfcc35e6f)
2018-06-26 13:44:38 -07:00
12d15b7dd6 [stable-2.6] Changes to support building docs with old jinja2
This commit: fa5c0282a4 relied upon
features present in Jinja-2.10 and above.  The changes here allow us to
build the *rst* with older versions of jinja2.
(cherry picked from commit ad2e8dd)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-26 13:43:06 -07:00
f9c17f6337 Fix rabbitmq_* integration tests (#41836)
(cherry picked from commit a8d4bf8642)
2018-06-26 13:42:19 -07:00
b42a191095 Fix docs for all test. Fixes #41956 (#41965)
(cherry picked from commit 11ce954226)
2018-06-26 13:40:13 -07:00
701d61531c Fix broken Azure dependencies in 2.6 (#41946)
* fixed requirements
* module fix
* updated test accordingly
* mysql & postgresl fixes
* upgraded databases
* removed test from ignore.txt
* updated mysql & postgresql tests
2018-06-26 13:37:23 -07:00
0f477d1318 options should be settable multiple times
(cherry picked from commit 27e3cd6e05)
2018-06-26 13:33:36 -07:00
a96f456ac2 Update Ansible release version to 2.6.0rc4.dev0. 2018-06-25 19:41:52 -07:00
9917d648e5 New release v2.6.0rc4 2018-06-25 16:22:04 -07:00
25ad5fa225 Stop displaying kinit pass input on a failure (#41882)
* Stop displaying kinit pass input on a failure

* Fixed up minor logic info and added tests

(cherry picked from commit 9b7b564d75)
2018-06-25 13:51:09 -07:00
8fafecc979 fix vars hostname fallback
also made it optimistic, rely on exceptions instead of copmlex if chains

(cherry picked from commit 11dbed1350)
2018-06-25 11:23:52 -07:00
1fe98e3066 windows dsc docs: fix missing colon in example (#41886)
(cherry picked from commit 0b2ec9b11c)
2018-06-25 10:31:18 -07:00
7cb2486fad Fix vyos_vlan aggregate issue & added tests (#41638)
* Fix vyos_vlan aggregate issue & Added tests

* Fix #2 for vyos_vlan aggregate issue

(cherry picked from commit 837c216587)
2018-06-21 18:36:51 -07:00
82b0ee21f7 exclude lookup_terms from config errors (#41740)
* exclude lookup_terms from config errors
* moved direct

(cherry picked from commit 0102e42272)
2018-06-21 18:26:39 -07:00
a3e16b1090 Marks select modules as stableinterface (#41741)
this is being required by customers so that they may adopt ansible
and F5's work in ansible.

(cherry picked from commit 58d857f235)
2018-06-21 18:23:52 -07:00
e3a1aef586 Fix wrong python keyword (followup to #36357) (#41067)
Also add tests around that code path
2018-06-21 18:19:41 -07:00
88d0e2a04a fix minor issues with debug and item labels (#41331)
* fix minor issues with debug and item labels

 - no more `item=None`, we always have a label now
 - debug should only show expected information, either msg= or the var in var=
 - also fixed method name, deprecated misleading _get_item

(cherry picked from commit 27c43daab8)
2018-06-21 16:58:57 -07:00
273fb57ea8 To fix eos_vrf failure when transport method is eapi (#41470) (#41771)
* To fix eos_vrf failure when transport method is eapi (#41470)

* resolve bug 40930

* resolve bug 40930

* to fix review comments

* to fix review comments

* reverting the changes based on review

(cherry picked from commit c989b62eef)

* adding changelog for backport
2018-06-21 16:20:46 -07:00
5e10424f31 Raise Exception in virtualbox inventory plugin
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 37293dec3d)
2018-06-21 16:16:54 -07:00
96896654bd added missing raise
(cherry picked from commit 89f169127b)
2018-06-21 16:16:01 -07:00
8ddb4c3b0d Backport 2.6: apt: fix apt-mark on debian6 (#41725)
* apt: fix apt-mark on debian6 (#41530)

(cherry picked from commit 2e68811c34)

* Add changelog/fragment
2018-06-21 16:15:10 -07:00
9ce55f7e94 win_updates fix when win_updates is run with async (#41756)
(cherry picked from commit 11bd3fd318)
2018-06-21 16:13:47 -07:00
4930710af2 handle groups correctly when they are 'null' (#41698)
* handle groups correctly when they are 'null'

 - even if defined as mapping but having no keys, objects shoudl still be processed correctly
 - also add ansilbe_verbosity to vars not to display in ansible-inventory

fixes #41692

(cherry picked from commit 05a49d6eb6)
2018-06-21 15:24:53 -07:00
d95cf17dd4 Scaleway inventory plugin: small improvements (#41642)
* scaleway inventory: token is mandatory

* scaleway inventory: mention exception in error

* scaleway inventory: remove print statement

* scaleway inventory: options don't need to be attr

* scaleway inventory: remove unused attr

(cherry picked from commit 3e6c76fc2e)
2018-06-21 15:16:55 -07:00
8ad8db42e3 Add proper response documentation
- Added response documentation for organizations
- Additional information is likely to be added later

(cherry picked from commit 57b589d152)
2018-06-21 15:13:37 -07:00
544c9e1f32 Remove notes since it's already specified in the doc fragment
(cherry picked from commit 12a4dd44b5)
2018-06-21 15:12:18 -07:00
933ca5a41b Improved support for parameter testing and checks for org_id (#41517)
(cherry picked from commit cccaf951fa)
2018-06-21 15:11:20 -07:00
d11a190349 [stable-2.6] Fix file state=touch not returning diff information
Fixes #41755
(cherry picked from commit 8bd245a)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-21 14:36:33 -07:00
3030625d1f Disable remaining failing rabbitmq_* tests.
(cherry picked from commit 5880404151)
2018-06-21 13:51:29 -07:00
79a415d4a0 Disable failing rabbitmq_plugin test.
(cherry picked from commit 00ab12dca2)
2018-06-21 12:53:53 -07:00
ed5e619083 Temporarily disable gem test on osx.
Disabled due to lack of newer TLS version support on the test system.

(cherry picked from commit dce708e63e)
2018-06-19 17:01:43 -07:00
1eeb1bbf7d Update Ansible release version to 2.6.0rc3.dev0. 2018-06-19 02:13:49 -07:00
f5a9e007ce New release v2.6.0rc3 2018-06-18 22:43:49 -07:00
6da22edb9e Fix openstack inventory script for multi-cloud case
The shift to openstacksdk left us with a bug in that when running bare
with --list, the cloud argument to get_one is None. We just need _one_
of the clouds to pull the cache settings, since they are global (yet,
we'll go back and fix this in sdk)

If it's None, just use get_all and grab the first one.
2018-06-18 15:22:15 -07:00
f58780fb28 facts: suse: Fix major version detection for SUSE (#41416)
When parsing the distribution files such as /etc/os-release, we extract
the full distribution version but not the major version. As such, the
ansible_distribution_major_version ends up being 'NA' whereas the
ansible_distribution_version contains the full version.

Before this patch we get this on openSUSE Leap 15

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "NA"}, "changed": false}

After this patch we get this

ansible -o localhost -m setup -a filter=ansible_distribution_major_version
localhost | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "15"}, "changed": false}

This also fixes the Tumbleweed distribution test to report a proper
major version and also adds a test for openSUSE Leap 15.0 to avoid
potential future regressions.

Fixes: #41410
(cherry picked from commit 1737b7be3e)
2018-06-18 15:03:29 -07:00
d66dc0dcf3 [stable-2.6] Add changelog for gce_net sort fix
https://github.com/ansible/ansible/pull/41567
(cherry picked from commit ad8142fc6d)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-18 15:02:10 -07:00
5dd90fb752 update play_context for reset_connection (#40866)
steps taken from lib/ansible/executor/task_executor.py

fixes: https://github.com/ansible/ansible/issues/27520
(cherry picked from commit 23fbe0ce8e)
2018-06-18 15:00:51 -07:00
ec87203d4b read scaleway option after the options have been set (#41259)
(cherry picked from commit 8047d97ffc)
2018-06-18 11:20:51 -07:00
ccf2d9c8cc conflict res after patching 2018-06-18 11:18:27 -07:00
3278ef4a6b fix nxos_linkagg issue (#41550)
* fix nxos_linkagg issue

* fix shippable

(cherry picked from commit 119e6d680b)
2018-06-18 11:16:48 -07:00
1a5ba963b6 [stable-2.6] Temporarily revert c119d54
There were bugs in this that needed to be resolved.  No time to get the
fix reviewed sufficiently for 2.6.0.

We'll get this into 2.7.0 and try to get this into 2.6.1 as well.

Will need the work done in https://github.com/ansible/ansible/pull/36218
when it does get merged.
(cherry picked from commit 5c614a59a6)

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2018-06-15 14:27:20 -07:00
bf1cc2f1f4 service_facts correct meaning of state for systemd service units (#40914)
* service_facts correct meaning of state for systemd service units

Fixes #40809

Previously this module used the commend `systemctl list-unit-files
--type=service` to query state of services but list-unit-files only
shows enabled vs disabled which is not what we want for "state"

Signed-off-by: Adam Miller <admiller@redhat.com>

* make sure to define service_name before referencing it

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-15 12:22:26 -07:00
f9f368f123 skip winrm unit tests if winrm is not installed (#41596)
(cherry picked from commit b01779ad18)
2018-06-15 12:21:16 -07:00
8a0f575981 [2.6] Update user module docs (#41572)
* Clarify append and groups behavior
* Document return values
(cherry picked from commit 6fa2d9a)

Co-authored-by: Sam Doran <sdoran@redhat.com>
2018-06-15 12:20:43 -07:00
aa6954e4ee [stable-2.6] sort the port list properly (.sort() returns None)
(cherry picked from commit 63f2ad8776)

Co-authored-by: schp <schonhofen@gmail.com>
2018-06-15 12:19:58 -07:00
dcfea7d822 fix nxos edit_config for httpapi and have uniform load_config (#41358)
* fix nxos load_config for httpapi and migrate to cliconf

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* address review comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* address review comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit f170298332)
2018-06-14 13:26:05 -07:00
09aae2e33d don't retrieve config in running_config when config is provided for diff (#41400)
* don't retrieve config in running_config when config is provided for diff

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix for eos, nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8ab0d654f3)
2018-06-14 13:26:05 -07:00
b6ec3242fd Fix typos in blocks documentation examples. (#41508)
(cherry picked from commit a4f49ed648)
2018-06-14 07:51:17 -07:00
0f50c2f1d7 fix handling of ># ending prompts for sros (#41382) 2018-06-13 14:45:41 -07:00
70f4f89178 Bkprt no log fix (#41452)
* no_log even when task_result doesn't provide key

 - now also checks task property
 - added reproducer to tests for unreachable status on item loop

(cherry picked from commit 336b3762b2)

* Add changelog entry for the no_log fix

(cherry picked from commit 5fdd101a3e)

* Tasks that are expected to fail need to begin with a special string

(cherry picked from commit a5fd86cf6d)
2018-06-13 14:45:06 -07:00
6cdc3ac057 iosxr_config crash if config has route-policy with multiple levels of… (#41490)
* iosxr_config crash if config has route-policy with multiple levels of 'ifelseif' and other caveats (#41091)

* diff in as-path-set or prefix-set

* fix caveat diff can not have last line with comma in prefix-set/as-path/community-set

* Simplify fix to include indentation before parse

* remove debugger

* route-policy diffs

* fix iosxr_config crash issue

* new changes in iosxr_config after git add

* end-policy-map and end-class-map are properly indented so match misplaced children only when end-* is at the beigining also fix pep8

* Remaining config blocks of route-policy which needs exclusion from diff. added new tests

* pylint/pep8 warnings

* Review comments , sanity test fix

* shbang warning

* remove unused import

(cherry picked from commit 2db6a8c26a)

* changelog entry

* sanity fix
2018-06-13 14:43:18 -07:00
2ef929029d Disable failing acme_account integration test.
(cherry picked from commit d6ba139713)
2018-06-12 18:12:41 -07:00
cda4b6dad1 Digital Ocean Block Storage Bug (#41431)
Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response.

Signed-off-by: ABond <ajbond2005@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(cherry picked from commit 4efe53edd5)
2018-06-12 08:27:44 -07:00
d3a9f77361 fix get existing vpc issue (#41429)
(cherry picked from commit 00ce205535)
2018-06-12 08:26:41 -07:00
36c626977c Update CHANGELOG-v2.6.rst 2018-06-12 08:26:03 -07:00
f70978c0b9 2.6 backport #41284 to fix json spelling for vyos command 2018-06-12 08:26:03 -07:00
c4f4d8c1a5 Change falied_conditions to proper spelling (#41284)
(cherry picked from commit e892646bc7)
2018-06-12 08:26:03 -07:00
28e16eaad8 Update docs on import/include tasks (#33032)
(cherry picked from commit 30da71d880)
2018-06-11 11:51:10 -07:00
9ae2050e2f Fix nxos_snapshot compare (#41386)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 1998707eda)
2018-06-11 08:34:12 -07:00
3bc9a04f86 Update Ansible release version to 2.6.0.dev0. 2018-06-08 23:33:22 -07:00
e458807129 New release v2.6.0rc2 2018-06-08 22:03:08 -07:00
4c6642debd Make admin_users only contain root and toor because admin is used for non-privileged accounts
This fixes one specific instance of failure to chown from a privileged
account:
https://github.com/ansible/ansible/issues/16052#issuecomment-384976615

Fixes #41160

(cherry picked from commit 461a2733e6)
2018-06-08 21:18:50 -07:00
b93f579ead GCP Inventory Plugin scopes fix 2018-06-08 13:05:02 -07:00
aad1940e61 changelog 2018-06-08 09:50:17 -07:00
6c505e9ef1 cherry-picked from 46886f8249 and fixed merge conflicts
Test case for missing permissions

Update aws_s3 module to latest standards

Use AnsibleAWSModule

Handle BotoCoreErrors properly

Check for XNotImplemented and NotImplemented exceptions for S3 drop-ins

Don't prematurely fail if user does not have s3:ListBucket permission

Allow S3 drop-ins to ignore put_object_acl and put_bucket_acl
2018-06-08 09:50:17 -07:00
eb672bfba3 GCP: Instance Metadata fix 2018-06-08 09:47:58 -07:00
1a673cb772 Update winrm.py (#41303)
fix the typos for winrm port

(cherry picked from commit 7fb92b6f45)
2018-06-08 09:46:30 -07:00
33f3ba18f0 Fix typeo in param name (#41287)
(cherry picked from commit effa235eb6)
2018-06-08 09:45:56 -07:00
269c60cc7a first_found: fix examples to match the code (#40821)
(cherry picked from commit 23a337918c)
2018-06-08 09:45:13 -07:00
c03373921d fix issue #41081 in azure_rm_securitygroup (#41123)
* fix issue #41081

* resolve comments

* fix lint

(cherry picked from commit 46eceba395)
2018-06-07 16:28:49 -07:00
96929acd5e normalize the resource location (#40802)
(cherry picked from commit e6e08a0174)
2018-06-07 16:28:49 -07:00
adef72393e add adfs_authority_url arg in azure_rm.py (#41071)
(cherry picked from commit bd34194ace)
2018-06-07 16:28:49 -07:00
ca992f5aba Fixes #39648 azure_rm_virtualnetwork not handling DNS settings properly on existing virtual networks (#40646)
* check nullable

* add test

* fix

* fix

(cherry picked from commit 7b9864776a)
2018-06-07 16:28:49 -07:00
3ed8300dff increase timeout for connection reset by peer issue with httpapi (#41224)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 34e4071eca)
2018-06-07 16:19:51 -07:00
b13dd0cac1 Metadata change to 'core' for 2.5 supported NIOS modules (#41244)
* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

* changing metadata to core support

(cherry picked from commit 2c2af87b2e)
2018-06-07 16:19:12 -07:00
3fffc208f7 Better error message if the template is not utf-8 encoded (#41030)
* Better error message if the template is not utf-8 encoded

Also document this in the porting guide
(cherry picked from commit cef4d862bc)
2018-06-07 16:17:29 -07:00
97c6805d47 aws_s3: don't decrypt file before uploading - fixes #39287 (#39634)
* aws_s3: do not decrypt file before uploading to bucket

* changelog

(cherry picked from commit 387c37e255)
2018-06-07 16:16:30 -07:00
c87e26449a Backport/2.6/40856 (#41278)
* Changed request() to run json.loads() instead of module doing it
- Removed json.loads() from modules
- Removed some unreliable integration tests
- Removed self.function setting in construct_path()
-

(cherry picked from commit 0ba1e52bdd)

* PEP8 changes

(cherry picked from commit 182979ffc4)

* Remove debug line for push

(cherry picked from commit 5350dcf52c)
2018-06-07 16:15:10 -07:00
c77bcdf3a7 fix truncated list functions in ansible-doc (#41281)
* fixed incomplete refactor of instance-level plugin list var

(cherry picked from commit 25ab2a8153)
2018-06-07 15:56:31 -07:00
2e7c09e967 only add group if properly defined
also corrected skip message as this has to do with type, not name

fixes #40850

(cherry picked from commit 8e4c56d773)
2018-06-07 15:55:48 -07:00
34f08b4eb5 cherry-pick e59742eccd and resolve conflicts
[aws] Remove walrus conditional in aws_s3 module when using custom s3_url

fix aws_s3 module to use custum s3_url
2018-06-07 15:55:02 -07:00
c168cd482c cherry-picked from 89cea78e30 and fixed merge conflicts from restructuring the integration tests in devel
Fix async for aws_s3

Add a test that async is able to be used on aws_s3 tasks
2018-06-07 15:54:18 -07:00
f74312e2bd Remove changelog entry for reverted #39365 2018-06-07 15:53:25 -07:00
094c9e7a3d Revert #39365, improve error messaging (#41208)
* Revert " Update TaskInclude _raw_params with the expanded/templated path to file (#39365)"

This reverts commit 4b01b92cfe.

* Improve error messaging, catch error templating parent path

(cherry picked from commit c403f01971)
2018-06-07 15:53:25 -07:00
4a1eb1c191 Add some dots at the end of sentences (#41176)
See e.g. https://docs.ansible.com/ansible/devel/reference_appendices/config.html#default-scp-if-ssh
In the docs the list of strings is just concatenated without additional interpunctuation.

+label: docsite_pr

(cherry picked from commit edb1735ca0)
2018-06-07 15:39:19 -07:00
f52b37e94a Docs fix: ansible_group_priority defaults to 1
The docs committed in #28777 were inconsistent.
This clarifies that the default `ansible_group_priority` is `1`.[1][2]

[1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40
[2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236

(cherry picked from commit 4fa2fb9c89)
2018-06-07 15:35:59 -07:00
c5484e845a fix ansible-doc regression from missing plugins (#41167)
(cherry picked from commit 087efe4232)
2018-06-07 15:33:38 -07:00
5417a373bc winrm: fix up unit tests (#41112)
(cherry picked from commit ad8e13e9f8)
2018-06-07 15:32:46 -07:00
594b81f73e Expand ios password prompt regex (#41131)
(cherry picked from commit 49fddb6f28)
2018-06-07 15:30:50 -07:00
f54b9e4dd8 Update ios_facts.py (#40928)
Account for upper/lower case match occurrences of "[Nn]umber" and "[Ss]erial"

Model Number                       : WS-C3850-12X48U
System Serial Number          :  <removed>

(cherry picked from commit 12d221152b)
2018-06-07 15:30:50 -07:00
5503285c20 Fix ec2_ami block_device_mapping volume_size to be int in 2.6 (#40938) (#41216)
* Fix ec2_ami block_device_mapping volume_size to be int in 2.5 (#40938)

* fix ec2_ami block_device_mapping size to be int

* fixed cr issues

renamed `type` to `attribute_type`
reused `new_item` instead of creating new variable `value`

(cherry picked from commit ab96a84154)

* changelog
2018-06-07 15:27:18 -07:00
db3a3ddfa9 Update Ansible release version to 2.6.0.dev0. 2018-06-05 20:40:35 -07:00
0a6c643e8e New release v2.6.0rc1 2018-06-05 19:55:46 -07:00
ddb60ce345 Implement new changelog generator.
(cherry picked from commit 70c475da6c)
2018-06-05 19:38:32 -07:00
14acce0b44 pin azure deps to exact versions
* added warnings for newer-than-expected versions
* prevent passing both api_version and profile for newer clients
2018-06-05 18:20:45 -07:00
9823432ec3 fix nxos_snapshot issues (#41034)
* fix nxos_snapshot issues

* review comments

* doc change

(cherry picked from commit 6733bffd5d)
2018-06-05 09:19:29 -07:00
25d52697af adds ansible-doc JSON plugin data dump
* used for changelog generation of new plugins

(cherry picked from commit 096d243526)
2018-06-04 18:05:48 -07:00
121139b755 Changelog fragment cleanup. 2018-06-04 17:10:44 -07:00
73b5c997f4 fix nxos_udld failing with httpapi (#41074)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 72d630b831)
2018-06-04 13:42:03 -07:00
74a56f0ca1 fix nxos_banner issue (#41026)
(cherry picked from commit b6afb77a8a)
2018-06-04 13:42:03 -07:00
e24743ff19 Fixes to ios_logging (#41029)
* Logging size may not show up in config

* This is much simpler

* Avoid repetition in tests

* Both options of buffered are optional

(cherry picked from commit 92a95368fe)
2018-06-04 13:40:34 -07:00
773fdeb6f0 ovirt: Backport of bug fixes for 2.6 (#41092)
* ovirt_vms: Fix change cd (#40939)

* ovirt_vms: Fix attaching of CD

* ovirt_vms: Fix idemptency

* ovirt_templates: Add searching by cluster (#40934)

* ovirt_templates: Add searching by cluster

* ovirt_disks: Add searching by sd and vm_name

* Fix python syntax
2018-06-04 13:39:52 -07:00
e8d8fa4e1a Fix test-module failing to validate args (#41004)
* Fix test-module failing to validate args

The test-module pass a wrong argument _ansible_tmp cause the validation failed.
Change the argument _ansible_tmp to _ansible_tmpdir to fix this.

* Add a integration test for test-module.

Prior to this change, we don't have a test for test-module.

This change ensure the correctness of test-module script.
2018-06-04 13:38:19 -07:00
1ab973c3d3 Fixes not using the parent parameter (#41102)
The parent parameter was not being used in the module. This meant
that all child profiles would use the system-defined parent instead
of the parent specified in the module

(cherry picked from commit 457c813d46)
2018-06-04 13:35:31 -07:00
fb3f0a53d9 More correct fix for status problem (#41045)
Status is not being determined right when monitors are enabled but
the state is up or down. This patch fixes it.

(cherry picked from commit 033adf8cd5)
2018-06-04 08:42:46 -07:00
205b66ee7c Don't try to reuse ansible_port, it doesn't work that way (yet?) (#41022)
(cherry picked from commit 70e3a7c9e1)
2018-06-01 12:42:20 -07:00
eedf5d6c6d Fix cache timeout behavior
(cherry picked from commit c1400ce909)
2018-06-01 12:40:30 -07:00
8d345c7cd6 Do not try to import simplejson in jsonfile.py (#40983)
With the addition on ajson.py in cbb6a7f4e8, two
new classes were created: AnsibleJSONDecoder and AnsibleJSONEncoder. These
classes are used when calling json.looads() and json.dumps().

This works fine with everything except the jsonfile.py cache plugin, which would
first try to import simplejson as json, then fall back to json. When simplejson
is installed, the load() or dump methods from simplejson are called, which then
try to use the AnsibleJSONEncoder/AnsibleJSONDecoder subclass from ajson.py.
But asjon.py imports json, not simplejson, and things blow up.

(cherry picked from commit 479b26fe31)
2018-06-01 12:39:03 -07:00
08aeeefa90 Fix error reporting on bad type for config setting
(cherry picked from commit c86fd6e2df)
2018-06-01 10:38:19 -07:00
7d3ce99a6f Use colspan on td instead of divs for hierarchical tables (#39948)
Address Firefox table-rendering issues in docs. Refactor to use colspan to provide table cells which can vary in width and indentation; the outermost has the greatest colspan, and each nested key has a colspan of one less than the parent, with padding cells for indentation.
Apply styling to table cells to get the table height to work without hacks or browser-specific
styling.  Simplify the markup and CSS by removing extra divs. Use two passes over the options, return values, and return facts in the Jinja2 module-docs template: one to determine the maximum nesting depth to compute the maximum colspan needed, plus one to lay out the rows.
(cherry picked from commit fa5c0282a4)
2018-06-01 10:37:39 -07:00
4536fcc722 Re-allow SSH due to broken delegation (#40978)
Removes the SSH enforcement because it breaks situations where, for example,
an admin maintains Ansible Tower and another team needs to use Ansible
with the BIG-IP modules, but the Tower admin does not want to install
the F5-SDK on the Ansible Tower instance.

In this situation, the user needs to delegate the execution of the BIG-IP
module to another linux host that does have the dependencies installed.

Usually this is done with delegation, often over SSH. Limiting the SSH
connection here prevents this from working.

(cherry picked from commit 8bccd0830b)
2018-06-01 10:34:21 -07:00
cfc67ce177 Add docs detailing how to convert many with_X style loops to use loop and filters (#40964)
* Add docs detailing how to convert many with_X style loops to use loop and filters. Fixes #40727

* Switch lookup used in query vs lookup comparison, to not recommend use of nested lookup

* Improve docs based on feedback

(cherry picked from commit 1cec3c8daf)
2018-06-01 10:31:20 -07:00
6e7bdb04ee enforce required config
(cherry picked from commit cbedbd3c9c)
(cherry picked from commit bcabbe33c8)
2018-05-31 18:27:02 -07:00
8f2c34fc69 Add changelog entries from deleted CHANGELOG.md. 2018-05-31 16:06:49 -07:00
741e09f984 Pass cloud parameter to get_one call
When we switch this to pull from the CloudRegion object, we missed
passing the parameter along.
2018-05-31 13:54:19 -07:00
65d96bf354 K8s dynamic collected changes (#40745)
* Move k8s modules to dynamic backend

* update required openshift version

* update -> patch

* use new dynamic client exceptions

* style

* guard urllib3 import

* guard ansibleerror import

* give more information about error cause

* format in variable

* style

* rename tests

* Search for provided kind in a few more places to match old behavior, properly handle failure

* make common code use fail instead of fail_json, to work for lookup plugins as well

* update docs

* move openshift_raw tests into k8s tests

* fix typo

* Use diff of response and resource to determine change, don't do any checking client-side before making requests

* remove duplicate yaml blocks

* Update porting guide for k8s module

* remove invalid doc refs

* If fuzzy searching finds a resource, update resource_definition to match proper kind and version

* remote unsupported openshift_raw variables

* properly check environment variables when determining auth method:
2018-05-31 13:32:42 -07:00
cad351328d Search for macaddresses more stringently (#40901)
* Search for macaddresses more stringently

Fixes #40829

(cherry picked from commit e7afd3d378)
2018-05-31 13:18:15 -07:00
ca3c0dfaea Do not gather mem facts if command invalid (#40820)
* Do not gather mem facts if command invalid

In some firmwares, 'show memory statistics' fail, thus
do not populate mem if we got a failure after running that command.

* Fix pep8

* Warn if got error when running 'sh memory statistics'

* Fix pep8

(cherry picked from commit 669949e6a3)
2018-05-31 13:17:15 -07:00
42661ba459 Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)
* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix

(cherry picked from commit 81510970ae)
2018-05-31 13:10:55 -07:00
7f50d11806 Command authorization failed ios regex (#40819)
* Add 'Command authorization failed' to stderr regex list

* Add missing comma

* Remove superfluous comma

(cherry picked from commit 026de6bcb0)
2018-05-31 13:00:58 -07:00
1ea5790f56 Fixes eos_logging idempotence issue #31862 (#40604)
* eos_logging idempotence fix

* fixed eos_logging idempotence issue

* Fixed pylint and pep8 errors

* Added tests for eos_logging & minor fix

* Removed q statements

(cherry picked from commit b9ea646839)
2018-05-31 10:01:03 -07:00
a3178a1153 Fixes ios_logging idempotency issues (#40701)
* Fixes ios_logging idempotency issues

* Added intergration tests & minor fixes

* Minor fixes in tests

* Minor fixes in tests #2

* eos_logging fixes after PR review

(cherry picked from commit a013cdc747)
2018-05-31 10:00:42 -07:00
079a1c3d06 fix nxos output truncated issue (#40961)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-05-31 12:35:41 -04:00
9bb260b543 Update Ansible release version to 2.6.0.dev0. 2018-05-30 19:18:27 -07:00
707f069fe8 New release v2.6.0a2 2018-05-30 17:47:09 -07:00
87a163064f Backport #40833 for 2.6 - synchronize _remote_is_local (#40918)
* Use _remote_is_local=True for local connection in synchronize (#40833)

* All instances of local connection should use _remote_is_local=True. Fixes #40551

* Switch to instance attribute for synchronize

* Add test that shows that synchronize _remote_is_local addresses tmpdir building

(cherry picked from commit ad7ba91f75)

* Add changelog entry for #40833
2018-05-30 16:53:50 -05:00
a2ca2e2a25 reinstates connection:local as an option for nxapi (#40834) (#40916)
(cherry picked from commit 0e0a5243c8)
2018-05-30 16:06:32 -05:00
0c907779a4 updates network examples to 2.6 (#40831) (#40899)
(cherry picked from commit e2146a7696)
2018-05-30 15:29:06 -05:00
b184e73b89 Fix FreeBSD package install in test setup.sh.
(cherry picked from commit c3d3b6cedc)
2018-05-30 09:00:43 -07:00
848327a6b5 Fix eapi tests to use become (#40838) (#40848)
* Fix eapi tests to use become (#40838)

* Return the expected prompt character based on become status

* Update eos_banner tests for eapi

* Update eos_config tests for eapi

* Update eos_facts tests for eapi

* Update eos_interface tests for eapi

* Update eos_l3_interface tests for eapi

* Update eos_lldp tests for eapi

* Update eos_logging tests for eapi

* Update eos_smoke tests for eapi

* Update eos_system tests for eapi

(cherry picked from commit 20f93816d6)

* Remove local from most eos tests now that provider is out
2018-05-30 09:56:31 -04:00
592c6877b5 fix nxos dci failures (#40871) (#40873)
* fix structured output for nxos_linkagg

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix TypeError for nxos_interface

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 786ec14e54)
2018-05-30 15:35:46 +05:30
58f018e367 nxos and httpapi cherry-pick (#40859)
* httpapi fix nxos (#40806)

* httpapi fix nxos

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* nxos_hsrp fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit a7421e8611)

* fix nxos_vrf and migrate get_interface_type to module_utils (#40825)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit b4baa2d484)

* nxos_vlan fix (#40822)

* nxos_vlan fix

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* uncomment mode test as nxapi now has get_capabilities

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 17b6ecf101)

* Update nxos_install_os module (#40102)

* Add nxos_install_os integration tests

* Update call to check timers

* Update check_ansible_timer method

* Modify network_cli integration tests

* Add timer check for nxos_install_os

* Add comments for clear_persistent_sockets

* Update connection info for tests

* More updates

* Restructure files for provider and non-provider testing

* Update env var name and add check for ISSU switchover

(cherry picked from commit 9f026309a6)
2018-05-30 10:40:25 +05:30
828d878bf9 Bump python support version for openstack modules (#40751)
The openstack modules do not support python 2.6 as the underlying
library dependency (openstacksdk) does not support python 2.6. Update
the docs to make this clear.
2018-05-29 08:52:51 -04:00
b97a47ac2c Fix connection error reporting (#40758) (#40759)
The variables used for reporting errors were incorrect. Additionally,
the fetching of connection related params was using an old format.

(cherry picked from commit dc08bca1fd)
2018-05-26 17:38:26 -07:00
a018a1e6d4 Fixes parameters to fail_json (#40756) (#40757)
The number of parameters was incorrect. This patch fixes it.

(cherry picked from commit 547a1ed67d)
2018-05-26 16:06:00 -07:00
882f249f1d Revert "Move k8s modules to dynamic backend (#39632)" (#40743) (#40744)
This reverts commit 4373b155a5.
2018-05-26 00:32:40 -05:00
3f83e7e473 Initial stable-2.6 branch commit. 2018-05-25 21:15:12 -07:00
472 changed files with 6256 additions and 2858 deletions

1
.gitignore vendored
View File

@ -103,3 +103,4 @@ htmlcov/
# ansible-test coverage results
test/units/.coverage.*
/test/integration/cloud-config-azure.yml
changelogs/.plugin-cache.yaml

View File

@ -12,7 +12,7 @@ Language
========
* While not all components of Ansible must be in Python, core contributions to the Ansible repo must be written in Python. This is to maximize the ability of everyone to contribute.
* If you want to write non-Python ansible modules or inventory scripts, that's fine, but they are not going to get merged in most likely. Sorry!!
* If you want to write non-Python ansible modules or inventory scripts, that's fine, but they are not going to get merged in most likely. Sorry!!
PEP 8 and basic style checks
============================
@ -20,7 +20,7 @@ PEP 8 and basic style checks
* [PEP 8](https://www.python.org/dev/peps/pep-0008/) is a great Python style guide, which you should read.
* PEP 8 must not be strictly followed in all aspects, but most of it is good advice.
* The line is limited to 160 characters.
* To run checks for things we care about, use [ansible-test](https://docs.ansible.com/ansible/dev_guide/testing_pep8.html#running-locally).
* To run checks for things we care about, use [ansible-test](https://docs.ansible.com/ansible/devel/dev_guide/testing_sanity.html).
* Similarly, additional checks can be made with "make pyflakes".
* There is no need to submit code changes for PEP 8 and pyflakes fixes, as these break attribution history. Project leadership will make these periodically.
* Do not submit pull requests that simply adjust whitespace in the code.
@ -28,7 +28,7 @@ PEP 8 and basic style checks
Testing
=======
* Much of ansible's testing needs are in integration, not unit tests. Add module tests there.
* Much of Ansible's testing needs are in integration, not unit tests. Add module tests there.
* That being said, there are unit tests too!
* Code written must absolutely pass tests (i.e. "make tests")
* You should anticipate any error paths in your code and test down those error paths.
@ -42,7 +42,7 @@ Whitespace
Shebang Lines
=============
* /usr/bin/scripts should start with '/usr/bin/env python'
* module code should still use '/usr/bin/python' as this is replaced automatically by 'ansible_python_interpreter', see the FAQ in the docs for more info.
@ -60,13 +60,13 @@ Classes
* With the exception of module code (where inline is better), it is desirable to see classes in their own files.
* Classes should generally not cause side effects as soon as they are instantiated, move meaningful behavior to methods rather than constructors.
Functions and Methods
=====================
* In general, functions should not be 'too long' and should describe a meaningful amount of work
* When code gets too nested, that's usually the sign the loop body could benefit from being a function
* Parts of our existing code are not the best examples of this at times.
* Parts of our existing code are not the best examples of this at times.
* Functions should have names that describe what they do, along with docstrings
* Functions should be named with_underscores
* "Don't repeat yourself" is generally a good philosophy
@ -161,24 +161,24 @@ All contributions to the core repo should preserve original licenses and new con
Module Documentation
====================
All module pull requests must include a DOCUMENTATION docstring (YAML format,
see other modules for examples) as well as an EXAMPLES docstring, which is free form.
All module pull requests must include a DOCUMENTATION docstring (YAML format,
see other modules for examples) as well as an EXAMPLES docstring, which is free form.
When adding new modules, any new parameter must have a "version_added" attribute.
When submitting a new module, the module should have a "version_added" attribute in the
When adding new modules, any new parameter must have a "version_added" attribute.
When submitting a new module, the module should have a "version_added" attribute in the
pull request as well, set to the current development version.
Be sure to check grammar and spelling.
It's frequently the case that modules get submitted with YAML that isn't valid,
so you can run "make webdocs" from the checkout to preview your module's documentation.
If it fails to build, take a look at your DOCUMENTATION string
It's frequently the case that modules get submitted with YAML that isn't valid,
so you can run "make webdocs" from the checkout to preview your module's documentation.
If it fails to build, take a look at your DOCUMENTATION string
or you might have a Python syntax error in there too.
Python Imports
==============
To make it clear what a module is importing, imports should not be sprinkled throughout the code.
To make it clear what a module is importing, imports should not be sprinkled throughout the code.
Python Imports should happen at the top of the file, exempting code from module_utils.
@ -203,7 +203,7 @@ Exceptions
==========
In the main body of the code, use typed exceptions where possible:
# not this
raise Exception("panic!")
@ -265,7 +265,7 @@ Use 'in':
# not this:
if x.find('foo') != -1:
# this:
# this:
if 'foo' in x:
String checks
@ -296,7 +296,7 @@ Always do "git pull --rebase" and "git rebase" vs "git pull" or "git merge". See
Always create a new branch for each pull request to avoid intermingling different features or fixes on the same branch.
Python Version Compliance
=========================

View File

@ -9,7 +9,7 @@
# make deb-src -------------- produce a DEB source
# make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in)
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/dev_guide/testing_units.html for requirements)
# make tests ---------------- run the tests (see https://docs.ansible.com/ansible/devel/dev_guide/testing_units.html for requirements)
# make pyflakes, make pep8 -- source code checks
########################################################
@ -239,9 +239,9 @@ sdist: clean docs
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
.PHONY: changelog_reno
changelog_reno:
reno -d changelogs/ report --title 'Ansible $(MAJOR_VERSION) "$(CODENAME)" Release Notes' --collapse-pre-release --no-show-source --earliest-version v$(MAJOR_VERSION).0a1 --output changelogs/CHANGELOG-v$(MAJOR_VERSION).rst
.PHONY: changelog
changelog:
packaging/release/changelogs/changelog.py release -vv && packaging/release/changelogs/changelog.py generate -vv
.PHONY: rpmcommon
rpmcommon: sdist

347
changelogs/.changes.yaml Normal file
View File

@ -0,0 +1,347 @@
releases:
2.6.0:
codename: Heartbreaker
fragments:
- v2.6.0_summary.yaml
release_date: '2018-06-28'
2.6.0a1:
codename: Heartbreaker
fragments:
- ansible-managed-encoding.yaml
- azure-lb-sku.yaml
- base64_filter_encoding.yaml
- command-support-argv.yaml
- copy-files-default-follow.yaml
- copy-no-chmod.yaml
- copy-recursive-copy.yml
- encoding-docs-plugin-parsing.yaml
- file-disallow-src.yaml
- file-nonexistent-link.yaml
- file-nonexitent-link-recurse.yaml
- file-succeed-if-already-absent.yaml
- gem-custom-home.yaml
- grafana-deprecation-warnings.yaml
- includes.yaml
- mode-preserve.yaml
- pause-ctrl-c.yaml
- postgresql_user-encrypted-fixes.yml
- py36-spwd.yaml
- template-filename-encoding.yaml
- user-expires.yaml
- v2.6.0a1_catchup.yaml
- v2.6.0a1_summary.yaml
- win_environment-do-not-delete-on-null.yaml
- win_file-special-char-fix.yaml
- win_get_url-ftp-support.yaml
- win_module_utils_sid-conversion.yaml
- win_template-dest-dir-fix.yaml
- win_updates_typo_whitelist_fix.yaml
- window_become-better-errors.yaml
- windows-deprecation-removal.yaml
- winrm-encoding-fix
- winrm-get_correct_user.yaml
- yaml-callback-unicode.yaml
modules:
- aci_l3out
- avi_autoscalelaunchconfig
- avi_l4policyset
- avi_useraccount
- aws_caller_facts
- aws_inspector_target
- aws_ses_identity_policy
- aws_sgw_facts
- azure_rm_aks
- azure_rm_aks_facts
- bigip_data_group
- bigip_device_license
- bigip_gtm_global
- bigip_gtm_monitor_bigip
- bigip_gtm_monitor_firepass
- bigip_gtm_monitor_http
- bigip_gtm_monitor_https
- bigip_gtm_monitor_tcp
- bigip_gtm_monitor_tcp_half_open
- bigip_gtm_pool_member
- bigip_gtm_virtual_server
- bigip_log_destination
- bigip_log_publisher
- bigip_management_route
- bigip_profile_dns
- bigip_profile_tcp
- bigip_profile_udp
- bigip_service_policy
- bigip_smtp
- bigip_snmp_community
- bigip_timer_policy
- bigip_trunk
- bigiq_application_fasthttp
- bigiq_application_fastl4_tcp
- bigiq_application_fastl4_udp
- bigiq_application_http
- bigiq_application_https_offload
- bigiq_application_https_waf
- bigiq_regkey_license_assignment
- cnos_command
- cnos_config
- cs_role_permission
- digital_ocean_account_facts
- digital_ocean_certificate_facts
- digital_ocean_domain_facts
- digital_ocean_image_facts
- digital_ocean_load_balancer_facts
- digital_ocean_region_facts
- digital_ocean_size_facts
- digital_ocean_snapshot_facts
- digital_ocean_tag_facts
- digital_ocean_volume_facts
- ec2_eip_facts
- ec2_vpc_vpn_facts
- exos_command
- fortios_webfilter
- gcp_compute_address
- gcp_compute_backend_bucket
- gcp_compute_backend_service
- gcp_compute_health_check
- gcp_compute_http_health_check
- gcp_compute_https_health_check
- gcp_compute_instance
- gcp_compute_instance_template
- gcp_compute_network
- gcp_compute_route
- gcp_compute_subnetwork
- gcp_compute_target_http_proxy
- gcp_compute_target_https_proxy
- gcp_compute_target_tcp_proxy
- gcp_container_cluster
- gcp_container_node_pool
- gcp_dns_resource_record_set
- gcp_pubsub_subscription
- gcp_pubsub_topic
- gcp_storage_bucket
- gcp_storage_bucket_access_control
- gitlab_deploy_key
- gitlab_hooks
- k8s
- ldap_passwd
- memset_zone
- meraki_network
- meraki_organization
- na_ontap_broadcast_domain
- net_get
- net_put
- netconf_get
- one_host
- one_image
- one_image_facts
- one_vm
- os_server_metadata
- os_volume_snapshot
- psexec
- purefa_ds
- purefa_facts
- purefa_pgsnap
- purefb_fs
- purefb_snap
- rds_instance_facts
- rds_snapshot_facts
- scaleway_compute
- scaleway_sshkey
- slxos_command
- slxos_config
- slxos_facts
- slxos_interface
- slxos_l2_interface
- slxos_linkagg
- spectrum_device
- sysvinit
- vmware_cluster_facts
- vmware_datastore_cluster
- vmware_datastore_maintenancemode
- vmware_guest_disk_facts
- vmware_guest_snapshot_facts
- vmware_host_capability_facts
- vmware_host_powerstate
- vmware_local_user_facts
- vmware_portgroup_facts
- vmware_resource_pool_facts
- vmware_tag
- vmware_tag_facts
- vmware_vswitch_facts
- win_domain_computer
- win_hostname
- win_pester
- yarn
- zabbix_group_facts
plugins:
callback:
- cgroup_memory_recap
- grafana_annotations
- sumologic
connection:
- httpapi
inventory:
- foreman
- generator
- nmap
lookup:
- onepassword
- onepassword_raw
release_date: '2018-05-21'
2.6.0a2:
codename: Heartbreaker
fragments:
- always_run_removal.yaml
- aws_ses_identity_check_mode.yaml
- powershell_use_set_tmpdir.yaml
- selinux-check-mode.yaml
- synchronize_remote_is_local.yaml
- v2.6.0a2_catchup.yaml
- v2.6.0a2_summary.yaml
- win_updates-add-scheduled-tasks-back.yaml
- winrm_kinit_error-fix.yaml
- xenserver-facts-fix.yaml
modules:
- acme_account
- aws_config_aggregation_authorization
- aws_config_aggregator
- aws_config_delivery_channel
- aws_config_recorder
- aws_config_rule
- aws_glue_connection
- aws_glue_job
- azure_rm_resource
- azure_rm_resource_facts
- bigip_gtm_monitor_external
- bigip_monitor_external
- bigiq_utility_license
- cloud_init_data_facts
- elb_network_lb
- flatpak
- flatpak_remote
- gcp_compute_disk
- gcp_compute_firewall
- gcp_compute_forwarding_rule
- gcp_compute_global_address
- gcp_compute_global_forwarding_rule
- gcp_compute_image
- gcp_compute_instance_group
- gcp_compute_instance_group_manager
- gcp_compute_ssl_certificate
- gcp_compute_target_pool
- gcp_compute_target_ssl_proxy
- gcp_compute_url_map
- gluster_peer
- heroku_collaborator
- memset_dns_reload
- memset_zone_domain
- memset_zone_record
- meraki_admin
- meraki_snmp
- na_ontap_aggregate
- na_ontap_broadcast_domain_ports
- na_ontap_cifs
- na_ontap_cifs_acl
- na_ontap_cifs_server
- na_ontap_cluster
- na_ontap_cluster_ha
- na_ontap_export_policy
- na_ontap_export_policy_rule
- na_ontap_igroup
- na_ontap_interface
- na_ontap_iscsi
- na_ontap_job_schedule
- na_ontap_license
- na_ontap_lun
- na_ontap_lun_map
- na_ontap_net_ifgrp
- na_ontap_net_port
- na_ontap_net_routes
- na_ontap_net_vlan
- na_ontap_nfs
- na_ontap_ntp
- na_ontap_qtree
- na_ontap_service_processor_network
- na_ontap_snapshot
- na_ontap_snmp
- na_ontap_svm
- na_ontap_ucadapter
- na_ontap_user
- na_ontap_user_role
- na_ontap_volume
- na_ontap_volume_clone
- netconf_rpc
- one_service
- slxos_l3_interface
- slxos_vlan
plugins:
inventory:
- gcp_compute
release_date: '2018-05-30'
2.6.0rc1:
codename: Heartbreaker
fragments:
- v2.6.0rc1_catchup.yaml
- v2.6.0rc1_summary.yaml
release_date: '2018-06-05'
2.6.0rc2:
codename: Heartbreaker
fragments:
- 41167_ansible_doc_regression.yaml
- admin-users-default-change.yaml
- aws_s3_async_fix.yaml
- aws_s3_decryption_fix.yaml
- aws_s3_fix_custom_endpoints.yaml
- aws_s3_fix_exception_handling.yaml
- ec2_ami_fix_block_device_mapping_volume_size_type.yaml
- v2.6.0rc2_summary.yaml
release_date: '2018-06-08'
2.6.0rc3:
codename: Heartbreaker
fragments:
- digital_ocean_block_storage_fix.yaml
- gce-sort-fix.yaml
- iosxr_config_route_policy_objects_fix.yaml
- no_log_fix_for_connection_exceptions.yaml
- reset_con_fix.yml
- v2.6.0rc3_summary.yaml
release_date: '2018-06-18'
2.6.0rc4:
codename: Heartbreaker
fragments:
- 41530-apt-mark-deb6.yaml
- debug_fixes.yml
- eos_vrf_failure-fix.yml
- file_touch_diff.yaml
- fix_config_required.yml
- fix_yaml_inv_nulls.yml
- missing_raise.yml
- v2.6.0rc4_summary.yaml
- vars_lk.yml
- virtualbox_inventory.yaml
- win_updates-async-fix.yml
- winrm_kinit-remove-pass-log.yml
release_date: '2018-06-25'
2.6.0rc5:
codename: Heartbreaker
fragments:
- fix_options.yml
- fix_password_lookup_loading.yaml
- group_by_localhost.yaml
- lineinfile-insertbefore-bof-bugfix.yaml
- v2.6.0rc5_summary.yaml
- win_iis_webapppool-output-fix.yml
release_date: '2018-06-26'
2.6.1:
codename: Heartbreaker
fragments:
- avoid_cwd_vars.yml
- basic_booleans_backward_compat.yaml
- file_touch_check_mode.yaml
- inventory_manager_fix_required_options_override.yaml
- junos_config_confirm_commit.yaml
- nsupdate_fix_hmac-sha384.yaml
- v2.6.1_summary.yaml
- win_domain-dns-typo-fix.yml
- win_group_membership-sid-bugfix.yml
- wrcwd_ansible.cfg.yml
release_date: '2018-07-05'

View File

@ -2,130 +2,545 @@
Ansible 2.6 "Heartbreaker" Release Notes
========================================
.. _Ansible 2.6 "Heartbreaker" Release Notes_v2.6.0a1:
v2.6.0a1
========
.. _Ansible 2.6 "Heartbreaker" Release Notes_v2.6.0a1_Release Summary:
v2.6.1
======
Release Summary
---------------
| Release Date: 2018-05-21
| Release Date: 2018-07-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_
.. _Ansible 2.6 "Heartbreaker" Release Notes_v2.6.0a1_Minor Changes:
Minor Changes
-------------
- azure_rm_loadbalancer - add support for sku
- azure_rm_publicipaddress - add support for sku
- Added an ``encoding`` option to the ``b64encode`` and ``b64decode`` filters to specify the encoding of the string that is base64 encoded.
- import/include - Cache task_vars to speed up IncludedFile.process_include_results (https://github.com/ansible/ansible/pull/39026)
- PowerShell modules that use Convert-ToSID in Ansible.ModuleUtils.SID.psm1 like win_user_right now accept an actual SID as an input string. This means any local or domain accounts that are named like a SID need to be prefixed with the domain, hostname, or . to ensure it converts to that accounts SID https://github.com/ansible/ansible/issues/38502
.. _Ansible 2.6 "Heartbreaker" Release Notes_v2.6.0a1_Removed Features (previously deprecated):
Removed Features (previously deprecated)
----------------------------------------
- win_chocolatey - removed deprecated upgrade option and choco_* output return values
- win_feature - removed deprecated reboot option
- win_iis_webapppool - removed the ability to supply attributes as a string in favour of a dictionary
- win_package - removed deprecated name option
- win_regedit - removed deprecated support for specifying HKCC as HCCC
.. _Ansible 2.6 "Heartbreaker" Release Notes_v2.6.0a1_Bugfixes:
- Restore module_utils.basic.BOOLEANS variable for backwards compatibility with the module API in older ansible releases.
Bugfixes
--------
- template - Fix for encoding issues when a template path contains non-ascii characters and using the template path in ansible_managed (https://github.com/ansible/ansible/issues/27262)
- **Security Fix** - avoid loading host/group vars from cwd when not specifying a playbook or playbook base dir
- **Security Fix** - avoid using ansible.cfg in a world writable dir.
- Fix junos_config confirm commit timeout issue (https://github.com/ansible/ansible/pull/41527)
- file module - The touch subcommand had its diff output broken during the 2.6.x development cycle. The patch to fix that broke check mode. This is now fixed (https://github.com/ansible/ansible/issues/42111)
- inventory manager - This fixes required options being populated before the inventory config file is read, so the required options may be set in the config file.
- nsupdate - allow hmac-sha384 https://github.com/ansible/ansible/pull/42209
- win_domain - fixes typo in one of the AD cmdlets https://github.com/ansible/ansible/issues/41536
- win_group_membership - uses the internal Ansible SID conversion logic and uses that when comparing group membership instead of the name https://github.com/ansible/ansible/issues/40649
- copy - fixed copy to only follow symlinks for files in the non-recursive case
v2.6.0
======
- file - fixed the default follow behaviour of file to be true
Release Summary
---------------
- copy module - The copy module was attempting to change the mode of files for remote_src=True even if mode was not set as a parameter. This failed on filesystems which do not have permission bits (https://github.com/ansible/ansible/pull/40099)
| Release Date: 2018-06-28
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_
- Fix an encoding issue when parsing the examples from a plugins' documentation
- file module - The file module allowed the user to specify src as a parameter when state was not link or hard. This is documented as only applying to state=link or state=hard but in previous Ansible, this could have an effect in rare cornercases. For instance, "ansible -m file -a 'state=directory path=/tmp src=/var/lib'" would create /tmp/lib. This has been disabled and a warning emitted (will change to an error in Ansible-2.10).
Minor Changes
-------------
- file module - Fix error when running a task which assures a symlink to a nonexistent file exists for the second and subsequent times (https://github.com/ansible/ansible/issues/39558)
- Added an ``encoding`` option to the ``b64encode`` and ``b64decode`` filters to specify the encoding of the string that is base64 encoded.
- PowerShell modules that use Convert-ToSID in Ansible.ModuleUtils.SID.psm1 like win_user_right now accept an actual SID as an input string. This means any local or domain accounts that are named like a SID need to be prefixed with the domain, hostname, or . to ensure it converts to that accounts SID https://github.com/ansible/ansible/issues/38502
- Raise AnsibleParserError which was missing previously
- The aws_ses_identity module supports check mode
- `postgresql_user` module changed `encrypted=yes` to be the default. This shouldn't break any current playbooks, the module will just store passwords hashed by default. This change was done because Postgres 10 dropped support for `UNENCRYPTED` passwords and because all versions since Postgres 7.2 support storing encrypted passwords.
- azure_rm_loadbalancer - add support for sku
- azure_rm_publicipaddress - add support for sku
- cloudflare_dns module - Removed restriction from protocol to allow other protocols than tcp and udp to be specified.
- command module - Added argv option to allow command to be specified as a list vs. a string (https://github.com/ansible/ansible/issues/19392)
- gem - add ability to specify a custom directory for installing gems (https://github.com/ansible/ansible/pull/38195)
- import/include - Cache task_vars to speed up IncludedFile.process_include_results (https://github.com/ansible/ansible/pull/39026)
- postgresql_user module - Changed encrypted=yes to be the default. This shouldn't break any current playbooks, the module will just store passwords hashed by default. This change was done because Postgres 10 dropped support for UNENCRYPTED passwords and because all versions since Postgres 7.2 support storing encrypted passwords.
- vmware_target_canonical_facts module - The target_id parameter is an optional parameter.
- file module - Fix error when recursively assigning permissions and a symlink to a nonexistent file is present in the directory tree (https://github.com/ansible/ansible/issues/39456)
Deprecated Features
-------------------
- file module - Eliminate an error if we're asked to remove a file but something removes it while we are processing the request (https://github.com/ansible/ansible/pull/39466)
- nxos_igmp_interface module - The oif_prefix and oif_source properties are deprecated. Use the oif_ps parameter with a dictionary of prefix and source to values instead.
- Various grafana_* modules - Port away from the deprecated b64encodestring function to the b64encode function instead. https://github.com/ansible/ansible/pull/38388
Removed Features (previously deprecated)
----------------------------------------
- import/include - Update TaskInclude _raw_params with the expanded/templated path to file allowing nested includes using host vars in file (https://github.com/ansible/ansible/pull/39365)
- removed the deprecated always_run task option, please use `check_mode: no` instead
- win_chocolatey - removed deprecated upgrade option and choco_* output return values
- win_feature - removed deprecated reboot option
- win_iis_webapppool - removed the ability to supply attributes as a string in favour of a dictionary
- win_package - removed deprecated name option
- win_regedit - removed deprecated support for specifying HKCC as HCCC
- dynamic includes - Don't treat undefined vars for conditional includes as truthy (https://github.com/ansible/ansible/pull/39377)
- import/include - Ensure role handlers have the proper parent, allowing for correct attribute inheritance (https://github.com/ansible/ansible/pull/39426)
- include_role/import_role - Use the computed role name for include_role/import_role so to diffentiate between names computed from host vars (https://github.com/ansible/ansible/pull/39516)
- import_playbook - Pass vars applied to import_playbook into parsing of the playbook as they may be needed to parse the imported plays (https://github.com/ansible/ansible/pull/39521)
- include_role/import_role - Don't overwrite included role handlers with play handlers on parse (https://github.com/ansible/ansible/pull/39563)
- dynamic includes - Improved performance by fixing re-parenting on copy (https://github.com/ansible/ansible/pull/38747)
- dynamic includes - Fix IncludedFile comparison for free strategy (https://github.com/ansible/ansible/pull/37083)
- dynamic includes - Allow inheriting attributes from static parents (https://github.com/ansible/ansible/pull/38827)
- include_role/import_role - improved performance and recursion depth (https://github.com/ansible/ansible/pull/36470)
- include_role/import_role - Fix parameter templating (https://github.com/ansible/ansible/pull/36372)
- dynamic includes - Use the copied and merged task for calculating task vars (https://github.com/ansible/ansible/pull/39762)
- Implement mode=preserve for the template module
- Fix mode=preserve with remote_src=True for the copy module
Bugfixes
--------
- **Security Fix** - Some connection exceptions would cause no_log specified on a task to be ignored. If this happened, the task information, including any private information could have been displayed to stdout and (if enabled, not the default) logged to a log file specified in ansible.cfg's log_path. Additionally, sites which redirected stdout from ansible runs to a log file may have stored that private information onto disk that way as well. (https://github.com/ansible/ansible/pull/41414)
- Changed the admin_users config option to not include "admin" by default as admin is frequently used for a non-privileged account (https://github.com/ansible/ansible/pull/41164)
- Changed the output to "text" for "show vrf" command as default "json" output format with respect to "eapi" transport was failing (https://github.com/ansible/ansible/pull/41470)
- Document mode=preserve for both the copy and template module
- pause - ensure ctrl+c interrupt works in all cases (https://github.com/ansible/ansible/issues/35372)
- spwd - With python 3.6 spwd.getspnam returns PermissionError instead of KeyError if user does not have privileges (https://github.com/ansible/ansible/issues/39472)
- template action plugin - fix the encoding of filenames to avoid tracebacks on Python2 when characters that are not present in the user's locale are present. (https://github.com/ansible/ansible/pull/39424)
- user - only change the expiration time when necessary (https://github.com/ansible/ansible/issues/13235)
- win_environment - Fix for issue where the environment value was deleted when a null value or empty string was set - https://github.com/ansible/ansible/issues/40450
- win_file - fix issue where special chars like [ and ] were not being handled correctly https://github.com/ansible/ansible/pull/37901
- win_get_url - fixed a few bugs around authentication and force no when using an FTP URL
- win_template - fix when specifying the dest option as a directory with and without the trailing slash https://github.com/ansible/ansible/issues/39886
- win_updates - Fix typo that hid the download error when a download failed
- win_updates - Fix logic when using a whitelist for multiple updates
- windows become - Show better error messages when the become process fails
- winrm - allow `ansible_user` or `ansible_winrm_user` to override `ansible_ssh_user` when both are defined in an inventory - https://github.com/ansible/ansible/issues/39844
- Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response. (https://github.com/ansible/ansible/pull/41431)
- Fix an encoding issue when parsing the examples from a plugins' documentation
- Fix iosxr_config module to handle route-policy, community-set, prefix-set, as-path-set and rd-set blocks. All these blocks are part of route-policy language of iosxr.
- Fix mode=preserve with remote_src=True for the copy module
- Implement mode=preserve for the template module
- The yaml callback plugin now allows non-ascii characters to be displayed.
- Various grafana_* modules - Port away from the deprecated b64encodestring function to the b64encode function instead. https://github.com/ansible/ansible/pull/38388
- added missing 'raise' to exception definition https://github.com/ansible/ansible/pull/41690
- allow custom endpoints to be used in the aws_s3 module (https://github.com/ansible/ansible/pull/36832)
- allow set_options to be called multiple times https://github.com/ansible/ansible/pull/41913
- ansible-doc - fixed traceback on missing plugins (https://github.com/ansible/ansible/pull/41167)
- cast the device_mapping volume size to an int in the ec2_ami module (https://github.com/ansible/ansible/pull/40938)
- copy - fixed copy to only follow symlinks for files in the non-recursive case
- copy module - The copy module was attempting to change the mode of files for remote_src=True even if mode was not set as a parameter. This failed on filesystems which do not have permission bits (https://github.com/ansible/ansible/pull/40099)
- copy module - fixed recursive copy with relative paths (https://github.com/ansible/ansible/pull/40166)
- correct debug display for all cases https://github.com/ansible/ansible/pull/41331
- correctly check hostvars for vars term https://github.com/ansible/ansible/pull/41819
- correctly handle yaml inventory files when entries are null dicts https://github.com/ansible/ansible/issues/41692
- dynamic includes - Allow inheriting attributes from static parents (https://github.com/ansible/ansible/pull/38827)
- dynamic includes - Don't treat undefined vars for conditional includes as truthy (https://github.com/ansible/ansible/pull/39377)
- dynamic includes - Fix IncludedFile comparison for free strategy (https://github.com/ansible/ansible/pull/37083)
- dynamic includes - Improved performance by fixing re-parenting on copy (https://github.com/ansible/ansible/pull/38747)
- dynamic includes - Use the copied and merged task for calculating task vars (https://github.com/ansible/ansible/pull/39762)
- file - fixed the default follow behaviour of file to be true
- file module - Eliminate an error if we're asked to remove a file but something removes it while we are processing the request (https://github.com/ansible/ansible/pull/39466)
- file module - Fix error when recursively assigning permissions and a symlink to a nonexistent file is present in the directory tree (https://github.com/ansible/ansible/issues/39456)
- file module - Fix error when running a task which assures a symlink to a nonexistent file exists for the second and subsequent times (https://github.com/ansible/ansible/issues/39558)
- file module - The file module allowed the user to specify src as a parameter when state was not link or hard. This is documented as only applying to state=link or state=hard but in previous Ansible, this could have an effect in rare cornercases. For instance, "ansible -m file -a 'state=directory path=/tmp src=/var/lib'" would create /tmp/lib. This has been disabled and a warning emitted (will change to an error in Ansible-2.10).
- file module - The touch subcommand had its diff output broken during the 2.6.x development cycle. This is now fixed (https://github.com/ansible/ansible/issues/41755)
- fix BotoCoreError exception handling
- fix apt-mark on debian6 (https://github.com/ansible/ansible/pull/41530)
- fix async for the aws_s3 module by adding async support to the action plugin (https://github.com/ansible/ansible/pull/40826)
- fix decrypting vault files for the aws_s3 module (https://github.com/ansible/ansible/pull/39634)
- fix errors with S3-compatible APIs if they cannot use ACLs for buckets or objects
- fix permission handling to try to download a file even if the user does not have permission to list all objects in the bucket
- fixed config required handling, specifically for _terms in lookups https://github.com/ansible/ansible/pull/41740
- gce_net - Fix sorting of allowed ports (https://github.com/ansible/ansible/pull/41567)
- group_by - support implicit localhost (https://github.com/ansible/ansible/pull/41860)
- import/include - Ensure role handlers have the proper parent, allowing for correct attribute inheritance (https://github.com/ansible/ansible/pull/39426)
- import_playbook - Pass vars applied to import_playbook into parsing of the playbook as they may be needed to parse the imported plays (https://github.com/ansible/ansible/pull/39521)
- include_role/import_role - Don't overwrite included role handlers with play handlers on parse (https://github.com/ansible/ansible/pull/39563)
- include_role/import_role - Fix parameter templating (https://github.com/ansible/ansible/pull/36372)
- include_role/import_role - Use the computed role name for include_role/import_role so to diffentiate between names computed from host vars (https://github.com/ansible/ansible/pull/39516)
- include_role/import_role - improved performance and recursion depth (https://github.com/ansible/ansible/pull/36470)
- lineinfile - fix insertbefore when used with BOF to not insert duplicate lines (https://github.com/ansible/ansible/issues/38219)
- password lookup - Do not load password lookup in network filters, allowing the password lookup to be overriden (https://github.com/ansible/ansible/pull/41907)
- pause - ensure ctrl+c interrupt works in all cases (https://github.com/ansible/ansible/issues/35372)
- powershell - use the tmpdir set by `remote_tmp` for become/async tasks instead of the generic $env:TEMP - https://github.com/ansible/ansible/pull/40210
- selinux - correct check mode behavior to report same changes as normal mode (https://github.com/ansible/ansible/pull/40721)
- spwd - With python 3.6 spwd.getspnam returns PermissionError instead of KeyError if user does not have privileges (https://github.com/ansible/ansible/issues/39472)
- synchronize - Ensure the local connection created by synchronize uses _remote_is_local=True, which causes ActionBase to build a local tmpdir (https://github.com/ansible/ansible/pull/40833)
- template - Fix for encoding issues when a template path contains non-ascii characters and using the template path in ansible_managed (https://github.com/ansible/ansible/issues/27262)
- template action plugin - fix the encoding of filenames to avoid tracebacks on Python2 when characters that are not present in the user's locale are present. (https://github.com/ansible/ansible/pull/39424)
- user - only change the expiration time when necessary (https://github.com/ansible/ansible/issues/13235)
- uses correct conn info for reset_connection https://github.com/ansible/ansible/issues/27520
- win_environment - Fix for issue where the environment value was deleted when a null value or empty string was set - https://github.com/ansible/ansible/issues/40450
- win_file - fix issue where special chars like [ and ] were not being handled correctly https://github.com/ansible/ansible/pull/37901
- win_get_url - fixed a few bugs around authentication and force no when using an FTP URL
- win_iis_webapppool - redirect some module output to null so Ansible can read the output JSON https://github.com/ansible/ansible/issues/40874
- win_template - fix when specifying the dest option as a directory with and without the trailing slash https://github.com/ansible/ansible/issues/39886
- win_updates - Added the ability to run on a scheduled task for older hosts so async starts working again - https://github.com/ansible/ansible/issues/38364
- win_updates - Fix logic when using a whitelist for multiple updates
- win_updates - Fix typo that hid the download error when a download failed
- win_updates - Fixed issue where running win_updates on async fails without any error
- windows become - Show better error messages when the become process fails
- winrm - Add better error handling when the kinit process fails
- winrm - allow `ansible_user` or `ansible_winrm_user` to override `ansible_ssh_user` when both are defined in an inventory - https://github.com/ansible/ansible/issues/39844
- winrm - ensure pexpect is set to not echo the input on a failure and have a manual sanity check afterwards https://github.com/ansible/ansible/issues/41865
- winrm connection plugin - Fix exception messages sometimes raising a traceback when the winrm connection plugin encounters an unrecoverable error. https://github.com/ansible/ansible/pull/39333
- xenserver_facts - ensure module works with newer versions of XenServer (https://github.com/ansible/ansible/pull/35821)
New Plugins
-----------
Callback
~~~~~~~~
- cgroup_memory_recap - Profiles maximum memory usage of tasks and full execution using cgroups
- grafana_annotations - send ansible events as annotations on charts to grafana over http api.
- sumologic - Sends task result events to Sumologic
Connection
~~~~~~~~~~
- httpapi - Use httpapi to run command on network appliances
Inventory
~~~~~~~~~
- foreman - foreman inventory source
- gcp_compute - Google Cloud Compute Engine inventory source
- generator - Uses Jinja2 to construct hosts and groups from patterns
- nmap - Uses nmap to find hosts to target
Lookup
~~~~~~
- onepassword - fetch field values from 1Password
- onepassword_raw - fetch raw json data from 1Password
New Modules
-----------
Cloud
~~~~~
amazon
^^^^^^
- aws_caller_facts - Get facts about the user and account being used to make AWS calls.
- aws_config_aggregation_authorization - Manage cross-account AWS Config authorizations
- aws_config_aggregator - Manage AWS Config aggregations across multiple accounts
- aws_config_delivery_channel - Manage AWS Config delivery channels
- aws_config_recorder - Manage AWS Config Recorders
- aws_config_rule - Manage AWS Config resources
- aws_glue_connection - Manage an AWS Glue connection
- aws_glue_job - Manage an AWS Glue job
- aws_inspector_target - Create, Update and Delete Amazon Inspector Assessment Targets
- aws_ses_identity_policy - Manages SES sending authorization policies
- aws_sgw_facts - Fetch AWS Storage Gateway facts
- ec2_eip_facts - List EC2 EIP details
- ec2_vpc_vpn_facts - Gather facts about VPN Connections in AWS.
- elb_network_lb - Manage a Network Load Balancer
- rds_instance_facts - obtain facts about one or more RDS instances
- rds_snapshot_facts - obtain facts about one or more RDS snapshots
azure
^^^^^
- azure_rm_aks - Manage a managed Azure Container Service (AKS) Instance.
- azure_rm_aks_facts - Get Azure Kubernetes Service facts.
- azure_rm_resource - Create any Azure resource.
- azure_rm_resource_facts - Generic facts of Azure resources.
cloudstack
^^^^^^^^^^
- cs_role_permission - Manages role permissions on Apache CloudStack based clouds.
digital_ocean
^^^^^^^^^^^^^
- digital_ocean_account_facts - Gather facts about DigitalOcean User account
- digital_ocean_certificate_facts - Gather facts about DigitalOcean certificates
- digital_ocean_domain_facts - Gather facts about DigitalOcean Domains
- digital_ocean_image_facts - Gather facts about DigitalOcean images
- digital_ocean_load_balancer_facts - Gather facts about DigitalOcean load balancers
- digital_ocean_region_facts - Gather facts about DigitalOcean regions
- digital_ocean_size_facts - Gather facts about DigitalOcean Droplet sizes
- digital_ocean_snapshot_facts - Gather facts about DigitalOcean Snapshot
- digital_ocean_tag_facts - Gather facts about DigitalOcean tags
- digital_ocean_volume_facts - Gather facts about DigitalOcean volumes
google
^^^^^^
- gcp_compute_address - Creates a GCP Address
- gcp_compute_backend_bucket - Creates a GCP BackendBucket
- gcp_compute_backend_service - Creates a GCP BackendService
- gcp_compute_disk - Creates a GCP Disk
- gcp_compute_firewall - Creates a GCP Firewall
- gcp_compute_forwarding_rule - Creates a GCP ForwardingRule
- gcp_compute_global_address - Creates a GCP GlobalAddress
- gcp_compute_global_forwarding_rule - Creates a GCP GlobalForwardingRule
- gcp_compute_health_check - Creates a GCP HealthCheck
- gcp_compute_http_health_check - Creates a GCP HttpHealthCheck
- gcp_compute_https_health_check - Creates a GCP HttpsHealthCheck
- gcp_compute_image - Creates a GCP Image
- gcp_compute_instance - Creates a GCP Instance
- gcp_compute_instance_group - Creates a GCP InstanceGroup
- gcp_compute_instance_group_manager - Creates a GCP InstanceGroupManager
- gcp_compute_instance_template - Creates a GCP InstanceTemplate
- gcp_compute_network - Creates a GCP Network
- gcp_compute_route - Creates a GCP Route
- gcp_compute_ssl_certificate - Creates a GCP SslCertificate
- gcp_compute_subnetwork - Creates a GCP Subnetwork
- gcp_compute_target_http_proxy - Creates a GCP TargetHttpProxy
- gcp_compute_target_https_proxy - Creates a GCP TargetHttpsProxy
- gcp_compute_target_pool - Creates a GCP TargetPool
- gcp_compute_target_ssl_proxy - Creates a GCP TargetSslProxy
- gcp_compute_target_tcp_proxy - Creates a GCP TargetTcpProxy
- gcp_compute_url_map - Creates a GCP UrlMap
- gcp_container_cluster - Creates a GCP Cluster
- gcp_container_node_pool - Creates a GCP NodePool
- gcp_dns_resource_record_set - Creates a GCP ResourceRecordSet
- gcp_pubsub_subscription - Creates a GCP Subscription
- gcp_pubsub_topic - Creates a GCP Topic
- gcp_storage_bucket - Creates a GCP Bucket
- gcp_storage_bucket_access_control - Creates a GCP BucketAccessControl
heroku
^^^^^^
- heroku_collaborator - Add or delete app collaborators on Heroku
memset
^^^^^^
- memset_dns_reload - Request reload of Memset's DNS infrastructure,
- memset_zone - Creates and deletes Memset DNS zones.
- memset_zone_domain - Create and delete domains in Memset DNS zones.
- memset_zone_record - Create and delete records in Memset DNS zones.
misc
^^^^
- cloud_init_data_facts - Retrieve facts of cloud-init.
opennebula
^^^^^^^^^^
- one_host - Manages OpenNebula Hosts
- one_image - Manages OpenNebula images
- one_image_facts - Gather facts about OpenNebula images
- one_service - Deploy and manage OpenNebula services
- one_vm - Creates or terminates OpenNebula instances
openstack
^^^^^^^^^
- os_server_metadata - Add/Update/Delete Metadata in Compute Instances from OpenStack
- os_volume_snapshot - Create/Delete Cinder Volume Snapshots
scaleway
^^^^^^^^
- scaleway_compute - Scaleway compute management module
- scaleway_sshkey - Scaleway SSH keys management module
vmware
^^^^^^
- vmware_cluster_facts - Gather facts about clusters available in given vCenter
- vmware_datastore_cluster - Manage VMware vSphere datastore clusters
- vmware_datastore_maintenancemode - Place a datastore into maintenance mode
- vmware_guest_disk_facts - Gather facts about disks of given virtual machine
- vmware_guest_snapshot_facts - Gather facts about virtual machine's snapshots in vCenter
- vmware_host_capability_facts - Gathers facts about an ESXi host's capability information
- vmware_host_powerstate - Manages power states of host systems in vCenter
- vmware_local_user_facts - Gather facts about users on the given ESXi host
- vmware_portgroup_facts - Gathers facts about an ESXi host's portgroup configuration
- vmware_resource_pool_facts - Gathers facts about resource pool information
- vmware_tag - Manage VMware tags
- vmware_tag_facts - Manage VMware tag facts
- vmware_vswitch_facts - Gathers facts about an ESXi host's vswitch configurations
Clustering
~~~~~~~~~~
k8s
^^^
- k8s - Manage Kubernetes (K8s) objects
Commands
~~~~~~~~
- psexec - Runs commands on a remote Windows host based on the PsExec model
Monitoring
~~~~~~~~~~
- spectrum_device - Creates/deletes devices in CA Spectrum.
zabbix
^^^^^^
- zabbix_group_facts - Gather facts about Zabbix hostgroup
Net Tools
~~~~~~~~~
ldap
^^^^
- ldap_passwd - Set passwords in LDAP.
Network
~~~~~~~
aci
^^^
- aci_l3out - Manage Layer 3 Outside (L3Out) objects (l3ext:Out)
avi
^^^
- avi_autoscalelaunchconfig - Module for setup of AutoScaleLaunchConfig Avi RESTful Object
- avi_l4policyset - Module for setup of L4PolicySet Avi RESTful Object
- avi_useraccount - Avi UserAccount Module
cnos
^^^^
- cnos_command - Run arbitrary commands on Lenovo CNOS devices
- cnos_config - Manage Lenovo CNOS configuration sections
exos
^^^^
- exos_command - Run commands on remote devices running Extreme EXOS
f5
^^
- bigip_data_group - Manage data groups on a BIG-IP
- bigip_device_license - Manage license installation and activation on BIG-IP devices
- bigip_gtm_global - Manages global GTM settings
- bigip_gtm_monitor_bigip - Manages F5 BIG-IP GTM BIG-IP monitors
- bigip_gtm_monitor_external - Manages external GTM monitors on a BIG-IP
- bigip_gtm_monitor_firepass - Manages F5 BIG-IP GTM FirePass monitors
- bigip_gtm_monitor_http - Manages F5 BIG-IP GTM http monitors
- bigip_gtm_monitor_https - Manages F5 BIG-IP GTM https monitors
- bigip_gtm_monitor_tcp - Manages F5 BIG-IP GTM tcp monitors
- bigip_gtm_monitor_tcp_half_open - Manages F5 BIG-IP GTM tcp half-open monitors
- bigip_gtm_pool_member - Manage GTM pool member settings
- bigip_gtm_virtual_server - Manages F5 BIG-IP GTM virtual servers
- bigip_log_destination - Manages log destinations on a BIG-IP.
- bigip_log_publisher - Manages log publishers on a BIG-IP
- bigip_management_route - Manage system management routes on a BIG-IP
- bigip_monitor_external - Manages external LTM monitors on a BIG-IP
- bigip_profile_dns - Manage DNS profiles on a BIG-IP
- bigip_profile_tcp - Manage TCP profiles on a BIG-IP
- bigip_profile_udp - Manage UDP profiles on a BIG-IP
- bigip_service_policy - Manages service policies on a BIG-IP.
- bigip_smtp - Manages SMTP settings on the BIG-IP
- bigip_snmp_community - Manages SNMP communities on a BIG-IP.
- bigip_timer_policy - Manage timer policies on a BIG-IP
- bigip_trunk - Manage trunks on a BIG-IP
- bigiq_application_fasthttp - Manages BIG-IQ FastHTTP applications
- bigiq_application_fastl4_tcp - Manages BIG-IQ FastL4 TCP applications
- bigiq_application_fastl4_udp - Manages BIG-IQ FastL4 UDP applications
- bigiq_application_http - Manages BIG-IQ HTTP applications
- bigiq_application_https_offload - Manages BIG-IQ HTTPS offload applications
- bigiq_application_https_waf - Manages BIG-IQ HTTPS WAF applications
- bigiq_regkey_license_assignment - Manage regkey license assignment on BIG-IPs from a BIG-IQ.
- bigiq_utility_license - Manage utility licenses on a BIG-IQ
files
^^^^^
- net_get - Copy a file from a network device to Ansible Controller
- net_put - Copy a file from Ansible Controller to a network device
fortios
^^^^^^^
- fortios_webfilter - Configure webfilter capabilities of FortiGate and FortiOS.
meraki
^^^^^^
- meraki_admin - Manage administrators in the Meraki cloud
- meraki_network - Manage networks in the Meraki cloud
- meraki_organization - Manage organizations in the Meraki cloud
- meraki_snmp - Manage organizations in the Meraki cloud
netconf
^^^^^^^
- netconf_get - Fetch configuration/state data from NETCONF enabled network devices.
- netconf_rpc - Execute operations on NETCONF enabled network devices.
slxos
^^^^^
- slxos_command - Run commands on remote devices running Extreme Networks SLX-OS
- slxos_config - Manage Extreme Networks SLX-OS configuration sections
- slxos_facts - Collect facts from devices running Extreme SLX-OS
- slxos_interface - Manage Interfaces on Extreme SLX-OS network devices
- slxos_l2_interface - Manage Layer-2 interface on Extreme Networks SLXOS devices.
- slxos_l3_interface - Manage L3 interfaces on Extreme Networks SLXOS network devices.
- slxos_linkagg - Manage link aggregation groups on Extreme Networks SLXOS network devices
- slxos_vlan - Manage VLANs on Extreme Networks SLX-OS network devices
Packaging
~~~~~~~~~
language
^^^^^^^^
- yarn - Manage node.js packages with Yarn
os
^^
- flatpak - Manage flatpaks
- flatpak_remote - Manage flatpak repository remotes
Source Control
~~~~~~~~~~~~~~
- gitlab_deploy_key - Manages GitLab project deploy keys.
- gitlab_hooks - Manages GitLab project hooks.
Storage
~~~~~~~
glusterfs
^^^^^^^^^
- gluster_peer - Attach/Detach peers to/from the cluster
netapp
^^^^^^
- na_ontap_aggregate - Manage NetApp ONTAP aggregates.
- na_ontap_broadcast_domain - Manage NetApp ONTAP broadcast domains.
- na_ontap_broadcast_domain_ports - Manage NetApp Ontap broadcast domain ports
- na_ontap_cifs - Manage NetApp cifs-share
- na_ontap_cifs_acl - Manage NetApp cifs-share-access-control
- na_ontap_cifs_server - cifs server configuration
- na_ontap_cluster - Create/Join ONTAP cluster. Apply license to cluster
- na_ontap_cluster_ha - Manage HA status for cluster
- na_ontap_export_policy - Manage NetApp ONTAP export-policy
- na_ontap_export_policy_rule - Manage ONTAP Export rules
- na_ontap_igroup - ONTAP iSCSI igroup configuration
- na_ontap_interface - ONTAP LIF configuration
- na_ontap_iscsi - Manage NetApp Ontap iscsi service
- na_ontap_job_schedule - Manage NetApp Ontap Job Schedule
- na_ontap_license - Manage NetApp ONTAP protocol and feature licenses
- na_ontap_lun - Manage NetApp Ontap luns
- na_ontap_lun_map - Manage NetApp Ontap lun maps
- na_ontap_net_ifgrp - Create, modify, destroy the network interface group
- na_ontap_net_port - Manage NetApp Ontap network ports.
- na_ontap_net_routes - Manage NetApp Ontap network routes
- na_ontap_net_vlan - Manage NetApp Ontap network vlan
- na_ontap_nfs - Manage Ontap NFS status
- na_ontap_ntp - Create/Delete/modify_version ONTAP NTP server
- na_ontap_qtree - Manage qtrees
- na_ontap_service_processor_network - Manage NetApp Ontap service processor network
- na_ontap_snapshot - Manage NetApp Sanpshots
- na_ontap_snmp - Manage NetApp SNMP community
- na_ontap_svm - Manage NetApp Ontap svm
- na_ontap_ucadapter - ONTAP UC adapter configuration
- na_ontap_user - useradmin configuration and management
- na_ontap_user_role - useradmin configuration and management
- na_ontap_volume - Manage NetApp ONTAP volumes.
- na_ontap_volume_clone - Manage NetApp Ontap volume clones.
purestorage
^^^^^^^^^^^
- purefa_ds - Configure FlashArray Directory Service
- purefa_facts - Collect facts from Pure Storage FlashArray
- purefa_pgsnap - Manage protection group snapshots on Pure Storage FlashArrays
- purefb_fs - Manage filesystemon Pure Storage FlashBlade`
- purefb_snap - Manage filesystem snapshots on Pure Storage FlashBlades
System
~~~~~~
- sysvinit - Manage SysV services.
Web Infrastructure
~~~~~~~~~~~~~~~~~~
- acme_account - Create, modify or delete accounts with Let's Encrypt
Windows
~~~~~~~
- win_domain_computer - Manage computers in Active Directory
- win_hostname - Manages local Windows computer name.
- win_pester - Run Pester tests on Windows hosts

View File

@ -3,16 +3,11 @@ release_tag_re: '(v(?:[\d.ab\-]|rc)+)'
pre_release_tag_re: '(?P<pre_release>(?:[ab]|rc)+\d*)$'
notesdir: fragments
prelude_section_name: release_summary
new_plugins_after_name: removed_features
sections:
- ['major_changes', 'Major Changes']
- ['minor_changes', 'Minor Changes']
- ['deprecated_features', 'Deprecated Features']
- ['removed_features', 'Removed Features (previously deprecated)']
- ['new_lookup_plugins', 'New Lookup Plugins']
- ['new_callback_plugins', 'New Callback Plugins']
- ['new_connection_plugins', 'New Connection Plugins']
- ['new_test_plugins', 'New Test Plugins']
- ['new_filter_plugins', 'New Filter Plugins']
- ['new_modules', 'New Modules']
- ['bugfixes', 'Bugfixes']
- ['known_issues', 'Known Issues']

View File

@ -0,0 +1,2 @@
bugfixes:
- ansible-doc - fixed traceback on missing plugins (https://github.com/ansible/ansible/pull/41167)

View File

@ -0,0 +1,2 @@
bugfixes:
- fix apt-mark on debian6 (https://github.com/ansible/ansible/pull/41530)

View File

@ -0,0 +1,4 @@
---
bugfixes:
- Changed the admin_users config option to not include "admin" by default as
admin is frequently used for a non-privileged account (https://github.com/ansible/ansible/pull/41164)

View File

@ -1,2 +1,2 @@
removed_features:
- removed the deprecated always_run task option, please use `check_mode: no` instead
- "removed the deprecated always_run task option, please use `check_mode: no` instead"

View File

@ -0,0 +1,2 @@
bugfixes:
- '**Security Fix** - avoid loading host/group vars from cwd when not specifying a playbook or playbook base dir'

View File

@ -0,0 +1,3 @@
---
bugfixes:
- fix async for the aws_s3 module by adding async support to the action plugin (https://github.com/ansible/ansible/pull/40826)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- fix decrypting vault files for the aws_s3 module (https://github.com/ansible/ansible/pull/39634)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- allow custom endpoints to be used in the aws_s3 module (https://github.com/ansible/ansible/pull/36832)

View File

@ -0,0 +1,5 @@
---
bugfixes:
- fix permission handling to try to download a file even if the user does not have permission to list all objects in the bucket
- fix BotoCoreError exception handling
- fix errors with S3-compatible APIs if they cannot use ACLs for buckets or objects

View File

@ -0,0 +1,3 @@
---
minor_changes:
- Restore module_utils.basic.BOOLEANS variable for backwards compatibility with the module API in older ansible releases.

View File

@ -1,4 +1,4 @@
---
features:
minor_changes:
- command module - Added argv option to allow command to be specified as a list vs. a string
(https://github.com/ansible/ansible/issues/19392)

View File

@ -0,0 +1,2 @@
bugfixes:
- correct debug display for all cases https://github.com/ansible/ansible/pull/41331

View File

@ -0,0 +1,3 @@
---
bugfixes:
- Fix added for Digital Ocean Volumes API change causing Ansible to recieve an unexpected value in the response. (https://github.com/ansible/ansible/pull/41431)

View File

@ -0,0 +1,3 @@
---
bugfixes:
- cast the device_mapping volume size to an int in the ec2_ami module (https://github.com/ansible/ansible/pull/40938)

View File

@ -0,0 +1,4 @@
---
bugfixes:
- Changed the output to "text" for "show vrf" command as default "json" output format
with respect to "eapi" transport was failing (https://github.com/ansible/ansible/pull/41470)

View File

@ -0,0 +1,5 @@
---
bugfixes:
- file module - The touch subcommand had its diff output broken during the
2.6.x development cycle. The patch to fix that broke check mode.
This is now fixed (https://github.com/ansible/ansible/issues/42111)

View File

@ -0,0 +1,4 @@
---
bugfixes:
- file module - The touch subcommand had its diff output broken during the
2.6.x development cycle. This is now fixed (https://github.com/ansible/ansible/issues/41755)

View File

@ -0,0 +1,2 @@
bugfixes:
- fixed config required handling, specifically for _terms in lookups https://github.com/ansible/ansible/pull/41740

View File

@ -0,0 +1,2 @@
bugfixes:
- allow set_options to be called multiple times https://github.com/ansible/ansible/pull/41913

View File

@ -0,0 +1,2 @@
bugfixes:
- password lookup - Do not load password lookup in network filters, allowing the password lookup to be overriden (https://github.com/ansible/ansible/pull/41907)

View File

@ -0,0 +1,2 @@
bugfixes:
- correctly handle yaml inventory files when entries are null dicts https://github.com/ansible/ansible/issues/41692

View File

@ -0,0 +1,3 @@
---
bugfixes:
- gce_net - Fix sorting of allowed ports (https://github.com/ansible/ansible/pull/41567)

View File

@ -1,2 +1,2 @@
new_features:
minor_changes:
- gem - add ability to specify a custom directory for installing gems (https://github.com/ansible/ansible/pull/38195)

View File

@ -0,0 +1,2 @@
bugfixes:
- group_by - support implicit localhost (https://github.com/ansible/ansible/pull/41860)

View File

@ -3,7 +3,6 @@ minor_changes:
- import/include - Cache task_vars to speed up IncludedFile.process_include_results (https://github.com/ansible/ansible/pull/39026)
bugfixes:
- import/include - Update TaskInclude _raw_params with the expanded/templated path to file allowing nested includes using host vars in file (https://github.com/ansible/ansible/pull/39365)
- dynamic includes - Don't treat undefined vars for conditional includes as truthy (https://github.com/ansible/ansible/pull/39377)
- import/include - Ensure role handlers have the proper parent, allowing for correct attribute inheritance (https://github.com/ansible/ansible/pull/39426)
- include_role/import_role - Use the computed role name for include_role/import_role so to diffentiate between names computed from host vars (https://github.com/ansible/ansible/pull/39516)

View File

@ -0,0 +1,5 @@
---
bugfixes:
- inventory manager - This fixes required options being populated before the
inventory config file is read, so the required options may be set in the
config file.

View File

@ -0,0 +1,5 @@
---
bugfixes:
- Fix iosxr_config module to handle route-policy, community-set, prefix-set,
as-path-set and rd-set blocks. All these blocks are part of route-policy
language of iosxr.

View File

@ -0,0 +1,2 @@
bugfixes:
- Fix junos_config confirm commit timeout issue (https://github.com/ansible/ansible/pull/41527)

View File

@ -0,0 +1,2 @@
bugfixes:
- lineinfile - fix insertbefore when used with BOF to not insert duplicate lines (https://github.com/ansible/ansible/issues/38219)

View File

@ -0,0 +1,2 @@
bugfixes:
- added missing 'raise' to exception definition https://github.com/ansible/ansible/pull/41690

View File

@ -1,34 +0,0 @@
new_features:
- 'New Google Cloud module: gcp_compute_address'
- 'New Google Cloud module: gcp_compute_backend_bucket'
- 'New Google Cloud module: gcp_compute_backend_service'
- 'New Google Cloud module: gcp_compute_firewall'
- 'New Google Cloud module: gcp_compute_forwarding_rule'
- 'New Google Cloud module: gcp_compute_global_address'
- 'New Google Cloud module: gcp_compute_global_forwarding_rule'
- 'New Google Cloud module: gcp_compute_health_check'
- 'New Google Cloud module: gcp_compute_http_health_check'
- 'New Google Cloud module: gcp_compute_https_health_check'
- 'New Google Cloud module: gcp_compute_image'
- 'New Google Cloud module: gcp_compute_instance'
- 'New Google Cloud module: gcp_compute_instance_group'
- 'New Google Cloud module: gcp_compute_instance_group_manager'
- 'New Google Cloud module: gcp_compute_instance_template'
- 'New Google Cloud module: gcp_compute_network'
- 'New Google Cloud module: gcp_compute_route'
- 'New Google Cloud module: gcp_compute_ssl_certificate'
- 'New Google Cloud module: gcp_compute_subnetwork'
- 'New Google Cloud module: gcp_compute_target_http_proxy'
- 'New Google Cloud module: gcp_compute_target_https_proxy'
- 'New Google Cloud module: gcp_compute_target_pool'
- 'New Google Cloud module: gcp_compute_target_ssl_proxy'
- 'New Google Cloud module: gcp_compute_target_tcp_proxy'
- 'New Google Cloud module: gcp_compute_url_map'
- 'New Google Cloud module: gcp_container_cluster'
- 'New Google Cloud module: gcp_container_node_pool'
- 'New Google Cloud module: gcp_dns_managed_zone'
- 'New Google Cloud module: gcp_dns_resource_record_set'
- 'New Google Cloud module: gcp_pubsub_subscription'
- 'New Google Cloud module: gcp_pubsub_topic'
- 'New Google Cloud module: gcp_storage_bucket'
- 'New Google Cloud module: gcp_storage_bucket_access_control'

View File

@ -0,0 +1,9 @@
---
bugfixes:
- '**Security Fix** - Some connection exceptions would cause no_log specified on
a task to be ignored. If this happened, the task information, including any
private information could have been displayed to stdout and (if enabled, not
the default) logged to a log file specified in ansible.cfg''s log_path.
Additionally, sites which redirected stdout from ansible runs to a log file
may have stored that private information onto disk that way as well.
(https://github.com/ansible/ansible/pull/41414)'

View File

@ -0,0 +1,2 @@
bugfixes:
- nsupdate - allow hmac-sha384 https://github.com/ansible/ansible/pull/42209

View File

@ -1,2 +0,0 @@
features:
- onepassword lookup - add lookup plugins onepassword and onepassword_raw to retrieve secrets from 1Password vault (https://github.com/ansible/ansible/pull/37207)

View File

@ -0,0 +1,2 @@
bugfixes:
- uses correct conn info for reset_connection https://github.com/ansible/ansible/issues/27520

View File

@ -0,0 +1,2 @@
bugfixes:
- synchronize - Ensure the local connection created by synchronize uses _remote_is_local=True, which causes ActionBase to build a local tmpdir (https://github.com/ansible/ansible/pull/40833)

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-06-28
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -1 +1,7 @@
{}
deprecated_features:
- nxos_igmp_interface module - The oif_prefix and oif_source properties are deprecated. Use the oif_ps parameter with a dictionary of prefix and source to values instead.
minor_changes:
- cloudflare_dns module - Removed restriction from protocol to allow other protocols than tcp and udp to be specified.
- vmware_target_canonical_facts module - The target_id parameter is an optional parameter.
- postgresql_user module - Changed encrypted=yes to be the default. This shouldn't break any current playbooks, the module will just store passwords hashed by default. This change was done because Postgres 10 dropped support for UNENCRYPTED passwords and because all versions since Postgres 7.2 support storing encrypted passwords.

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-05-30
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-06-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-06-08
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-06-18
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-06-25
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-06-26
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1,3 @@
release_summary: |
| Release Date: 2018-07-05
| `Porting Guide <https://docs.ansible.com/ansible/devel/porting_guides.html>`_

View File

@ -0,0 +1,2 @@
bugfixes:
- correctly check hostvars for vars term https://github.com/ansible/ansible/pull/41819

View File

@ -0,0 +1,3 @@
---
minor_changes:
- Raise AnsibleParserError which was missing previously

View File

@ -0,0 +1,2 @@
bugfixes:
- win_domain - fixes typo in one of the AD cmdlets https://github.com/ansible/ansible/issues/41536

View File

@ -0,0 +1,2 @@
bugfixes:
- win_group_membership - uses the internal Ansible SID conversion logic and uses that when comparing group membership instead of the name https://github.com/ansible/ansible/issues/40649

View File

@ -0,0 +1,2 @@
bugfixes:
- win_iis_webapppool - redirect some module output to null so Ansible can read the output JSON https://github.com/ansible/ansible/issues/40874

View File

@ -0,0 +1,2 @@
bugfixes:
- win_updates - Fixed issue where running win_updates on async fails without any error

View File

@ -0,0 +1,2 @@
bugfixes:
- winrm - ensure pexpect is set to not echo the input on a failure and have a manual sanity check afterwards https://github.com/ansible/ansible/issues/41865

View File

@ -0,0 +1,2 @@
bugfixes:
- '**Security Fix** - avoid using ansible.cfg in a world writable dir.'

View File

@ -326,10 +326,10 @@ class AzureRM(object):
# get authentication authority
# for adfs, user could pass in authority or not.
# for others, use default authority from cloud environment
if self.credentials.get('adfs_authority_url') is None:
self._adfs_authority_url = self._cloud_environment.endpoints.active_directory
else:
if self.credentials.get('adfs_authority_url'):
self._adfs_authority_url = self.credentials.get('adfs_authority_url')
else:
self._adfs_authority_url = self._cloud_environment.endpoints.active_directory
# get resource from cloud environment
self._resource = self._cloud_environment.endpoints.active_directory_resource_id
@ -627,6 +627,8 @@ class AzureInventory(object):
help='Active Directory User')
parser.add_argument('--password', action='store',
help='password')
parser.add_argument('--adfs_authority_url', action='store',
help='Azure ADFS authority url')
parser.add_argument('--cloud_environment', action='store',
help='Azure Cloud Environment name or metadata discovery URL')
parser.add_argument('--resource-groups', action='store',

View File

@ -191,8 +191,13 @@ def is_cache_stale(cache_file, cache_expiration_time, refresh=False):
def get_cache_settings(cloud=None):
config = cloud_config.OpenStackConfig(
config_files=cloud_config.CONFIG_FILES + CONFIG_FILES).get_one()
config_files = cloud_config.CONFIG_FILES + CONFIG_FILES
if cloud:
config = cloud_config.OpenStackConfig(
config_files=config_files).get_one(cloud=cloud)
else:
config = cloud_config.OpenStackConfig(
config_files=config_files).get_all()[0]
# For inventory-wide caching
cache_expiration_time = config.get_cache_expiration_time()
cache_path = config.get_cache_path()

View File

@ -85,6 +85,28 @@ pp = PrettyPrinter()
display = Display()
# kludge_ns gives us a kludgey way to set variables inside of loops that need to be visible outside
# the loop. We can get rid of this when we no longer need to build docs with less than Jinja-2.10
# http://jinja.pocoo.org/docs/2.10/templates/#assignments
# With Jinja-2.10 we can use jinja2's namespace feature, restoring the namespace template portion
# of: fa5c0282a4816c4dd48e80b983ffc1e14506a1f5
NS_MAP = {}
def to_kludge_ns(key, value):
NS_MAP[key] = value
return ""
def from_kludge_ns(key):
return NS_MAP[key]
# The max filter was added in Jinja2-2.10. Until we can require that version, use this
def do_max(seq):
return max(seq)
def rst_ify(text):
''' convert symbols like I(this is in italics) to valid restructured text '''
@ -298,6 +320,14 @@ def jinja2_environment(template_dir, typ, plugin_type):
trim_blocks=True)
env.globals['xline'] = rst_xline
# Can be removed (and template switched to use namespace) when we no longer need to build
# with <Jinja-2.10
env.globals['to_kludge_ns'] = to_kludge_ns
env.globals['from_kludge_ns'] = from_kludge_ns
if 'max' not in env.filters:
# Jinja < 2.10
env.filters['max'] = do_max
templates = {}
if typ == 'rst':
env.filters['convert_symbols_to_format'] = rst_ify

View File

@ -156,7 +156,7 @@
<div class="DocSiteProduct-logoText">
Ansible
<div class="DocSiteProduct-CurrentVersion" align="right">
devel
2.6
</div>
</div>
</div>

View File

@ -421,51 +421,17 @@ table {
max-width: 100%;
}
.outer-elbow-container {
display: flex;
height: 100%;
flex-direction: row;
}
.elbow-placeholder {
.documentation-table td.elbow-placeholder {
border-left: 1px solid #000;
height: 100%;
border-top: 0px;
width: 30px;
min-width: 30px;
}
.elbow-key {
height: 100%;
padding: 4px;
border-top: 1px solid #000;
flex-grow: 1;
border-left: 1px solid #000;
}
.elbow-blocker {
height: 0;
overflow: hidden;
}
.return-value-column {
height: 1px
}
.return-value-column td {
height: inherit
}
@-moz-document url-prefix() {
.return-value-column td {
height: 100%
}
}
.cell-border {
.documentation-table th, .documentation-table td {
padding: 4px;
border-left: 1px solid #000;
border-top: 1px solid #000;
height: 100%;
}
.documentation-table {

View File

@ -4867,50 +4867,17 @@ table {
}
}
.outer-elbow-container {
display: flex;
height: 100%;
flex-direction: row;
}
.elbow-placeholder {
.documentation-table td.elbow-placeholder {
border-left: 1px solid #000;
height: 100%;
border-top: 0px;
width: 30px;
min-width: 30px;
}
.elbow-key {
height: 100%;
padding: 4px;
border-top: 1px solid #000;
flex-grow: 1;
border-left: 1px solid #000;
}
.elbow-blocker {
height: 0;
overflow: hidden;
}
.return-value-column {
height: 1px
}
.return-value-column td {
height: inherit
}
@-moz-document url-prefix() {
.return-value-column td {
height: 100%
}
}
.cell-border {
.documentation-table th, .documentation-table td {
padding: 4px;
border-left: 1px solid #000;
border-top: 1px solid #000;
height: 100%;
}
.documentation-table {

View File

@ -21,7 +21,7 @@ When you contribute a new module to the `ansible/ansible <https://github.com/ans
Maintainers of Ansible modules are expected to provide feedback, responses, or actions on pull requests or issues to the module(s) they maintain in a reasonably timely manner.
It is also recommended that you occasionally revisit the `contribution guidelines <https://github.com/ansible/ansible/blob/devel/CONTRIBUTING.md>`_, as they are continually refined. Occasionally, you may be requested to update your module to move it closer to the general accepted standard requirements. We hope for this to be infrequent, and will always be a request with a fair amount of lead time (ie: not by tomorrow!).
It is also recommended that you occasionally revisit the `contribution guidelines <https://github.com/ansible/ansible/blob/devel/.github/CONTRIBUTING.md>`_, as they are continually refined. Occasionally, you may be requested to update your module to move it closer to the general accepted standard requirements. We hope for this to be infrequent, and will always be a request with a fair amount of lead time (ie: not by tomorrow!).
Finally, following the `ansible-devel <https://groups.google.com/forum/#!forum/ansible-devel>`_ mailing list can be a great way to participate in the broader Ansible community, and a place where you can influence the overall direction, quality, and goals of Ansible and its modules. If you're not on this relatively low-volume list, please join us here: https://groups.google.com/forum/#!forum/ansible-devel

View File

@ -239,7 +239,9 @@ The following fields can be used and are all required unless specified otherwise
:choices:
List of option values. Should be absent if empty.
:type:
If an argument is ``type='bool'``, this field should be set to ``type: bool`` and no ``choices`` should be specified.
* Specifies the data type that option accepts, must match the ``argspec``.
* If an argument is ``type='bool'``, this field should be set to ``type: bool`` and no ``choices`` should be specified.
:aliases:
List of option name aliases; generally not needed.
:version_added:

View File

@ -0,0 +1,15 @@
Sanity Tests » changelog
========================
Basic linting of changelog fragments with yamllint and rstcheck.
One or more of the following sections are required:
- major_changes
- minor_changes
- deprecated_features
- removed_features
- bugfixes
- known_issues
New modules and plugins must not be included in changelog fragments.

View File

@ -22,7 +22,7 @@ Paths where configuration file is searched are listed in :ref:`reference documen
.. _getting_the_latest_configuration:
Getting the latest configuration
================================
--------------------------------
If installing Ansible from a package manager, the latest ansible.cfg file should be present in /etc/ansible, possibly
as a ".rpmnew" file (or other) as appropriate in the case of updates.
@ -36,6 +36,7 @@ For more details and a full listing of available configurations go to :ref:`conf
For in-depth details, see :ref:`ansible_configuration_settings`.
.. _environmental_configuration:
Environmental configuration
===========================
@ -56,4 +57,3 @@ Settings in the command line will override those passed through the configuratio
The full list of options available is in :ref:`ansible-playbook` and :ref:`ansible`.

View File

@ -4,7 +4,7 @@
EOS Platform Options
***************************************
Arista EOS supports multiple connections. This page offers details on how each connection works in Ansible 2.5 and how to use it.
Arista EOS supports multiple connections. This page offers details on how each connection works in Ansible 2.6 and how to use it.
.. contents:: Topics
@ -41,7 +41,7 @@ Connections Available
For legacy playbooks, EOS still supports ``ansible_connection: local``. We recommend modernizing to use ``ansible_connection: network_cli`` or ``ansible_connection: httpapi`` as soon as possible.
Using CLI in Ansible 2.5
Using CLI in Ansible 2.6
================================================================================
Example CLI ``group_vars/eos.yml``
@ -76,7 +76,7 @@ Example CLI Task
Using eAPI in Ansible 2.5
Using eAPI in Ansible 2.6
================================================================================
Enabling eAPI

View File

@ -4,7 +4,7 @@
IOS Platform Options
***************************************
IOS supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on IOS in Ansible 2.5.
IOS supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on IOS in Ansible 2.6.
.. contents:: Topics
@ -34,7 +34,7 @@ Connections Available
For legacy playbooks, IOS still supports ``ansible_connection: local``. We recommend modernizing to use ``ansible_connection: network_cli`` as soon as possible.
Using CLI in Ansible 2.5
Using CLI in Ansible 2.6
================================================================================
Example CLI ``group_vars/ios.yml``

View File

@ -4,7 +4,7 @@
Junos OS Platform Options
***************************************
Juniper Junos OS supports multiple connections. This page offers details on how each connection works in Ansible 2.5 and how to use it.
Juniper Junos OS supports multiple connections. This page offers details on how each connection works in Ansible 2.6 and how to use it.
.. contents:: Topics
@ -34,7 +34,7 @@ Connections Available
For legacy playbooks, Ansible still supports ``ansible_connection=local`` on all JUNOS modules. We recommend modernizing to use ``ansible_connection=netconf`` or ``ansible_connection=network_cli`` as soon as possible.
Using CLI in Ansible 2.5
Using CLI in Ansible 2.6
================================================================================
Example CLI inventory ``[junos:vars]``
@ -65,7 +65,7 @@ Example CLI Task
when: ansible_network_os == 'junos'
Using NETCONF in Ansible 2.5
Using NETCONF in Ansible 2.6
================================================================================
Enabling NETCONF

View File

@ -4,7 +4,7 @@
NXOS Platform Options
***************************************
Cisco NXOS supports multiple connections. This page offers details on how each connection works in Ansible 2.5 and how to use it.
Cisco NXOS supports multiple connections. This page offers details on how each connection works in Ansible 2.6 and how to use it.
.. contents:: Topics
@ -22,6 +22,10 @@ Connections Available
| **Indirect Access** | via a bastion (jump host) | via a web proxy |
+---------------------------+-----------------------------------------------+-----------------------------------------+
| | **Connection Settings** | | ``ansible_connection: network_cli`` | | ``ansible_connection: httpapi`` |
| | | | | | OR |
| | | | | | ``ansible_connection: local`` |
| | | | | | with ``transport: nxapi`` |
| | | | | | in the ``provider`` dictionary |
+---------------------------+-----------------------------------------------+-----------------------------------------+
| | **Enable Mode** | | supported - use ``ansible_become: yes`` | | not supported by NX-API |
| | (Privilege Escalation) | | with ``ansible_become_method: enable`` | | |
@ -32,7 +36,7 @@ Connections Available
For legacy playbooks, NXOS still supports ``ansible_connection: local``. We recommend modernizing to use ``ansible_connection: network_cli`` or ``ansible_connection: httpapi`` as soon as possible.
Using CLI in Ansible 2.5
Using CLI in Ansible 2.6
================================================================================
Example CLI ``group_vars/nxos.yml``
@ -67,7 +71,7 @@ Example CLI Task
Using NX-API in Ansible 2.5
Using NX-API in Ansible 2.6
================================================================================
Enabling NX-API

View File

@ -9,7 +9,7 @@ This section discusses the behavioral changes between Ansible 1.x and Ansible 2.
It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible.
We suggest you read this page along with `Ansible Changelog <https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#2.0>`_ to understand what updates you may need to make.
We suggest you read this page along with `Ansible Changelog for 2.0 <https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md>`_ to understand what updates you may need to make.
This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides <porting_guides>`.

View File

@ -9,7 +9,7 @@ This section discusses the behavioral changes between Ansible 2.2 and Ansible 2.
It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible.
We suggest you read this page along with `Ansible Changelog <https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#2.3>`_ to understand what updates you may need to make.
We suggest you read this page along with `Ansible Changelog for 2.3 <https://github.com/ansible/ansible/blob/stable-2.3/CHANGELOG.md>`_ to understand what updates you may need to make.
This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides <porting_guides>`.

View File

@ -9,7 +9,7 @@ This section discusses the behavioral changes between Ansible 2.3 and Ansible 2.
It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible.
We suggest you read this page along with `Ansible Changelog <https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md#2.4>`_ to understand what updates you may need to make.
We suggest you read this page along with `Ansible Changelog for 2.4 <https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md>`_ to understand what updates you may need to make.
This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides <porting_guides>`.

View File

@ -8,7 +8,7 @@ This section discusses the behavioral changes between Ansible 2.4 and Ansible 2.
It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible.
We suggest you read this page along with `Ansible Changelog <https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#2.5>`_ to understand what updates you may need to make.
We suggest you read this page along with `Ansible Changelog for 2.5 <https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst>`_ to understand what updates you may need to make.
This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides <porting_guides>`.
@ -91,6 +91,11 @@ You will run into errors because Ansible reads name in this context as a keyword
For a full list of keywords see ::ref::`Playbook Keywords`.
Migrating from with_X to loop
-----------------------------
.. include:: ../user_guide/shared_snippets/with2loop.txt
Deprecated
==========
@ -197,6 +202,12 @@ desired.
* The :ref:`blockinfile module <blockinfile_module>` had its ``follow`` parameter removed because
it inherently modifies the content of an existing file so it makes no sense to operate on the
link itself.
* In Ansible-2.5.3, the :ref:`template module <template_module>` became more strict about its
``src`` file being proper utf-8. Previously, non-utf8 contents in a template module src file
would result in a mangled output file (the non-utf8 characters would be replaced with a unicode
replacement character). Now, on Python2, the module will error out with the message, "Template
source files must be utf-8 encoded". On Python3, the module will first attempt to pass the
non-utf8 characters through verbatim and fail if that does not succeed.
Plugins
=======

View File

@ -8,7 +8,7 @@ This section discusses the behavioral changes between Ansible 2.5 and Ansible 2.
It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible.
We suggest you read this page along with `Ansible Changelog <https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#2.6>`_ to understand what updates you may need to make.
We suggest you read this page along with `Ansible Changelog for 2.6 <https://github.com/ansible/ansible/blob/stable-2.6/changelogs/CHANGELOG-v2.6.rst>`_ to understand what updates you may need to make.
This document is part of a collection on porting. The complete list of porting guides can be found at :ref:`porting guides <porting_guides>`.
@ -42,6 +42,9 @@ Deprecation notices
The following modules will be removed in Ansible 2.10. Please update your playbooks accordingly.
* ``k8s_raw`` use :ref:`k8s <k8s_module>` instead.
* ``openshift_raw`` use :ref:`k8s <k8s_module>` instead.
* ``openshift_scale`` use :ref:`k8s_scale <k8s_scale_module>` instead.
Noteworthy module changes
-------------------------
@ -62,12 +65,34 @@ Noteworthy module changes
destination path like this::
$ ansible localhost -m file -a 'path=/tmp/lib state=directory'
* The ``k8s_raw`` and ``openshift_raw`` modules have been aliased to the new ``k8s`` module.
* The ``k8s`` module supports all Kubernetes resources including those from Custom Resource Definitions and aggregated API servers. This includes all OpenShift resources.
* The ``k8s`` module will not accept resources where subkeys have been snake_cased. This was a workaround that was suggested with the ``k8s_raw`` and ``openshift_raw`` modules.
* The ``k8s`` module may not accept resources where the ``api_version`` has been changed to match the shortened version in the Kubernetes Python client. You should now specify the proper full Kubernetes ``api_version`` for a resource.
* The ``k8s`` module can now process multi-document YAML files if they are passed with the ``src`` parameter. It will process each document as a separate resource. Resources provided inline with the ``resource_definition`` parameter must still be a single document.
* 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``.
Plugins
=======
No notable changes.
Deprecation notices
-------------------
The following modules will be removed in Ansible 2.10. Please update your playbooks accordingly.
* ``openshift`` use ``k8s`` instead.
Noteworthy plugin changes
-------------------------
* The ``k8s`` lookup plugin now supports all Kubernetes resources including those from Custom Resource Definitions and aggregated API servers. This includes all OpenShift resources.
* The ``k8s`` lookup plugin may not accept resources where the ``api_version`` has been changed to match the shortened version in the Kubernetes Python client. You should now specify the proper full Kubernetes ``api_version`` for a resource.
* The ``k8s`` lookup plugin will no longer 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.
Porting custom scripts
======================

View File

@ -235,6 +235,6 @@ value::
`YAML 1.1 Specification <http://yaml.org/spec/1.1/>`_
The Specification for YAML 1.1, which PyYAML and libyaml are currently
implementing
`YAML 1.2 Specification <http://yaml.org/spec/1.2/>`_
`YAML 1.2 Specification <http://yaml.org/spec/1.2/spec.html>`_
For completeness, YAML 1.2 is the successor of 1.1

View File

@ -18,7 +18,7 @@ You can also use the site to share roles that you create. By authenticating with
them available to the Ansible community. Imported roles become available in the Galaxy search index and visible on the site, allowing users to
discover and download them.
Learn more by viewing `the About page <https://galaxy.ansible.com/intro>`_.
Learn more by viewing `the About page <https://galaxy.ansible.com/docs/>`_.
The command line tool
`````````````````````

View File

@ -40,14 +40,14 @@ Release status
=============== ========================== =================================================
Ansible Release Latest Version Status
=============== ========================== =================================================
devel `2.6` (unreleased, trunk) In development
2.5 `2.5.0`_ (2018-03-23) Supported (security **and** general bugfixes)
2.4 `2.4.4`_ (2018-01-31) Supported (security **and** critical bug fixes)
2.3 `2.3.3`_ (2017-12-20) Unsupported (end of life)
2.2 `2.2.3`_ (2017-05-09) Unsupported (end of life)
2.1 `2.1.6`_ (2017-06-01) Unsupported (end of life)
2.0 `2.0.2`_ (2016-04-19) Unsupported (end of life)
1.9 `1.9.6`_ (2016-04-15) Unsupported (end of life)
devel 2.6 (unreleased, trunk) In development
`2.5`_ 2.5.4 (2018-05-31) Supported (security **and** general bugfixes)
`2.4`_ 2.4.4 (2018-01-31) Supported (security **and** critical bug fixes)
`2.3`_ 2.3.3 (2017-12-20) Unsupported (end of life)
`2.2`_ 2.2.3 (2017-05-09) Unsupported (end of life)
`2.1`_ 2.1.6 (2017-06-01) Unsupported (end of life)
`2.0`_ 2.0.2 (2016-04-19) Unsupported (end of life)
`1.9`_ 1.9.6 (2016-04-15) Unsupported (end of life)
<1.9 n/a Unsupported (end of life)
=============== ========================== =================================================
@ -57,13 +57,14 @@ devel `2.6` (unreleased, trunk) In development
.. Comment: devel used to point here but we're currently revamping our changelog process and have no
link to a static changelog for devel _2.6: https://github.com/ansible/ansible/blob/devel/CHANGELOG.md
.. _2.5.0: https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst
.. _2.4.4: https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md
.. _2.3.3: https://github.com/ansible/ansible/blob/stable-2.3/CHANGELOG.md
.. _2.2.3: https://github.com/ansible/ansible/blob/stable-2.2/CHANGELOG.md
.. _2.1.6: https://github.com/ansible/ansible/blob/stable-2.1/CHANGELOG.md
.. _2.0.2: https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md
.. _1.9.6: https://github.com/ansible/ansible/blob/stable-1.9/CHANGELOG.md
.. _2.6: https://github.com/ansible/ansible/blob/stable-2.6/changelogs/CHANGELOG-v2.6.rst
.. _2.5: https://github.com/ansible/ansible/blob/stable-2.5/changelogs/CHANGELOG-v2.5.rst
.. _2.4: https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md
.. _2.3: https://github.com/ansible/ansible/blob/stable-2.3/CHANGELOG.md
.. _2.2: https://github.com/ansible/ansible/blob/stable-2.2/CHANGELOG.md
.. _2.1: https://github.com/ansible/ansible/blob/stable-2.1/CHANGELOG.md
.. _2.0: https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md
.. _1.9: https://github.com/ansible/ansible/blob/stable-1.9/CHANGELOG.md
.. _support_life:
.. _methods:
@ -90,14 +91,19 @@ security fixes to releases which are two releases old. This work is tracked on t
The fixes that land in supported stable branches will eventually be released
as a new version when necessary.
For more information on the changes included in each new version, you can refer
to the changelog_, available on GitHub.
Note that while there are no guarantees for providing fixes for unsupported
releases of Ansible, there can sometimes be exceptions for critical issues.
.. _GitHub: https://github.com/ansible/ansible
.. _changelog: https://github.com/ansible/ansible/blob/devel/CHANGELOG.md
Changelogs
~~~~~~~~~~~~~~~~~~
Since 2.5, we've logged changes to ``stable-<version>`` git branches at ``stable-<version>/changelogs/CHANGELOG-v<version>.rst``.
For example, here's the changelog for 2.5_ on GitHub.
Older versions logged changes to ``stable-<version>/CHANGELOG.md``. For example,
here's the CHANGELOG for 2.4_.
Release candidates
@ -158,8 +164,6 @@ For modules/plugins, we keep the documentation after the removal for users of ol
Testing strategies
:ref:`ansible_community_guide`
Community information and contributing
`Ansible Changelog <https://github.com/ansible/ansible/blob/devel/CHANGELOG.md>`_
Documentation of the improvements for each version of Ansible
`Ansible release tarballs <https://releases.ansible.com/ansible/>`_
Ansible release tarballs
`Development Mailing List <http://groups.google.com/group/ansible-devel>`_

View File

@ -65,7 +65,7 @@ For instance ensuring that a specific tenant exists, is done using the following
description: Customer XYZ
state: present
A complete list of existing ACI modules is available for the latest stable release on the :ref:`list of network modules <network_modules>`. You can also view the `current development version <http://docs.ansible.com/ansible/devel/modules/list_of_network_modules.html#aci>`_.
A complete list of existing ACI modules is available for the latest stable release on the :ref:`list of network modules <network_modules>`. You can also view the `current development version <https://docs.ansible.com/ansible/devel/modules/list_of_network_modules.html#aci>`_.
Querying ACI configuration
..........................

View File

@ -22,8 +22,7 @@ and vCenter infrastcture. You can install pyVmomi using pip:
vmware_guest module
```````````````````
The :ref:vmware_guest <vmware_guest>module is used to manage various operations related to virtual machines in
the given ESXi or vCenter server.
The :ref:`vmware_guest<vmware_guest_module>` module manages various operations related to virtual machines in the given ESXi or vCenter server.
Prior to Ansible version 2.5, ``folder`` was an optional parameter with a default value of ``/vm``. The folder parameter
was used to discover information about virtual machines in the given infrastructure.

View File

@ -248,7 +248,7 @@ Example: OpenStack External Inventory Script
If you use an OpenStack based cloud, instead of manually maintaining your own inventory file, you can use the openstack.py dynamic inventory to pull information about your compute instances directly from OpenStack.
You can download the latest version of the OpenStack inventory script `here <https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py>`_
You can download the latest version of the OpenStack inventory script `here <https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack_inventory.py>`_.
You can use the inventory script explicitly (by passing the `-i openstack.py` argument to Ansible) or implicitly (by placing the script at `/etc/ansible/hosts`).
@ -289,7 +289,7 @@ Implicit use of inventory script
Download the latest version of the OpenStack dynamic inventory script, make it executable and copy it to `/etc/ansible/hosts`::
wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack.py
wget https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/openstack_inventory.py
chmod +x openstack.py
sudo cp openstack.py /etc/ansible/hosts

View File

@ -50,7 +50,7 @@ Blocks also introduce the ability to handle errors in a way similar to exception
tasks:
- name: Attempt and gracefull roll back demo
- name: Attempt and graceful roll back demo
block:
- debug:
msg: 'I execute normally'
@ -65,7 +65,7 @@ Blocks also introduce the ability to handle errors in a way similar to exception
msg: 'I also never execute :-('
always:
- debug:
msg: "this always executes"
msg: "This always executes"
The tasks in the ``block`` would execute normally, if there is any error the ``rescue`` section would get executed
with whatever you need to do to recover from the previous error. The ``always`` section runs no matter what previous
@ -81,7 +81,7 @@ Another example is how to run handlers after an error occurred :
tasks:
- name: Attempt and gracefull roll back demo
- name: Attempt and graceful roll back demo
block:
- debug:
msg: 'I execute normally'
@ -93,7 +93,7 @@ Another example is how to run handlers after an error occurred :
handlers:
- name: run me even after an error
debug:
msg: 'this handler runs even on error'
msg: 'This handler runs even on error'
.. seealso::

View File

@ -105,7 +105,7 @@ For example, using the 'nested' lookup, you can combine lists::
priv: "{{ item[1] }}.*:ALL"
append_privs: yes
password: "foo"
loop: "{{ query('nested', [ 'alice', 'bob' ], [ 'clientdb', 'employeedb', 'providerdb' ]) }}"
loop: "{{ ['alice', 'bob'] |product(['clientdb', 'employeedb', 'providerdb'])|list }}"
.. note:: ``with_`` loops are actually a combination of things ``with_`` + ``lookup()``, even ``items`` is a lookup. ``loop`` can be used in the same way as shown above.
@ -121,9 +121,9 @@ In certain situations the ``lookup`` function may not return a list which ``loop
The following invocations are equivalent, using ``wantlist=True`` with ``lookup`` to ensure a return type of a list::
loop: "{{ query('nested', ['alice', 'bob'], ['clientdb', 'employeedb', 'providerdb']) }}"
loop: "{{ query('inventory_hostnames', 'all') }}"
loop: "{{ lookup('nested', ['alice', 'bob'], ['clientdb', 'employeedb', 'providerdb'], wantlist=True) }}"
loop: "{{ lookup('inventory_hostnames', 'all', wantlist=True) }}"
.. _do_until_loops:
@ -330,6 +330,11 @@ If you need to keep track of where you are in a loop, you can use the ``index_va
loop_control:
index_var: my_idx
Migrating from with_X to loop
`````````````````````````````
.. include:: shared_snippets/with2loop.txt
.. seealso::

View File

@ -13,7 +13,7 @@ As noted in :doc:`playbooks_reuse`, include and import statements are very simil
Please refer to :doc:`playbooks_reuse` for documentation concerning the trade-offs one may encounter when using each type.
Also be aware that this behaviour changed in 2.4; prior to that Ansible version only ``include`` was available, and it behaved differently depending on context.
Also be aware that this behaviour changed in 2.4. Prior to Ansible 2.4, only ``include`` was available and it behaved differently depending on context.
.. versionadded:: 2.4
@ -22,7 +22,6 @@ Importing Playbooks
It is possible to include playbooks inside a master playbook. For example::
---
- import_playbook: webservers.yml
- import_playbook: databases.yml
@ -36,16 +35,15 @@ Prior to 2.4 only ``include`` was available and worked for both playbooks and ta
Including and Importing Task Files
``````````````````````````````````
Use of included task lists is a great way to define a role that system is going to fulfill. A task include file simply contains a flat list of tasks::
Breaking tasks up into different files is an excellent way to organize complex sets of tasks or reuse them. A task file simply contains a flat list of tasks::
# common_tasks.yml
---
- name: placeholder foo
command: /bin/foo
- name: placeholder bar
command: /bin/bar
You can then use ``import_tasks`` or ``include_tasks`` to include this file in your main task list::
You can then use ``import_tasks`` or ``include_tasks`` to execute the tasks in a file in the main task list::
tasks:
- import_tasks: common_tasks.yml
@ -65,27 +63,17 @@ You can also pass variables into imports and includes::
vars:
wp_user: bob
Variables can also be passed to include files using an alternative syntax, which also supports structured variables like dictionaries and lists::
See :ref:`ansible_variable_precedence` for more details on variable inheritance and precedence.
tasks:
- include_tasks: wordpress.yml
vars:
wp_user: timmy
ssh_keys:
- "{{ lookup('file', 'keys/one.pub') }}"
- "{{ lookup('file', 'keys/two.pub') }}"
Using either syntax, variables passed in can then be used in the included files. These variables will only be available to tasks within the included file. See :ref:`ansible_variable_precedence` for more details on variable inheritance and precedence.
Task include statements can be used at arbitrary depth.
Task include and import statements can be used at arbitrary depth.
.. note::
Static and dynamic can be mixed, however this is not recommended as it may lead to difficult-to-diagnose bugs in your playbooks.
- Static and dynamic can be mixed, however this is not recommended as it may lead to difficult-to-diagnose bugs in your playbooks.
- The ``key=value`` syntax for passing variables to import and include is deprecated. Use YAML ``vars:`` instead.
Includes and imports can also be used in the ``handlers:`` section; for instance, if you want to define how to restart apache, you only have to do that once for all of your playbooks. You might make a handlers.yml that looks like::
Includes and imports can also be used in the ``handlers:`` section. For instance, if you want to define how to restart Apache, you only have to do that once for all of your playbooks. You might make a ``handlers.yml`` that looks like::
# more_handlers.yml
---
- name: restart apache
service: name=apache state=restarted

View File

@ -397,7 +397,7 @@ Ansible Galaxy
The client ``ansible-galaxy`` is included in Ansible. The Galaxy client allows you to download roles from Ansible Galaxy, and also provides an excellent default framework for creating your own roles.
Read the Ansible Galaxy introduction <https://galaxy.ansible.com/intro>_ page for more information
Read the Ansible Galaxy documentation <https://galaxy.ansible.com/docs/>_ page for more information
.. seealso::

View File

@ -119,7 +119,7 @@ You can use `any` and `all` to check if any or all elements in a list are true o
vars:
mylist:
- 1
- 3 == 3
- "{{ 3 == 3 }}"
- True
myotherlist:
- False

View File

@ -868,7 +868,7 @@ Basically, anything that goes into "role defaults" (the defaults folder inside t
If you define a variable twice in a play's ``vars:`` section, the second one wins.
.. note:: The previous describes the default config ``hash_behaviour=replace``, switch to ``merge`` to only partially overwrite.
.. note:: Group loading follows parent/child relationships. Groups of the same 'patent/child' level are then merged following alphabetical order.
This last one can be superceeded by the user via ``ansible_group_priority``, which defaults to 0 for all groups.
This last one can be superceeded by the user via ``ansible_group_priority``, which defaults to ``1`` for all groups.
Another important thing to consider (for all versions) is that connection variables override config, command line and play/role/task specific options and keywords. For example::

View File

@ -0,0 +1,193 @@
With the release of Ansible 2.5, the recommended way to perform loops is the use the new ``loop`` keyword instead of ``with_X`` style loops.
In many cases, ``loop`` syntax is better expressed using filters instead of more complex use of ``query`` or ``lookup``.
The following examples will show how to convert many common ``with_`` style loops to ``loop`` and filters.
with_list
---------
``with_list`` is directly replaced by ``loop``.
.. code-block:: yaml+jinja
- name: with_list
debug:
msg: "{{ item }}"
with_list:
- one
- two
- name: with_list -> loop
debug:
msg: "{{ item }}"
loop:
- one
- two
with_items
----------
``with_items`` is replaced by ``loop`` and the ``flatten`` filter.
.. code-block:: yaml+jinja
- name: with_items
debug:
msg: "{{ item }}"
with_items: "{{ items }}"
- name: with_items -> loop
debug:
msg: "{{ item }}"
loop: "{{ items|flatten(levels=1) }}"
with_indexed_items
------------------
``with_indexed_items`` is replaced by ``loop``, the ``flatten`` filter and ``loop_control.index_var``.
.. code-block:: yaml+jinja
- name: with_indexed_items
debug:
msg: "{{ item.0 }} - {{ item.1 }}"
with_indexed_items: "{{ items }}"
- name: with_indexed_items -> loop
debug:
msg: "{{ index }} - {{ item }}"
loop: "{{ items|flatten(levels=1) }}"
loop_control:
index_var: index
with_flattened
--------------
``with_flattened`` is replaced by ``loop`` and the ``flatten`` filter.
.. code-block:: yaml+jinja
- name: with_flattened
debug:
msg: "{{ item }}"
with_flattened: "{{ items }}"
- name: with_flattened -> loop
debug:
msg: "{{ item }}"
loop: "{{ items|flatten }}"
with_together
-------------
``with_together`` is replaced by ``loop`` and the ``zip`` filter.
.. code-block:: yaml+jinja
- name: with_together
debug:
msg: "{{ item.0 }} - {{ item.1 }}"
with_together:
- "{{ list_one }}"
- "{{ list_two }}"
- name: with_together -> loop
debug:
msg: "{{ item.0 }} - {{ item.1 }}"
loop: "{{ list_one|zip(list_two)|list }}"
with_dict
---------
``with_dict`` can be substituted by ``loop`` and either the ``dictsort`` or ``dict2items`` filters.
.. code-block:: yaml+jinja
- name: with_dict
debug:
msg: "{{ item.key }} - {{ item.value }}"
with_dict: "{{ dictionary }}"
- name: with_dict -> loop (option 1)
debug:
msg: "{{ item.key }} - {{ item.value }}"
loop: "{{ dictionary|dict2items }}"
- name: with_dict -> loop (option 2)
debug:
msg: "{{ item.0 }} - {{ item.1 }}"
loop: "{{ dictionary|dictsort }}"
with_sequence
-------------
``with_sequence`` is replaced by ``loop`` and the ``range`` function, and potentially the ``format`` filter.
.. code-block:: yaml+jinja
- name: with_sequence
debug:
msg: "{{ item }}"
with_sequence: start=0 end=4 stride=2 format=testuser%02x
- name: with_sequence -> loop
debug:
msg: "{{ 'testuser%02x' | format(item) }}"
# range is exclusive of the end point
loop: "{{ range(0, 4 + 1, 2)|list }}"
with_subelements
----------------
``with_subelements`` is replaced by ``loop`` and the ``subelements`` filter.
.. code-block:: yaml+jinja
- name: with_subelements
debug:
msg: "{{ item.0.name }} - {{ item.1 }}"
with_subelements:
- "{{ users }}"
- mysql.hosts
- name: with_subelements -> loop
debug:
msg: "{{ item.0.name }} - {{ item.1 }}"
loop: "{{ users|subelements('mysql.hosts') }}"
with_nested/with_cartesian
--------------------------
``with_nested`` and ``with_cartesian`` are replaced by loop and the ``product`` filter.
.. code-block:: yaml+jinja
- name: with_nested
debug:
msg: "{{ item.0 }} - {{ item.1 }}"
with_nested:
- "{{ list_one }}"
- "{{ list_two }}"
- name: with_nested -> loop
debug:
msg: "{{ item.0 }} - {{ item.1 }}"
loop: "{{ list_one|product(list_two)|list }}"
with_random_choice
------------------
``with_random_choice`` is replaced by just use of the ``random`` filter, without need of ``loop``.
.. code-block:: yaml+jinja
- name: with_random_choice
debug:
msg: "{{ item }}"
with_random_choice: "{{ my_list }}"
- name: with_random_choice -> loop (No loop is needed here)
debug:
msg: "{{ my_list|random }}"
tags: random

View File

@ -128,7 +128,7 @@ a custom class defined by that resource. Defining a value that takes in a
For example, to define a ``[CimInstance]`` value in Ansible::
# [CimInstance]AuthenticationInfo == MSFT_xWebAuthenticationInformation
AuthenticationInfo
AuthenticationInfo:
Anonymous: no
Basic: yes
Digest: no

View File

@ -4,5 +4,10 @@
Ansible VMware FAQ
******************
How can I improve this ...?
===========================
vmware_guest
============
Can I deploy a virtual machine on a standalone ESXi server ?
------------------------------------------------------------
Yes. vmware_guest can deploy a virtual machine with required settings on a standalone ESXi server.

View File

@ -0,0 +1,213 @@
.. _vmware_guest_from_template:
****************************************
Deploy a virtual machine from a template
****************************************
Introduction
============
This guide will show you how to utilize Ansible to clone a virtual machine from already existing VMware template.
Scenario Requirements
=====================
* Software
* Ansible 2.5 or later must be installed
* The Python module *Pyvmomi* must be installed on the Ansible (or Target host if not executing against localhost)
* Installing the latest *Pyvmomi* via pip is recommended [as the OS packages are usually out of date and incompatible]
* Hardware
* At least one standalone ESXi server or
* vCenter Server with at least one ESXi server
* Access / Credentials
* Ansible (or the target server) must have network access to the either vCenter server or the ESXi server you will be deploying to
* Username and Password
* Administrator user with following privileges
- Virtual machine.Provisioning.Clone virtual machine on the virtual machine you are cloning
- Virtual machine.Inventory.Create from existing on the datacenter or virtual machine folder
- Virtual machine.Configuration.Add new disk on the datacenter or virtual machine folder.
- Resource.Assign virtual machine to resource pool on the destination host, cluster, or resource pool.
- Datastore.Allocate space on the destination datastore or datastore folder.
- Network.Assign network on the network to which the virtual machine will be assigned.
- Virtual machine.Provisioning.Customize on the virtual machine or virtual machine folder if you are customizing the guest operating system.
- Virtual machine.Provisioning.Read customization specifications on the root vCenter Server if you are customizing the guest operating system.
Assumptions
===========
- All variable names and VMware object names are case sensitive
- VMware allows creation of virtual machine and templates with same name across datacenters and within datacenters.
- You need to use Python 2.7.9 version in order to use *validate_certs* option, as this version is capable of changing the SSL verification behaviours.
Caveats
=======
- Hosts in the ESXi cluster must have access to the datastore that the template resides on.
- Multiple templates with the same name will cause module failures.
- In order to utilize Guest Customization, VMWare Tools must be installed on the template. For Linux, the open-vm-tools package is recommended, and it requires that Perl be installed.
Example Description
===================
In this use case / example, we will be selecting a virtual machine template and cloning it into a specific folder in our Datacenter / Cluster. The following Ansible playbook showcases the basic parameters that are needed for this.
.. code-block:: yaml
---
- name: Create a VM from a template
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Clone the template
vmware_guest:
hostname: 192.0.2.44
username: administrator@vsphere.local
password: vmware
validate_certs: False
name: testvm_2
template: template_el7
datacenter: DC1
folder: /DC1/vm
state: poweredon
wait_for_ip_address: yes
Since Ansible utilizes the VMware API to perform actions, in this use case we will be connecting directly to the API from our localhost. This means that our playbooks will not be running from the vCenter or ESXi Server. We do not necessarily need to collect facts about our localhost, so the *gather_facts* parameter will be disabled. You can run these modules against another server that would then connect to the API if your localhost does not have access to vCenter. If so, the required Python modules will need to be installed on that target server.
To begin, there are a few bits of information we will need. First and foremost is the hostname of the ESXi server or vCenter server. After this, you will need the username and password for this server. For now, you will be entering these directly, but in a more advanced playbook this can be abstracted out and stored in a more secure fashion [1][2]. If your vCenter or ESXi server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the *validate_certs* parameter. To do this you need to set ``validate_certs=False`` in your playbook.
Now you need to supply the information about the virtual machine which will be created. Give your virtual machine a name, one that conforms to all VMware requirements for naming conventions. Next, select the display name of the template from which you want to clone new virtual machine. This must match what's displayed in VMware Web UI exactly. Then you can specify a folder to place this new virtual machine in. This path can either be a relative path or a full path to the folder including the Datacenter. You may need to specify a state for the virtual machine. This simply tells the module which action you want to take, in this case you will be ensure that the virtual machine exists and is powered on. An optional parameter is *wait_for_ip_address*, this will tell Ansible to wait for the virtual machine to fully boot up and VMware Tools is running before completing this task.
What to expect
--------------
- You will see a bit of JSON output after this playbook completes. This output shows various parameters that are returned from the module and from vCenter about the newly created VM.
.. code-block:: yaml
{
"changed": true,
"instance": {
"annotation": "",
"current_snapshot": null,
"customvalues": {},
"guest_consolidation_needed": false,
"guest_question": null,
"guest_tools_status": "guestToolsNotRunning",
"guest_tools_version": "0",
"hw_cores_per_socket": 1,
"hw_datastores": [
"ds_215"
],
"hw_esxi_host": "192.0.2.44",
"hw_eth0": {
"addresstype": "assigned",
"ipaddresses": null,
"label": "Network adapter 1",
"macaddress": "00:50:56:8c:19:f4",
"macaddress_dash": "00-50-56-8c-19-f4",
"portgroup_key": "dvportgroup-17",
"portgroup_portkey": "0",
"summary": "DVSwitch: 50 0c 5b 22 b6 68 ab 89-fc 0b 59 a4 08 6e 80 fa"
},
"hw_files": [
"[ds_215] testvm_2/testvm_2.vmx",
"[ds_215] testvm_2/testvm_2.vmsd",
"[ds_215] testvm_2/testvm_2.vmdk"
],
"hw_folder": "/DC1/vm",
"hw_guest_full_name": null,
"hw_guest_ha_state": null,
"hw_guest_id": null,
"hw_interfaces": [
"eth0"
],
"hw_is_template": false,
"hw_memtotal_mb": 512,
"hw_name": "testvm_2",
"hw_power_status": "poweredOff",
"hw_processor_count": 2,
"hw_product_uuid": "420cb25b-81e8-8d3b-dd2d-a439ee54fcc5",
"hw_version": "vmx-13",
"instance_uuid": "500cd53b-ed57-d74e-2da8-0dc0eddf54d5",
"ipv4": null,
"ipv6": null,
"module_hw": true,
"snapshots": []
},
"invocation": {
"module_args": {
"annotation": null,
"cdrom": {},
"cluster": "DC1_C1",
"customization": {},
"customization_spec": null,
"customvalues": [],
"datacenter": "DC1",
"disk": [],
"esxi_hostname": null,
"folder": "/DC1/vm",
"force": false,
"guest_id": null,
"hardware": {},
"hostname": "192.0.2.44",
"is_template": false,
"linked_clone": false,
"name": "testvm_2",
"name_match": "first",
"networks": [],
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 443,
"resource_pool": null,
"snapshot_src": null,
"state": "present",
"state_change_timeout": 0,
"template": "template_el7",
"username": "administrator@vsphere.local",
"uuid": null,
"validate_certs": false,
"vapp_properties": [],
"wait_for_ip_address": true
}
}
}
- State is changed to *True* which notifies that the virtual machine is built using given template. The module will not complete until the clone task in VMware is finished. This can take some time depending on your environment.
- If you utilize the *wait_for_ip_address* parameter, then it will also increase the clone time as it will wait until virtual machine boots into the OS and an IP Address has been assigned to the given NIC.
Troubleshooting
---------------
Things to inspect
- Check if the values provided for username and password are correct
- Check if the datacenter you provided is available
- Check if the template specified exists and you have permissions to access the datastore
- Ensure the full folder path you specified already exists. It will not create folders automatically for you.
Appendix
--------
- [1] - https://docs.ansible.com/ansible/latest/vault.html
- [2] - https://docs.ansible.com/ansible-tower/latest/html/userguide/credentials.html

View File

@ -14,6 +14,7 @@ To get started, please select one of the following topics.
.. toctree::
:maxdepth: 2
scenario_clone_template
vmware_scenario_1

12
docs/templates/man.j2 vendored
View File

@ -76,17 +76,18 @@ ENVIRONMENT
The following environment variables may be specified.
{% if inventory %}
ANSIBLE_INVENTORY -- Override the default ansible inventory file
ANSIBLE_INVENTORY -- Override the default ansible inventory sources
{% endif %}
{% if library %}
ANSIBLE_LIBRARY -- Override the default ansible module library path
{% endif %}
ANSIBLE_CONFIG -- Override the default ansible config file
ANSIBLE_CONFIG -- Specify override location for the ansible config file
Many more are available for most options in ansible.cfg
For a full list check https://docs.ansible.com/. or use the `ansible-config` command.
FILES
-----
@ -99,6 +100,9 @@ FILES
~/.ansible.cfg -- User config file, overrides the default config if present
./ansible.cfg -- Local config file (in current working direcotry) assumed to be 'project specific' and overrides the rest if present.
As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.
AUTHOR
------
@ -109,8 +113,8 @@ Ansible was originally written by Michael DeHaan.
COPYRIGHT
---------
Copyright © 2017 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 License.
Copyright © 2018 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 license.
SEE ALSO

View File

@ -88,104 +88,108 @@ Parameters
.. raw:: html
<table border=0 cellpadding=0 class="documentation-table">
{# Header of the documentation #}
{# Pre-compute the nesting depth to allocate columns -#}
@{ to_kludge_ns('maxdepth', 1) -}@
{% for key, value in options|dictsort recursive -%}
@{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@
{% if value.suboptions -%}
{% if value.suboptions.items -%}
@{ loop(value.suboptions.items()) -}@
{% elif value.suboptions[0].items -%}
@{ loop(value.suboptions[0].items()) -}@
{% endif -%}
{% endif -%}
{% endfor -%}
{# Header of the documentation -#}
<tr>
<th class="head"><div class="cell-border">Parameter</div></th>
<th class="head"><div class="cell-border">Choices/<font color="blue">Defaults</font></div></th>
<th colspan="@{ from_kludge_ns('maxdepth') }@">Parameter</th>
<th>Choices/<font color="blue">Defaults</font></th>
{% if plugin_type != 'module' %}
<th class="head"><div class="cell-border">Configuration</div></th>
<th>Configuration</th>
{% endif %}
<th class="head" width="100%"><div class="cell-border">Comments</div></th>
<th width="100%">Comments</th>
</tr>
{% for key, value in options|dictsort recursive %}
<tr class="return-value-column">
<tr>
{# indentation based on nesting level #}
{% for i in range(1, loop.depth) %}
<td class="elbow-placeholder"></td>
{% endfor %}
{# parameter name with required and/or introduced label #}
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
<div class="elbow-placeholder">&nbsp;</div>
{% endfor %}
<div class="elbow-key">
<b>@{ key }@</b>
{% if value.get('required', False) %}<br/><div style="font-size: small; color: red">required</div>{% endif %}
{% if value.version_added %}<br/><div style="font-size: small; color: darkgreen">(added in @{value.version_added}@)</div>{% endif %}
</div>
</div>
<td colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@">
<b>@{ key }@</b>
{% if value.get('type', None) %}<br/><div style="font-size: small; color: red">@{ value.type }@</div>{% endif %}
{% if value.get('required', False) %}<br/><div style="font-size: small; color: red">required</div>{% endif %}
{% if value.version_added %}<br/><div style="font-size: small; color: darkgreen">(added in @{value.version_added}@)</div>{% endif %}
</td>
{# default / choices #}
<td>
<div class="cell-border">
{# Turn boolean values in 'yes' and 'no' values #}
{% if value.default is sameas true %}
{% set _x = value.update({'default': 'yes'}) %}
{% elif value.default is sameas false %}
{% set _x = value.update({'default': 'no'}) %}
{% endif %}
{% if value.type == 'bool' %}
{% set _x = value.update({'choices': ['no', 'yes']}) %}
{% endif %}
{# Show possible choices and highlight details #}
{% if value.choices %}
<ul><b>Choices:</b>
{% for choice in value.choices %}
{# Turn boolean values in 'yes' and 'no' values #}
{% if choice is sameas true %}
{% set choice = 'yes' %}
{% elif choice is sameas false %}
{% set choice = 'no' %}
{% endif %}
{% if (value.default is string and value.default == choice) or (value.default is iterable and value.default is not string and choice in value.default) %}
<li><div style="color: blue"><b>@{ choice | escape }@</b>&nbsp;&larr;</div></li>
{% else %}
<li>@{ choice | escape }@</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{# Show default value, when multiple choice or no choices #}
{% if value.default is defined and value.default not in value.choices %}
<b>Default:</b><br/><div style="color: blue">@{ value.default | escape }@</div>
{% endif %}
</div>
{# Turn boolean values in 'yes' and 'no' values #}
{% if value.default is sameas true %}
{% set _x = value.update({'default': 'yes'}) %}
{% elif value.default is sameas false %}
{% set _x = value.update({'default': 'no'}) %}
{% endif %}
{% if value.type == 'bool' %}
{% set _x = value.update({'choices': ['no', 'yes']}) %}
{% endif %}
{# Show possible choices and highlight details #}
{% if value.choices %}
<ul><b>Choices:</b>
{% for choice in value.choices %}
{# Turn boolean values in 'yes' and 'no' values #}
{% if choice is sameas true %}
{% set choice = 'yes' %}
{% elif choice is sameas false %}
{% set choice = 'no' %}
{% endif %}
{% if (value.default is string and value.default == choice) or (value.default is iterable and value.default is not string and choice in value.default) %}
<li><div style="color: blue"><b>@{ choice | escape }@</b>&nbsp;&larr;</div></li>
{% else %}
<li>@{ choice | escape }@</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{# Show default value, when multiple choice or no choices #}
{% if value.default is defined and value.default not in value.choices %}
<b>Default:</b><br/><div style="color: blue">@{ value.default | escape }@</div>
{% endif %}
</td>
{# configuration #}
{% if plugin_type != 'module' %}
<td>
<div class="cell-border">
{% if 'ini' in value %}
<div> ini entries:
{% for ini in value.ini %}
<p>[@{ ini.section }@ ]<br>@{ ini.key }@ = @{ value.default | default('VALUE') }@</p>
{% endfor %}
</div>
{% endif %}
{% if 'env' in value %}
{% for env in value.env %}
<div>env:@{ env.name }@</div>
{% if 'ini' in value %}
<div> ini entries:
{% for ini in value.ini %}
<p>[@{ ini.section }@ ]<br>@{ ini.key }@ = @{ value.default | default('VALUE') }@</p>
{% endfor %}
{% endif %}
{% if 'vars' in value %}
{% for myvar in value.vars %}
<div>var: @{ myvar.name }@</div>
{% endfor %}
{% endif %}
</div>
</div>
{% endif %}
{% if 'env' in value %}
{% for env in value.env %}
<div>env:@{ env.name }@</div>
{% endfor %}
{% endif %}
{% if 'vars' in value %}
{% for myvar in value.vars %}
<div>var: @{ myvar.name }@</div>
{% endfor %}
{% endif %}
</td>
{% endif %}
{# description #}
<td>
<div class="cell-border">
{% if value.description is string %}
<div>@{ value.description | replace('\n', '\n ') | html_ify }@</div>
{% else %}
{% for desc in value.description %}
<div>@{ desc | replace('\n', '\n ') | html_ify }@</div>
{% endfor %}
{% endif %}
{% if 'aliases' in value and value.aliases %}
<div style="font-size: small; color: darkgreen"><br/>aliases: @{ value.aliases|join(', ') }@</div>
{% endif %}
</div>
{% if value.description is string %}
<div>@{ value.description | replace('\n', '\n ') | html_ify }@</div>
{% else %}
{% for desc in value.description %}
<div>@{ desc | replace('\n', '\n ') | html_ify }@</div>
{% endfor %}
{% endif %}
{% if 'aliases' in value and value.aliases %}
<div style="font-size: small; color: darkgreen"><br/>aliases: @{ value.aliases|join(', ') }@</div>
{% endif %}
</td>
</tr>
{% if value.suboptions %}
@ -242,43 +246,50 @@ Facts returned by this module are added/updated in the ``hostvars`` host facts a
.. raw:: html
<table border=0 cellpadding=0 class="documentation-table">
{# Pre-compute the nesting depth to allocate columns #}
@{ to_kludge_ns('maxdepth', 1) -}@
{% for key, value in returnfacts|dictsort recursive %}
@{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@
{% if value.contains -%}
{% if value.contains.items -%}
@{ loop(value.contains.items()) -}@
{% elif value.contains[0].items -%}
@{ loop(value.contains[0].items()) -}@
{% endif -%}
{% endif -%}
{% endfor -%}
<tr>
<th class="head"><div class="cell-border">Fact</div></th>
<th class="head"><div class="cell-border">Returned</div></th>
<th class="head" width="100%"><div class="cell-border">Description</div></th>
<th colspan="@{ from_kludge_ns('maxdepth') }@">Fact</th>
<th>Returned</th>
<th width="100%">Description</th>
</tr>
{% for key, value in returnfacts|dictsort recursive %}
<tr class="return-value-column">
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
<div class="elbow-placeholder">&nbsp;</div>
{% endfor %}
<div class="elbow-key">
<b>@{ key }@</b>
<br/><div style="font-size: small; color: red">@{ value.type }@</div>
</div>
</div>
<tr>
{% for i in range(1, loop.depth) %}
<td class="elbow-placeholder"></td>
{% endfor %}
<td colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@" colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@">
<b>@{ key }@</b>
<br/><div style="font-size: small; color: red">@{ value.type }@</div>
{% if value.version_added %}<br/><div style="font-size: small; color: darkgreen">(added in @{value.version_added}@)</div>{% endif %}
</td>
<td><div class="cell-border">@{ value.returned | html_ify }@</div></td>
<td>@{ value.returned | html_ify }@</td>
<td>
<div class="cell-border">
{% if value.description is string %}
<div>@{ value.description | html_ify }@
{% if value.description is string %}
<div>@{ value.description | html_ify }@
</div>
{% else %}
{% for desc in value.description %}
<div>@{ desc | html_ify }@
</div>
{% else %}
{% for desc in value.description %}
<div>@{ desc | html_ify }@
</div>
{% endfor %}
{% endif %}
<br/>
{% if value.sample is defined and value.sample %}
<div style="font-size: smaller"><b>Sample:</b></div>
{# TODO: The sample should be escaped, using | escape or | htmlify, but both mess things up beyond repair with dicts #}
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">@{ value.sample | replace('\n', '\n ') | html_ify }@</div>
{% endif %}
</div>
{% endfor %}
{% endif %}
<br/>
{% if value.sample is defined and value.sample %}
<div style="font-size: smaller"><b>Sample:</b></div>
{# TODO: The sample should be escaped, using | escape or | htmlify, but both mess things up beyond repair with dicts #}
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">@{ value.sample | replace('\n', '\n ') | html_ify }@</div>
{% endif %}
</td>
</tr>
{# ---------------------------------------------------------
@ -308,41 +319,47 @@ Common return values are documented :ref:`here <common_return_values>`, the foll
.. raw:: html
<table border=0 cellpadding=0 class="documentation-table">
@{ to_kludge_ns('maxdepth', 1) -}@
{% for key, value in returndocs|dictsort recursive -%}
@{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@
{% if value.contains -%}
{% if value.contains.items -%}
@{ loop(value.contains.items()) -}@
{% elif value.contains[0].items -%}
@{ loop(value.contains[0].items()) -}@
{% endif -%}
{% endif -%}
{% endfor -%}
<tr>
<th class="head"><div class="cell-border">Key</div></th>
<th class="head"><div class="cell-border">Returned</div></th>
<th class="head" width="100%"><div class="cell-border">Description</div></th>
<th colspan="@{ from_kludge_ns('maxdepth') }@">Key</th>
<th>Returned</th>
<th width="100%">Description</th>
</tr>
{% for key, value in returndocs|dictsort recursive %}
<tr class="return-value-column">
<td>
<div class="outer-elbow-container">
{% for i in range(1, loop.depth) %}
<div class="elbow-placeholder">&nbsp;</div>
{% endfor %}
<div class="elbow-key">
<b>@{ key }@</b>
<br/><div style="font-size: small; color: red">@{ value.type }@</div>
</div>
</div>
<tr>
{% for i in range(1, loop.depth) %}
<td class="elbow-placeholder">&nbsp;</td>
{% endfor %}
<td colspan="@{ from_kludge_ns('maxdepth') - loop.depth0 }@">
<b>@{ key }@</b>
<br/><div style="font-size: small; color: red">@{ value.type }@</div>
{% if value.version_added %}<br/><div style="font-size: small; color: darkgreen">(added in @{value.version_added}@)</div>{% endif %}
</td>
<td><div class="cell-border">@{ value.returned | html_ify }@</div></td>
<td>@{ value.returned | html_ify }@</td>
<td>
<div class="cell-border">
{% if value.description is string %}
<div>@{ value.description | html_ify |indent(4)}@</div>
{% else %}
{% for desc in value.description %}
<div>@{ desc | html_ify |indent(4)}@</div>
{% endfor %}
{% endif %}
<br/>
{% if value.sample is defined and value.sample %}
<div style="font-size: smaller"><b>Sample:</b></div>
{# TODO: The sample should be escaped, using |escape or |htmlify, but both mess things up beyond repair with dicts #}
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">@{ value.sample | replace('\n', '\n ') | html_ify }@</div>
{% endif %}
</div>
{% if value.description is string %}
<div>@{ value.description | html_ify |indent(4)}@</div>
{% else %}
{% for desc in value.description %}
<div>@{ desc | html_ify |indent(4)}@</div>
{% endfor %}
{% endif %}
<br/>
{% if value.sample is defined and value.sample %}
<div style="font-size: smaller"><b>Sample:</b></div>
{# TODO: The sample should be escaped, using |escape or |htmlify, but both mess things up beyond repair with dicts #}
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">@{ value.sample | replace('\n', '\n ') | html_ify }@</div>
{% endif %}
</td>
</tr>
{# ---------------------------------------------------------

View File

@ -2,8 +2,7 @@
# If a key doesn't apply to your module (ex: choices, default, or
# aliases) you can use the word 'null', or an empty list, [], where
# appropriate.
#
# See https://docs.ansible.com/ansible/dev_guide/developing_modules_documenting.html for more information
# See https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html for more information
#
module: modulename
short_description: This is a sentence describing the module

Some files were not shown because too many files have changed in this diff Show More