Commit graph

28925 commits

Author SHA1 Message Date
Damien
0141c0c336 inventory/Aos - Add session information to group all variables (#21719)
* Add aos.session information to group all variables

* Revert IP address change

* Remove space in empty line for PEP8
2017-02-22 16:45:49 -05:00
Troy Ready
3f391f5a23 update ec2_ami_find to allow product-code filter (#18896)
CentOS's cloud image wiki page (wiki.centos.org/Cloud/AWS) gives an
example of using their product code to search for AMIs. This commit
adds an optional parameter to ec2_ami_find to allow this filtering.
2017-02-22 22:36:59 +01:00
Matt Martz
4b320ce0e4 Add checks for from module_utils import * (#21800) 2017-02-22 13:16:35 -08:00
jctanner
8c521655e1 Fix traceback on indexing empty list (#21784)
* Fix traceback on indexing empty list
* Make it more 'idiomatic'
* Forgot the index
2017-02-22 16:14:39 -05:00
Matt Clay
cba91c7f44 Test placement (#21801)
* Fix test placement and update messaging.
* Add note about group selection.
2017-02-22 12:43:45 -08:00
Matt Clay
b5e0eb0985 Fixes for missing aliases files sanity test. (#21798)
* Refine test for missing aliases files.
* Fix formatting of missing aliases message.
2017-02-22 12:04:09 -08:00
Peter Sprygada
f8157d579a fixes error where a transport is not set for nxos (#21790)
Will now make sure transport is set to `cli`
2017-02-22 12:47:21 -05:00
Yuri Khan
a4ae0c85f1 Support 256-color terminals (#17750) 2017-02-22 12:37:26 -05:00
Peter Sprygada
8824387cf8 fixes ios_command to_command method (#21792)
Changes key from response to answer to match expected payload

fixes #21791
2017-02-22 17:20:18 +00:00
Peter Sprygada
58ee661437 fixes play context connection user (#21776)
Does't map remote_user back into vars if connection is local to preserve
the user variable.  This is done to be able to set connection_user
prop in play_context for the network_cli plugin connection
2017-02-22 15:34:11 +00:00
Brian Coca
93ac278f4c added 'extensions' options to include_vars
This allows users to override default 'extensions read' when using the dir option
2017-02-22 10:31:22 -05:00
John R Barker
48c6dd2689 Point to cloud/amazon/GUIDELINES.md in main repo (#21780) 2017-02-22 15:31:06 +00:00
Toshio Kuratomi
45251f910c Make BaseFileCache into an abstractbaseclass so it's a proper interface
Push the opening and closing of files into the _load and _dump methods
so that we don't invoke the slow codec machinery without reason.
2017-02-22 10:27:29 -05:00
Toshio Kuratomi
c033e5111f Graceful error message for abstract base classes in PluginLoader 2017-02-22 10:27:29 -05:00
Brian Coca
374af06cbf added pickle and yaml cache plugins
added new base class for file based cache plugins as 99% of code was common
now also catches unexpected decoding exceptions
allows per module file modes and encoding
moved jsonfile code to base
2017-02-22 10:27:29 -05:00
scottb
3812c76168 Update GUIDELINES.md
Edited for grammar and clarity.
2017-02-22 10:25:42 -05:00
Brian Coca
96d952a998 fix typo 2017-02-22 10:25:42 -05:00
Brian Coca
4bdaf6a4f0 updated guidelines to reflect boto3 preference 2017-02-22 10:25:42 -05:00
Dhivyap
75d7c70e70 Fixes#5534-Handled Command Prompt in exec mode (#21651)
* Fixes#5534-Handled Command Prompt in exec mode

* Pep8 Cleanup
2017-02-22 09:58:21 -05:00
Ricardo Carrillo Cruz
ab4e83f288 Remove superfluous include on iosxr filesystems fact gathering (#21775)
The regex will catch only lines that start with 'Directory of' regardless.
Also, fixing unit tests while at it.
2017-02-22 15:44:17 +01:00
Peter Sprygada
9e6980a039 fixs command dict to be sent to connection socket (#21713)
There as an invalid key in the command dict that would cause failure
using prompts.  This changes the key from response to answer which is
what is expected by network_cli
2017-02-22 09:44:04 -05:00
Adrian Likins
6e7b89764e Fix snmp_facts error on decode_hex() (#21694)
* Fix snmp_facts error on decode_hex()

Remove use of some_string.decode('hex') that fails on py3, and
replace with to_binascii.unhexlify()

Fixes #21668
2017-02-22 09:32:20 -05:00
Matt Clay
b2bd75a408 Restore 2008-SP2 and 2008-R2_SP1 CI testing. 2017-02-21 20:55:25 -08:00
Matt Clay
9462707f21 Test www.redhat.com instead of docs.ansible.com. 2017-02-21 20:24:22 -08:00
Matt Martz
b143fdea54 DOC options must be a dict when used with extends_documentation_fragment (#21745)
* Fix string formatting
* Provide better tracebacks
* When options is None and extends_documentation_fragment is in use, add an error that options must be a dict
* If options was specified and not a dict, then error
2017-02-21 17:42:39 -08:00
James Cammarata
404b2864ef Additional lock down of conditionals 2017-02-21 17:49:08 -06:00
Brian Coca
5258e6d52a use safe load instead
fixes #21724
2017-02-21 17:45:46 -05:00
James Cooke
8ec28a2ba4 Download remote apt deb file in bytes mode in Python 2 and 3
Fixes #19710
2017-02-21 14:26:58 -08:00
James Cammarata
9f0b354023 Use proper YAML constructor class for safe loading 2017-02-21 16:23:42 -06:00
Toshio Kuratomi
2dde7f7768 Fix a case where we mixed text and bytes in the local connection plugin
Fixes #20710
2017-02-21 14:19:08 -08:00
Tim Rupp
6a4324ee99 [network] fix imported name in F5 module_utils (#21733)
Whoops. not called that.
2017-02-21 16:40:23 -05:00
Ryan S. Brown
5fd3b9dd75 Revert "[cloud] add unit tests for lambda module (#21710)"
This reverts commit bedf0279a9 after the
tests fail due to overlapping mocks in shippable.
2017-02-21 16:06:24 -05:00
Ryan Brown
c136ff58c0 [cloud][docs] Fix misleading Route53 value example (#21689)
The `route53` module uses a comma-separated string for records
containing more than one value. Fixes #21134
2017-02-21 15:48:32 -05:00
mikedlr
bedf0279a9 [cloud] add unit tests for lambda module (#21710)
* lambda module - some tests; demonstrates no update when only one parameter changed fixed in 22701806.

* lambda module - tests - code clean up

* lambda module - tests - fix update usage assertions

* lambda module - rework mocking in region warning test
2017-02-21 15:44:50 -05:00
James Cammarata
3d65482927 Stash post-validated fields of the task in the TaskResult
This allows us to have a snapshot of the fields, which we can restore
on the pre-fork side so as to avoid having to re-template fields.
2017-02-21 14:35:13 -06:00
jctanner
40235d7b99 Skip fact gathering if the entire play was included via conditional and False (#21734)
Addresses #21528
2017-02-21 14:46:10 -05:00
Pierrick Caillon
a1b3664ec4 Fix: mysql_user - permission string with column privileges
MySQL returns privileges on columns as "PRIVILEGES (column)".
For permissions to be correctly matched, it must be specified exactly the
same in the module argument. A resulting string is like
"dbname.dbtable:PRIVILEGES (column)". Thus, the space before the opening
parenthesis must also be removed when creating the set of privileges for
validation.
2017-02-21 10:51:03 -08:00
Matt Clay
879feff6b7 Fix PEP 8 issue. 2017-02-21 10:24:02 -08:00
Daniel Lobato García
01436cf186 Add Foreman inventory (#19510)
This commit adds the foreman inventory based on
https://github.com/theforeman/foreman_ansible_inventory
and its configuration file.
2017-02-21 09:21:22 -08:00
Brian Coca
dc7992b60c added new modules to chnglog 2017-02-21 12:14:32 -05:00
Veaceslav Mindru
cdcdc1d81b #19587 add yum skip-broken (#21475)
* #19587: refactor to PEP8

* Issue: #19587: add skip_broken option to yum module
PNTSYSOPS-1901 - internal reference

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>

* Issue: #19587: fix line break, attempt to make readble

        things at line 646 look ugly ..
        trying to make them look a bit more human readble
        though the entire approach should be rewriten

PNTSYSOPS-1901 - internal reference

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>

* #19587: fixing typo, skip-broken has to be passed as list

* PR: #21475: peer review changes
            relates to: revert comment deletion https://github.com/ansible/ansible/pull/21475#discussion_r101574146
            relates to: remove irelevant var https://github.com/ansible/ansible/pull/21475#discussion_r101573388
            relates to: reformat https://github.com/ansible/ansible/pull/21475#discussion_r101572840

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>

* PR: #21475: peer review changes
            relates to: https://github.com/ansible/ansible/pull/21475#discussion_r101573736

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>

* Issue: #21475: fixing typo in the Man section

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>

* PR: #21475 - Peer review: revert variable a
        Relates to: https://github.com/ansible/ansible/pull/21475#pullrequestreview-22404868

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>

* Issue: 19587 - small correction

Signed-off-by: Veaceslav Mindru <vmindru@redhat.com> <mindruv@gmail.com>
2017-02-21 07:59:07 -08:00
Adrian Likins
297566f2fd Wrap vault encrypt_strings zip() result in list for py3 (#21695)
py3 zip() results are not lists, so list'ify the result
for py2/py3 compat.
2017-02-21 10:30:21 -05:00
Damien
6fadddeaba network/aos - Fix doc for session information (#21718)
* Fix EXAMPLES to make session variable homogeneous across all modules

* Fix parameter name in EXAMPLE, template not design_template
2017-02-21 14:56:12 +00:00
Peter Sprygada
6e9244a9e1 adds more logging output to network_cli and ansible-connection (#21716) 2017-02-21 09:21:41 -05:00
Sebastien Lacoste-Seris
77596951b8 Update vca_vapp.py (#19562)
Check result of vApp creation and return module failure if creation task not present
2017-02-21 09:00:07 -05:00
Roman Belyakovsky
aa6585942e Fix for crash on missing privileges, closes #21051 (#21518) 2017-02-21 08:53:40 -05:00
Loïc Blot
d144cf9c27 vmware_inventory: permit to skip nopermission error on host subkeys (notify user in debug mode) (#21663)
example use case: you have rights on guest but you cannot see the VMWare host

Signed-off-by: nerzhul <loic.blot@unix-experience.fr>
2017-02-21 08:51:23 -05:00
Ricardo Carrillo Cruz
6622b05326 Fix memory ios facts (#21696)
In order to populate the total and free mem of an IOS device, we run
the 'show memory statistics' command.
The output shows something similar to:

                Head    Total(b)     Used(b)     Free(b)   Lowest(b)  Largest(b)
Processor    BEAE880   335215488    64044364   271171124   268918092   268463852
      I/O    8DAE880    51380224    41880736     9499488     9461552     9352252

We need to just parse the line containing 'Processor' and get the first and third
number for total and free mem, instaed for first and second as the code wrongly
does.
2017-02-21 14:38:35 +01:00
Paulo Matias
46fee994d1 os_subnet: add support for using the default subnetpool (#20191)
Allows to pass use_default_subnetpool instead of a cidr. This is
required when adding an IPv6 subnet if BGP or prefix delegation is
enabled.
2017-02-21 14:27:59 +01:00
Peter Sprygada
2567e8157f fixes bug where handle_prompts failed if list of prompts provided (#21711)
This will now automatically convert the prompts to a list and iterate
over the regexp looking for a prompt match before supplying the answer.
2017-02-21 08:27:33 -05:00