Commit graph

37841 commits

Author SHA1 Message Date
Will Thames
a60fe1946c Remove ECS policies from AWS compute policy
The compute policy was exceeding maximum size and contained
policies that already exist in ecs-policy.

Look up suitable AMIs rather than hardcode

We don't want to maintain multiple image IDs for multiple regions
so use ec2_ami_facts to set a suitable image ID

Improve exception handling
2018-06-06 20:51:50 +10:00
Michael Mayer
fbcd6f8a65 Add Fargate support for ECS modules
Fargate instances do not require memory and cpu descriptors. EC2 instances
 do require descriptions. https://botocore.readthedocs.io/en/latest/reference/services/ecs.html#ECS.Client.describe_task_definition

Fargate requires that cpu and memory be defined at task definition level.
EC2 launch requires them to be defined at the container level.

Fargate requires the use of awsvpc for the networking_mode. Also updated,
the documentation regarding where and when memory/cpu needs to the assigned.

The task_definition variable for the awspvc configuration colided with
the ecs_service for the bridge network. This would cause the test to fail.

Add testing for fargate

Add examples for fargate and ec2
2018-06-06 20:51:50 +10:00
Jon Steinich
8eb9cc3217 add launchType to ecs_service per #35607
update ecs_taskdefinition to support fargate tasks per #35607
2018-06-06 20:51:50 +10:00
Martin Krizek
23a337918c
first_found: fix examples to match the code (#40821) 2018-06-06 12:45:30 +02:00
Martin Krizek
77e2bd5f8e
Fix inserting noop tasks by using active state (#36056) 2018-06-06 12:34:25 +02:00
Till Maas
8be3924d4e Add Fedora as possible ansible_distribution value (#41177)
"ansible_distribution" can also be Fedora

+label: docsite_pr
2018-06-06 11:15:00 +02:00
Clint Byrum
6635748c8f Enable check mode for docker_image_facts (#38944)
This module never changes anything. As such, there is no reason not to
just enable check mode.
2018-06-06 11:03:26 +02:00
Achintha Gunasekara
d98c892017 Adding a switch to output docker logs (#40693)
* Adding a switch to print logs

* Update to docs

* Adding `version_added` for the new option

* Updating version added

* Moving `output_logs` before `paued` for alphabetically ordering.
2018-06-06 10:50:04 +02:00
Martin Krizek
5f7ffd39dc
Warn when cond is used on meta tasks that don't support them (#41126) 2018-06-06 09:54:25 +02:00
David Moreau Simard
828e33f419 Do not consider an empty version string as a version (#41044)
When using an empty string as the version argument, the module would
before attempt to run something akin to:

    pip install module==""

This changes the behavior to:

    pip install module

Fixes #41043
2018-06-06 09:52:43 +02:00
Abhijeet Kasurde
63d993e07f Minor typos in galaxy cli (#41083)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-06 08:39:55 +02:00
Baptiste Clavié
3b2f5dd606 composer: add new autoloader options (#40439)
* Add support for classmap-authoritative option for composer

* Add support for apcu-autoloader option for composer

* Fix a typo for the no-plugins option
2018-06-06 08:34:53 +02:00
Ganesh Nalawade
ba4b12358c
Refactor ios cliconf plugin and ios_config module (#39695)
* Refactor ios cliconf plugin and ios_config module

*  Refactor ios cliconf plugin to support generic network_config module
*  Refactor ios_config module to work with cliconf api's
*  Enable command and response logging in cliconf pulgin
*  cliconf api documentation

* Fix unit test and other minor changes

* Doc update

* Fix CI failure

* Add default flag related changes

* Minor changes

* redact input command logging by default
2018-06-06 11:12:45 +05:30
saichint
9abc3dbec4 nxos_rpm module (#40849)
* Add nxos_rpm feature

* fix timing issues

* fix timing issues

* shippable fix

* review comment

* review comments fixes

* typo fix
2018-06-06 10:09:38 +05:30
Abhijit Menon-Sen
276358c885
Introduce inventory.any_unparsed_is_failed configuration setting (#41171)
In the process of building up the inventory by parsing each inventory
source with each available inventory plugin, there are three kinds of
possible errors (listed in order from earliest to latest):

1. One source could not be parsed by a particular plugin.
2. One source could not be parsed by any available plugin.
3. ALL sources could not be parsed by any available plugin.

The errors in (1) are a part of normal operation, e.g., the script
plugin is expected to fail to parse an ini-format source, and we will
ignore that error and try the next plugin. There is currently no way to
control this, and no known compelling use-case for a setting to control
it. This commit does not make any changes here.

We implement "any_unparsed_is_failed" to handle (2) above. If enabled,
this requires that every available source be parsed validly by at least
one plugin. In an inventory comprising a static hosts file and ec2.py,
this setting will cause a fatal error if ec2.py fails (a situation that
attracted only a warning earlier).

We clarify that the existing "unparsed_is_failed=true" setting causes a
fatal error only in (3) above, i.e., if NO inventory source could be
parsed. In other words, if there is ANY valid source in the inventory
(e.g., an ini-format static file), no combination of errors and the
setting will cause a fatal error.

If you want to execute your playbooks when your inventory is…

    (a) complete, use "any_unparsed_is_failed=true".
    (b) not empty, use "unparsed_is_failed=true".

The "unparsed_is_failed" setting should be renamed to
"all_unparsed_is_failed", but this commit does not do so.

Fixes #40512
Fixes #40996
2018-06-06 09:28:58 +05:30
Abhijeet Kasurde
e8227e8395
Add note about updating pip (#41124)
Fixes: #39120

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-06 09:27:07 +05:30
Matt Clay
70c475da6c Implement new changelog generator. 2018-06-05 19:08:15 -07:00
Toshio Kuratomi
cef4d862bc
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
2018-06-05 19:07:11 -07:00
Matt Davis
980cdbe679 pin azure deps to exact versions
* added warnings for newer-than-expected versions
* prevent passing api_version and profile for newer clients
2018-06-05 18:50:48 -07:00
Jacob Floyd
4fa2fb9c89 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
2018-06-05 20:31:10 -04:00
Toshio Kuratomi
461a2733e6 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
2018-06-05 17:01:40 -07:00
Yunge Zhu
46eceba395 fix issue #41081 in azure_rm_securitygroup (#41123)
* fix issue #41081

* resolve comments

* fix lint
2018-06-06 05:41:29 +08:00
Zhikang Zhang
8c15d71783 Fix typo in decrypt doc. (#41149)
Prior to this change, the document cannot render the default choice of decrypt correctly.
2018-06-05 20:12:35 +02:00
Ben Thomasson
01e1b51e33 Fix typo in the ansible-inventory --host error (#41142) 2018-06-05 20:03:27 +02:00
permitanyany
a9dc79e07b Update nclu.py (#40369)
* Update nclu.py

Added NCLU BGP Unnumbered Example
+label: ansible/ansible#40323

* Update nclu.py

* Adding AS number example
2018-06-05 10:47:09 -05:00
Jackson Isaac
3d6312885f eos/eos_l3_interface.py: Add SVI Example (#40349) 2018-06-05 08:26:33 -05:00
Nathaniel Case
02135d5278
Nxos test reorganize (#41089)
* Remove local from most cli tests

* Readd local tests to nxapi until httpapi passes
2018-06-05 07:37:24 -04:00
jeanfabrice
6349932fff Add support for loadbalance_loadbased to DVS portgroup teaming policy (#40242)
* Add support for loadbalance_loadbased to DVS portgroup teaming policy
* Add note about version_added
2018-06-05 15:06:37 +05:30
Anil Kumar Muraleedharan
1ccff0de1a Fixing copy paste issue (#41121) 2018-06-05 14:31:50 +05:30
Deric Crago
9387c75e29 reverting changes from a0b4462a to avoid casting strings to ints (#40131) 2018-06-05 04:12:55 -04:00
Andrew J Huffman
fb61680ccd Updating tower_job_template.py (#38821)
* Updating tower_job_template.py

* tower_job_template: Update parameter version_added to 2.7

* Ensure that unset credentials aren't passed

Passing empty strings for unset credentials causes ValueErrors as
the API expects an integer. Don't pass unset credentials
2018-06-05 15:33:51 +10:00
Adrien Fleury
fc2c8a4ec8 Module: Tower inventory source module (#37110)
* tower_inventory_source: Add support for the inventory source via ansible-tower-cli.

* Add test coverage for tower_inventory_source.

* Update version_added to 2.7
2018-06-05 15:32:54 +10:00
saichint
6733bffd5d fix nxos_snapshot issues (#41034)
* fix nxos_snapshot issues

* review comments

* doc change
2018-06-05 10:56:32 +05:30
Deepak Agrawal
2db6a8c26a
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
2018-06-05 07:56:53 +05:30
Matt Davis
096d243526 adds ansible-doc JSON plugin data dump
* used for changelog generation of new plugins
2018-06-04 17:20:33 -07:00
Dusan Matejka
6ef2ffe310 Zabbix facts (#41084)
* added validate_certs option to zabbix_*_facts modules and fixed documentation to use doc fragment

* removed code duplication from zabbix_host_facts module
2018-06-04 16:41:09 -04:00
Tim Rupp
457c813d46
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
2018-06-04 13:07:02 -07:00
Tine Jozelj
ab96a84154 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`
2018-06-04 10:03:59 -04:00
Nathaniel Case
92a95368fe
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
2018-06-04 07:32:23 -04:00
Abhijeet Kasurde
13c7d149bb openstack: Correct fail_json call in module_utils (#41064)
Fixes: #40925

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-04 10:18:15 +02:00
Abhijeet Kasurde
4d200fb5ac
Use msg instead of var (#40810)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-04 12:46:23 +05:30
Trishna Guha
72d630b831
fix nxos_udld failing with httpapi (#41074)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-06-04 11:31:32 +05:30
Yuwei Zhou
e6e08a0174 normalize the resource location (#40802) 2018-06-04 13:45:51 +08:00
saichint
b6afb77a8a fix nxos_banner issue (#41026) 2018-06-04 10:53:04 +05:30
Yunge Zhu
bd34194ace add adfs_authority_url arg in azure_rm.py (#41071) 2018-06-04 12:57:02 +08:00
Tim Rupp
033adf8cd5
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.
2018-06-02 19:09:13 -07:00
Adam Miller
c65f3fdca6 BSD UTC timezone is not always idempotent (#40855)
Signed-off-by: Adam Miller <admiller@redhat.com>
2018-06-01 23:46:07 -04:00
Ryan Brown
7f8654d586 Add minimum botocore and boto3 checking to AnsibleAWSModule (#41005)
* Add minimum botocore and boto3 checking to AnsibleAWSModule
2018-06-01 18:45:22 -04:00
Tim Rupp
2daf5f3edb
Correct states in bigip_pool_member (#41035)
Fixes: #40631

The module was not correctly handling a certain state where the node
could be down, but the monitor was enabled on the node.

This patch fixes it.
2018-06-01 14:38:23 -07:00
Zhikang Zhang
b578bf9e20 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-01 12:02:56 -07:00