Commit graph

6852 commits

Author SHA1 Message Date
Toshio Kuratomi
2583f2774d Some beginning python3 porting for urls.py 2016-04-27 07:15:51 -07:00
Toshio Kuratomi
c2efb0b7e6 Update submodule refs 2016-04-27 06:49:17 -07:00
Toshio Kuratomi
a0f397eb6c Fix traceback in fetch_urls when status code is in info as well as the error. 2016-04-27 06:49:12 -07:00
Robin Roth
b861083dfb move machine_id back to Facts class 2016-04-27 09:29:39 +02:00
Robin Roth
5626c540ce refactor distribution version parsing
* split code as separate class
* split different distributions as individual functions
* keep program logic mostly identical (for now)
* increase readability, reduce complexity/indentation
* make future testing/refactoring easier
* step towards making distribution parsing independent of the Facts class
* add some changes to make facts.py python3 parsable
2016-04-27 09:15:01 +02:00
James Cammarata
8103793b55 Version bump to 2.2.0 for devel 2016-04-26 16:29:52 -04:00
nitzmahone
8c27018038 update submodule refs 2016-04-26 09:51:16 -07:00
Brian Coca
0652fa0ce6 ran dos2unix and renamed tags cannonical option 2016-04-26 11:27:01 -04:00
Toshio Kuratomi
008bde91a8 Update submodule refs 2016-04-26 07:24:27 -07:00
Rob
bc859eec7e Add shared functionality to return list of security group IDs from list of names (#15054)
* Add shared functionality to return list of security group IDs from list of security group names - this functionality can be used by nearly all ec2 modules

* Improved doc string for get_ec2_security_group_ids_from_names function
2016-04-26 09:17:36 -04:00
Chris Houseknecht
2790929e73 Fix bugs from API version 1.20 testing. (#15586) 2016-04-25 16:07:24 -04:00
Nathaniel Case
250b975704 Clarify exception handling in net modules (#15507)
* Clarify exception handling in EOS

Also modify to EOS to standardize modules. It makes vimdiff a lot less angry

* Move IOS exception handling into Cli

* Move IOS-XR exception handling into Cli

* Move JUNOS exception handling into Cli

* Move NXOS exception handling into Cli

And reorganize to make it match the other modules

* Move OpenSwitch exception handling into Cli

More speculative restructuring here
2016-04-25 16:04:19 -04:00
James Cammarata
50792f46a5 Submodule pointer update 2016-04-25 15:58:44 -04:00
Jonathan Davila
1999e71658 Added basic auth argument spec to utils (#15585) 2016-04-25 14:55:39 -04:00
Matt Davis
8bf1c53b21 winrm connection tweaks for pywinrm (#15584)
added warnings for invalid kwargs
sniff supported authtypes (for new pywinrm)
use default authtypes (for old pywinrm)
error on unsupported authtype
allow no username/password to be specified (kerb SSO)
tested w/ old and new pywinrm
hacky CLIXML parsing of stderr
2016-04-25 14:20:27 -04:00
René Moser
4e0013d161 playbook, include: fix Unexpected Exception: 'NoneType' object has no attribute 'strip' (#15574)
If `include:` statement is used without argument, we get a traceback.
2016-04-25 13:40:49 -04:00
Olivier GROSJEANNE
4647e8b74e HTTPError can also function as a non-exceptional file-like return value (#14915)
* HTTPError can also function as a non-exceptional file-like return value (the same thing that urlopen() returns)

* HTTPError - adding response to info dictionnary

* HTTPError - adding response to info dictionnary

* HTTPError - adding body response to info dictionnary
2016-04-25 13:21:45 -04:00
Jonathan Davila
f296d74329 Documentation fragment. To be used with modules that use basic auth. (#15582)
Supplies a doc fragment for:
- api_username
- api_password
- api_url
- validate_certs
2016-04-25 12:54:11 -04:00
Toshio Kuratomi
2fd7f194c8 Convert byte strings to unicode strings in our task results (#15581)
Fixes #15367
2016-04-25 12:35:25 -04:00
Robin Roth
f7c589b049 get ssh_keys without using distribution info (#15301)
* use list of possible directories directly instead of checking distribution info
* this could fail if someone has keys in one of the other directories, but there could also be custom ssh key directories, which
  are not checked at all
* this is work towards separating Facts from Distribution in facts.py
2016-04-25 12:15:35 -04:00
Darragh Bailey
be17ba67b2 Prevent race in key setup for accelerate daemon (#15299)
Ensure that initial setup in creating the key directory for ansible
accelerate mode keys, and generation/storage of the key for a
particular host are completed in a multiprocess safe manner.

Creating directories/files and then assigning permissions and contents
to them means that paths may exist and satisfy the os.path.exists()
method in python for other processes before they are usable.

Use a combination of locking around operations with use of unique named
files and an OS file system move to ensure that the conditions of
checking whether a file or directory exists, where it is potentially
created by another thread, will only succeed when the file has both the
correct contents and permissions.

Fixes #13850
2016-04-25 12:13:42 -04:00
Matt Davis
2becd79e5f Merge pull request #15314 from nitzmahone/win_reboot
add win_reboot action
2016-04-25 09:13:18 -07:00
Peter Sprygada
2f411c9aa9 fix default REST ports for http and https in openswitch (#15580)
properly uses the right default ports for http (80) and https (443)
2016-04-25 11:42:28 -04:00
Tegan Snyder
bf0da4aa3c add centrify dzdo escalation (#15219)
add dzdo context, and test
2016-04-25 11:24:26 -04:00
Adam Hamsik
2424d57868 Add sas_address and sas_device_handle to ansible disk device facts (#15201) 2016-04-25 11:22:46 -04:00
James Cammarata
1211a0fa12 Fixing the way we iterate over child states for tasks
Previously we were first checking the fail/run state of the child
state for tasks/rescue/always portions of the block. Instead we are now
always recursively iterating over the child state and then evaluating
whether the child state is failed or complete before changing the failed/
run state within the current block.

Fixes #14324
2016-04-25 11:13:44 -04:00
Brian Coca
0f9eaedfa9 added missing alias to docker doc fragment 2016-04-25 10:20:59 -04:00
Toshio Kuratomi
87d2345cf5 Merge pull request #15562 from abadger/ziploader-minor
Quite a few individually minor changes to ziploader
2016-04-25 06:59:22 -07:00
Toshio Kuratomi
bdd73e31dc Have test-module clean up the local temp dir when it exits
Get test-module's debugger switch to do something useful with ziploader modules
2016-04-24 20:44:42 -07:00
Toshio Kuratomi
3ffd55ce7f Don't include "ansible" in the module output as there are a few files in the upper directory (args and the module) 2016-04-24 20:42:14 -07:00
Toshio Kuratomi
3c135ef3f2 Push debug files into a subdirectory to keep things cleaner.
We now have the ansible module directory, ansible_module_*.py script
file and the args file.  Makes sense to push them all into a separate
subdir.
2016-04-24 20:42:14 -07:00
Toshio Kuratomi
e9553c975f Add debug usage to comments in the ziploader wrapper and don't strip comments if ANSIBLE_KEEP_REMOTE_FILES=1 2016-04-24 20:42:13 -07:00
Peter Sprygada
03a77e025d Merge pull request #15569 from privateip/local_action_junos_template
updates action plugin junos_template to guess file format
2016-04-24 13:13:34 -04:00
Peter Sprygada
a1a732e24d updates action plugin junos_template to guess file format
This update will attempt to guess the file format based on the template
extension if the format argument isnt set.  It will also set the commit
comment to the task name if the comment isnt' explicitly defined.
2016-04-24 11:41:00 -04:00
Peter Sprygada
ffd42118d9 Revert "add new action plugin junos_config" 2016-04-24 10:34:29 -04:00
Peter Sprygada
cea6d858bc Merge pull request #15566 from privateip/junos
adds config_format to junos shared module
2016-04-24 08:57:08 -04:00
Peter Sprygada
c4bd1c5a33 Merge pull request #15553 from privateip/local_action_junos_config
add new action plugin junos_config
2016-04-24 08:25:30 -04:00
Peter Sprygada
c87300f9e7 adds check on config_format kwarg in junos
This adds a check to validate the arugment for config_format kwarg in
get_config.  If the specified format is not a valid option, the shared
module will call fail_json
2016-04-24 08:20:14 -04:00
Peter Sprygada
61baf41edc Merge pull request #5 from dgarros/pyez
Add options to get_config to accept format (text, set or xml)
2016-04-24 08:18:10 -04:00
Peter Sprygada
2c90472609 Merge pull request #15410 from privateip/junos
adds support for netconf to junos shared module
2016-04-24 06:57:18 -04:00
Toshio Kuratomi
44e21f7062 Allow AnsibleModules to be instantiated more than once in a module
Fix SELINUX monkeypatch in test_basic
2016-04-23 14:04:45 -07:00
chouseknecht
dc9b784432
Update per PR comments. 2016-04-23 12:47:16 -04:00
chouseknecht
8dc04770b6 Fix syntax error 2016-04-23 12:46:47 -04:00
chouseknecht
48a2165310 Adding docker_common util module. 2016-04-23 12:46:47 -04:00
Toshio Kuratomi
d7189a442e ziploader currently needs absolute imports to know whether to include another module 2016-04-23 07:25:21 -07:00
Yannig Perre
72f17f3ff3 New get_all_subclasses function in basic modules and use it in fact modules. 2016-04-23 07:24:26 -07:00
Yannig Perre
eb18767f91 Visit all network class not just direct sub classes.
Fix for https://github.com/ansible/ansible/issues/15446
2016-04-23 07:24:26 -07:00
Toshio Kuratomi
09605ce806 Fix facts for the FieldAttribute list change in 30a38f9 2016-04-22 16:31:53 -07:00
Peter Sprygada
edbdf0d955 add new action plugin junos_config
This adds a new action plugin for junos for working with the junos configuration
file on the remote device
2016-04-22 15:48:51 -04:00
Peter Sprygada
32329b493d adds support for netconf to junos shared module
Netconf support is provided using the junos-eznc library and the shared
module depends on junos-eznc to be installed on the local Ansible host.  This
commit also adds changes to the netcfg library to handle receiving messages
over netconf.

To use netconf, specify transport=netconf for junos module.  Be sure that
netconf has been enabled on the remote device.
2016-04-22 15:28:53 -04:00