Commit Graph

7690 Commits (cd6e01349e5f67ecb18b6cf8c8d27ff1d46bf5dc)

Author SHA1 Message Date
Matt Martz 72b6f8244c Merge pull request #15337 from sivel/ignore-profile-crap
Guard against a shell profile printing extraneous data
10 years ago
James Cammarata ae09648068 Merge pull request #15812 from cThrice/patch-3
Fixes #15745 playbook include: Conditional scoping
10 years ago
Toshio Kuratomi b4e78caf25 Merge pull request #15825 from abadger/fix-squashing-traceback
If we can't squash for any reason, then simply do not optimize the items loop.
10 years ago
Matt Martz ca22783086 modify_module does not need to return module_path, as the calling code already has access to it 10 years ago
Matt Martz 34adb54734 Make _is_binary use already read module_data, move _is_binary check to the top of the stack 10 years ago
Matt Martz 0faddfa168 Move binary module detection into executor/module_common.py 10 years ago
Matt Martz ddf3c3838f Re-implement/move some code lost due to merge conflicts 10 years ago
Matt Martz 35246abb2e Don't register new vars that aren't needed 10 years ago
Matt Martz 1e038e5043 Update for py26 10 years ago
Matt Martz 0a8d016642 Get binary modules working for windows, assuming .exe for windows 10 years ago
Matt Martz d8a243bef0 First pass at allowing binary modules 10 years ago
Toshio Kuratomi 292f0ed0d6 If we can't squash for any reason, then simply do not optimize the items loop.
Also add more squashing testcases

Fixes #15649
10 years ago
Matt Martz 1cee3f35b1 Guard against a shell profile printing extraneous data 10 years ago
Toshio Kuratomi 4d59779e0a Fixed importing the libcloud modules to give a nice error rather than a traceback. 10 years ago
Vic Iglesias dac356466c Update GCE module to use JSON credentials (#13623)
* Update GCE module to use JSON credentials

* Ensure minimum libcloud version when using JSON crednetials for GCE

* Relax langauge around libcloud requirements
10 years ago
James Cammarata d391c53b4f Clear blocked hosts when a role duplicate task is found in free strategy
In the free strategy, we mark a host as blocked when it has work to do
(the PlayIterator returns a task) to prevent multiple tasks from being sent
to the host. However, we check for role duplicates after setting the blocked
flag, but were not clearing that when the task was skipped leading to an
infinite loop. This patch corrects that by clearing the blocked flag when
the task is skipped.

Fixes #15681
10 years ago
James Cammarata 08f6283c3f Merge pull request #15747 from larsks/bug/15744
do not erroneously set gathered_facts=True
10 years ago
James Cammarata 3439bcc744 Merge branch 'refresh-inventory-exit' of https://github.com/zenbot/ansible into zenbot-refresh-inventory-exit 10 years ago
James Cammarata 0d7530e6da Change error about loop variable in use to a warning 10 years ago
Toshio Kuratomi 8a184381af Strip junk after JSON return. (#15822)
Fixes #15601
10 years ago
James Cammarata 9d9a451b34 Simply being in an always block shouldn't mean a host did not fail
Previously the changed code was necessary, however it is now problematic
as we've started using the is_failed() method in other places in the code.
Additional changes at the strategy layer should make this safe to remove
now.

Fixes #15625
10 years ago
Carl fefd87c61a Fixes #15745 playbook include: Conditional scoping
Fixes #15745
Applies conditional forwarding to all tasks/roles within the included playbook.
The existing line only applies forwarded conditionals to the main Task block, and misses pre_, post_, and roles.

Typo ::

Made a selection mistake when I copied over the one line change
10 years ago
James Cammarata 33de7707c9 Do not include params when getting role vars in certain situations
In VariableManager, we fetch the params specifically in the next step,
so including them in the prior step is unnecessary and could lead to things
being overridden in an improper order.

In Block, we should not be getting the params for the role as they are
included earlier via the VariableManager.

Fixes #14411
10 years ago
Toshio Kuratomi 9096901c1f Update submodule refs 10 years ago
Toshio Kuratomi 99e3880181 small python3 fix so that ping will run on python3 10 years ago
Brian Coca 4561be00af simplified inventory error messaging 10 years ago
Tim Rupp a685fa5543 Add port argument for bigsuds (#15434)
This patch adds the port argument as a valid parameter to the f5_spec.

This argument is supported in bigsuds version 1.0.4 and greater, so
this patch uses the __version__ variable of the bigsuds module to
determine when the port value should be honored by the module.
10 years ago
Brian Coca f576082949 restore old jsonfile behaviour on key expiration
fixes #14456, now it won't expire keys in middle of a play when they
were 'valid' at 'gather time'.
10 years ago
Brian Coca 47d05e9b58 fix bad assignment, method modifies by ref already
fixes #15694
10 years ago
Matthew Stoltenberg ddd9f92255 add repr for hostvars (#15793)
* allows passing full hostvars to a module
10 years ago
Toshio Kuratomi 9e88fa21f5 Update submodule refs 10 years ago
Kamjar Gerami 724e692f54 fixes-#15685-tools-that-paginate-show-spurious-less-output: less --version outputs to standard out not to standard error so this changes the redirect from 2> to > (#15720)
fixes-#15685-tools-that-paginate-show-spurious-less-output: Updated redirect to include stderr as well as stdout to not show any errors on screen
10 years ago
jctanner 781de83762 When walking through module directories, always follow symlinks. (#15784)
Fixes #15783
10 years ago
Mike Bryant 68795d8128 Allow ssh agent usage for junos_netconf
By default the `Shell` class disables ssh agents. The `junos_netconf`
module uses this class, but doesn't re-enable agents.
Here it's explicitly enabled again, so an ssh agent can be used to
connect to and configure Junos devices.
10 years ago
Toshio Kuratomi 409bfe4d0f Strip leading and trailing whitespace for json arg types 10 years ago
Robin Roth 30e5999812 Fix distribution_facts missing on BSD (#15780)
The previous fix in #15773 only solved MacOSX, but left other BSDs broken

fixes #15768
10 years ago
Pomin Wu 78808fc4cc Fixed `ansible_os_family` variable on OS X (#15768) (#15773)
Fixed `ansible_os_family` variable on OS X
10 years ago
nitzmahone fca5ba153e bump extras submodule ref 10 years ago
Toshio Kuratomi 0a5831e654 Update submodule refs 10 years ago
Jiri Tyr 589f6d25bb Updating VCA module documentation (#14368) 10 years ago
James Cammarata 09c90f7f2f Fixing bugs in strategies
* Don't filter hosts remaining based on their failed state. Instead rely
  on the PlayIterator to return None/ITERATING_COMPLETE when the host is
  failed.
* In the free strategy, make sure we wait outside the host loop for all
  pending results to be processed.
* Use the internal _set_failed_state() instead of manually setting things
  when a failed child state is hit

Fixes #15623
10 years ago
Lars Kellogg-Stedman 21ac95402f do not erroneously set gathered_facts=True
In `lib/ansible/executor/play_iterator.py`, ansible sets a host's
`_gathered_facts` property to `True` without checking to see if there
are any tasks to be executed.  In the event that the entire play is
skipped, `_gathered_facts` will be `True` even though the `setup`
module was never run.

This patch modifies the logic to only set `_gathered_facts` to `True`
when there are tasks to execute.

Closes #15744.
10 years ago
nitzmahone 7708948d7d bump submodule refs 10 years ago
nitzmahone 133395db30 add jimi-c's unit test for squashed skip results, tweaked is_skipped() logic to pass 10 years ago
Andrew Taumoefolau 85868e07a9 Don't assume a task with non-dict loop results has been skipped.
This changeset addresses the issue reported here:

  ansible/ansible-modules-core#1765

The yum module (at least) includes its task results as strings, rather than
dicts, and the code this changeset replaces assumed that in that instance the
task was skipped. The updated behaviour assumes that the task has been
skipped only if:

* results exist, and
* all results are dicts that include a truthy skipped value
10 years ago
Brian Coca 3a6ca0b4a6 made ansible-doc complain on missing 'requried' 10 years ago
Brian Coca fb7940fc50 check that variable first
before using string methods to check for magic interpreter var
10 years ago
camradal be87cd8c26 Fix logging into vCloud Director and expose verify_certs argument (#15533) 10 years ago
Andrew Taumoefolau bc81c76f86 Apply inventory host restrictions by host name rather than UUID.
Issue #15633 observes that a meta: inventory_refresh task causes the playbook
to exit. An inventory refresh flushes all caches and rebuilds all host
objects, assigning new UUIDs to each. These new host UUIDs currently fail to
match those on host objects stored for restrictions in the inventory, causing
the playbook to exit for having no hosts to run further tasks against.

This changeset attempts to address this issue by storing host restrictions
by name, and comparing inventory host names against these names when applying
restrictions in get_hosts.
10 years ago
machilde 97c6389d62 Fixed issue with parents havings depth of 3+ on add method of NetworkConfig 10 years ago
Robin Roth 56ba10365c better fix for arch version detection (#15705)
* better fix for arch version detection

fixes  #15696

* be extra safe about tracebacks in facts.py

* add comments to explain the setup
* make allowempty more conservative, ignore file content
* wrap function call in try/except
  * should never happen, but if it happens the bug should be distribtion=N/A and not a traceback
10 years ago
nitzmahone 6373f2b045 error message cleanup 10 years ago
Peter Sprygada 91f67ac37a handle name resolution errors more gracefully from shell.py
This change will catch socket.gaierror exceptions from shell.py and
return a more friendly message to the user
10 years ago
Toshio Kuratomi ae9ddf0c1c Submodule updates to fix documentation 10 years ago
Tobias Wolf 87648f7bdf actionable.py: Do not print next task banner in handler callback (#15698)
Fix actionable callback plugin to not print the banner of the previous
task.

When a handler is executed there is no task banner, so in case it is run,
it will reference the banner from the preceding task.

**Author:** @hvhaugwitz

Test case:

      ---

      - name: actionable filter
        hosts: all
        handlers:
          - name: handler
            command: "true"
        tasks:
          - name: task 1
            file: path=/tmp/test state=touch
            notify: handler
          - name: task 2
            file: path=/tmp/test state=absent
          - name: task 3
            file: path=/tmp/test state=absent
          - name: task 4
            file: path=/tmp/test state=absent
          - name: task 5
            file: path=/tmp/test state=absent
          - name: task 6
            file: path=/tmp/test state=absent

Example output:

BEFORE
------

      PLAY [actionable filter] *******************************************************

      TASK [task 1] ******************************************************************
      changed: [localhost]

      TASK [task 2] ******************************************************************
      changed: [localhost]

      RUNNING HANDLER [handler] ******************************************************

      TASK [task 6] ******************************************************************
      changed: [localhost]

      PLAY RECAP *********************************************************************
      localhost                  : ok=8    changed=3    unreachable=0    failed=0

AFTER
-----

      PLAY [actionable filter] *******************************************************

      TASK [task 1] ******************************************************************
      changed: [localhost]

      TASK [task 2] ******************************************************************
      changed: [localhost]

      RUNNING HANDLER [handler] ******************************************************
      changed: [localhost]

      PLAY RECAP *********************************************************************
      localhost                  : ok=8    changed=3    unreachable=0    failed=0
10 years ago
James Pic d72a03deae Add get_distribution_Archlinux (#15696) 10 years ago
Toshio Kuratomi fff94551a1 Update core submodule ref to fix docs build 10 years ago
Toshio Kuratomi 3f104dcee9 Add a jsonarg type to arg spec (#15701)
This makes sure that if we get a list or dict that it is turned into
a jsonified string.
10 years ago
Brian Coca e0573d3099 make vi the default editor if no EDITOR
fixes #15577
10 years ago
James Cammarata c6a9d20b5c Merge pull request #15689 from axelspringer/include_fix
Restore Ansible 2.0 compatibility for include:
10 years ago
Martin Matuska 5ee38617b9 Treat "static: yes/no" with higher priority than "task_includes_static" in ansible.cfg 10 years ago
Toshio Kuratomi c42501cfe7 Update submodule refs 10 years ago
Toshio Kuratomi 81019e03fc Update submodule refs 10 years ago
Martin Matuska 438ed70a43 Restore Ansible 2.0 compatibility for includes 10 years ago
jctanner eb31faa7f5 Remove the ziploader provided pythonpaths from the env inside run_com… (#15674)
Remove the ziploader provided pythonpaths from the env inside run_command.

Fixes #15655
10 years ago
James Cammarata 1fc44e4103 Don't fail hosts when using any_errors_fatal when ignoring errors
Fixes #15431
10 years ago
Yannig 3901556b35 When var name is the same as var content, try to template it before reporting that var is not defined. (#13629)
* When var name is the same as var content, try to template it before reporting that var is not defined.
Add asserts in test_var_blending to check this special corner case.

* Fix integration tests when using debug with list or dict.
10 years ago
Toshio Kuratomi f39ad1f13a Get rid of logentries.to_unicode.
It wasn't doing anything that a literal couldn't do and used
unicode_escape which only understands latin1 (The author of the code
seems to have thought it took an encoding argument but it looks like
that was silently ignored.)
10 years ago
Toshio Kuratomi aec74b4b65 Fix inventory on python3 10 years ago
Toshio Kuratomi b8a988e922 bytes when passing to os.path.* and opening the file, text at other times
Fixes #15644
10 years ago
Toshio Kuratomi f61dd8c7fc Update submodule refs 10 years ago
Toshio Kuratomi 98feafb411 Fix the mapping of module_name to Locks
This was reinitialized every time we forked before so we weren't sharing
the same Locks.  It also was not accounting for modules which were
directly invoked by an action plugin instead of going through the
strategy plguins.
10 years ago
Robin Roth 1d6608e84f Dist version fix for Red Hat and more tests (#15663)
* add tests for centos6, rhel6 and rhel7

* gen_distribution_version_testcase with python2.6

* remove unused imports

* fix redhat/vmware/... parsing

* add centos7 test case
10 years ago
Brian Coca 6f4f8e6e79 fix typo 10 years ago
Toshio Kuratomi 1b78fd57b1 Merge pull request #15656 from abadger/ziploader-namespace
Fix ziploader for the cornercase of ansible invoking ansible.
10 years ago
Brian Coca d53c4b8ae7 fixed method signature as per #15668 10 years ago
Toshio Kuratomi 487e6562ca Fix ziploader for the cornercase of ansible invoking ansible.
* Make ziploader's ansible and ansible.module_utils libraries into
  namespace packages.
* Move __version__ and __author__ from ansible/__init__ to
  ansible/release.py.  This is because namespace packages only load one
  __init__.py.  If that is not the __init__.py with the author and
  version info then those won't be available.
* In ziplaoder, move the version ito ANSIBLE_CONSTANTS.
* Change PluginLoader to properly construct the path to the plugins even
  when namespace packages are present.
10 years ago
Chris Houseknecht 361ee9d7a6 Merge pull request #15618 from chouseknecht/docker_doc_frag
Docker doc frag
10 years ago
Brian Coca 941564b366 API now connects to server lazily (#15632)
This should fix most issues with offline operation.

Fixes #14486
Fixes #13991

Alternate to #15363 and #15593
10 years ago
Dag Wieers 7af47a3886 Rename function bool() as it is a Python built-in function (#15651) 10 years ago
Toshio Kuratomi 8016f8a638 Update submodule refs 10 years ago
Toshio Kuratomi 01cd4fd06f Handle "/usr/bin/env python" style ansible_*interpreter settings.
Fixes #15635
10 years ago
Brian Coca 60c1155d50 added common azure tags fragment 10 years ago
Peter Sprygada c43ea83275 fixes #15496
changed to using OrderedDict to preserve order of lines
10 years ago
Toshio Kuratomi 13532027ff Update submodules ref 10 years ago
Toshio Kuratomi 2583f2774d Some beginning python3 porting for urls.py 10 years ago
Toshio Kuratomi c2efb0b7e6 Update submodule refs 10 years ago
Toshio Kuratomi a0f397eb6c Fix traceback in fetch_urls when status code is in info as well as the error. 10 years ago
chouseknecht 9ddcf13661
Add aliases 10 years ago
chouseknecht 2e19a1d86a
Updated doc fragment to be consistent with the getting started guide. 10 years ago
Robin Roth b861083dfb move machine_id back to Facts class 10 years ago
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
10 years ago
James Cammarata 8103793b55 Version bump to 2.2.0 for devel 10 years ago
nitzmahone 8c27018038 update submodule refs 10 years ago
Brian Coca 0652fa0ce6 ran dos2unix and renamed tags cannonical option 10 years ago
Toshio Kuratomi 008bde91a8 Update submodule refs 10 years ago
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
10 years ago
Chris Houseknecht 2790929e73 Fix bugs from API version 1.20 testing. (#15586) 10 years ago
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
10 years ago
James Cammarata 50792f46a5 Submodule pointer update 10 years ago
Jonathan Davila 1999e71658 Added basic auth argument spec to utils (#15585) 10 years ago
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
10 years ago
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.
10 years ago
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
10 years ago
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
10 years ago
Toshio Kuratomi 2fd7f194c8 Convert byte strings to unicode strings in our task results (#15581)
Fixes #15367
10 years ago
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
10 years ago
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
10 years ago
Matt Davis 2becd79e5f Merge pull request #15314 from nitzmahone/win_reboot
add win_reboot action
10 years ago
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)
10 years ago
Tegan Snyder bf0da4aa3c add centrify dzdo escalation (#15219)
add dzdo context, and test
10 years ago
Adam Hamsik 2424d57868 Add sas_address and sas_device_handle to ansible disk device facts (#15201) 10 years ago
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
10 years ago
Brian Coca 0f9eaedfa9 added missing alias to docker doc fragment 10 years ago
Toshio Kuratomi 87d2345cf5 Merge pull request #15562 from abadger/ziploader-minor
Quite a few individually minor changes to ziploader
10 years ago
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
10 years ago
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) 10 years ago
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.
10 years ago
Toshio Kuratomi e9553c975f Add debug usage to comments in the ziploader wrapper and don't strip comments if ANSIBLE_KEEP_REMOTE_FILES=1 10 years ago
Peter Sprygada 03a77e025d Merge pull request #15569 from privateip/local_action_junos_template
updates action plugin junos_template to guess file format
10 years ago
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.
10 years ago
Peter Sprygada ffd42118d9 Revert "add new action plugin junos_config" 10 years ago
Peter Sprygada cea6d858bc Merge pull request #15566 from privateip/junos
adds config_format to junos shared module
10 years ago
Peter Sprygada c4bd1c5a33 Merge pull request #15553 from privateip/local_action_junos_config
add new action plugin junos_config
10 years ago
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
10 years ago
Peter Sprygada 61baf41edc Merge pull request #5 from dgarros/pyez
Add options to get_config to accept format (text, set or xml)
10 years ago
Peter Sprygada 2c90472609 Merge pull request #15410 from privateip/junos
adds support for netconf to junos shared module
10 years ago
Toshio Kuratomi 44e21f7062 Allow AnsibleModules to be instantiated more than once in a module
Fix SELINUX monkeypatch in test_basic
10 years ago
chouseknecht dc9b784432
Update per PR comments. 10 years ago
chouseknecht 8dc04770b6 Fix syntax error 10 years ago
chouseknecht 48a2165310 Adding docker_common util module. 10 years ago
Toshio Kuratomi d7189a442e ziploader currently needs absolute imports to know whether to include another module 10 years ago
Yannig Perre 72f17f3ff3 New get_all_subclasses function in basic modules and use it in fact modules. 10 years ago
Yannig Perre eb18767f91 Visit all network class not just direct sub classes.
Fix for https://github.com/ansible/ansible/issues/15446
10 years ago
Toshio Kuratomi 09605ce806 Fix facts for the FieldAttribute list change in 30a38f9 10 years ago
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
10 years ago
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.
10 years ago
James Cammarata 30a38f94ce Create a special class of list FieldAttribute for splitting on commas
Which we're use on a case-by-case basis if we find people were actually
using comma-separated strings for list values outside of hosts. Support
for doing so is now deprecated and users should instead use the full
YAML syntax for lists of values.

Fixes #15291
10 years ago
Toshio Kuratomi fcd6d7010d Fixup perms dont rely on privileged user named root (#15482)
* Don't rely on username to check for root privileges

The SSH username isn't a reliable way to check if we've got root privileges on
the remote system (think "toor" on FreeBSD). Because of this check, Ansible
previously tried to use the fallback solutions for granting file access (ACLs,
world-readable files) even on systems where it had root privileges when the
remote username didn't match the literal string "root".

Instead of running checks on the username, just try using `chmod` in any case
and fall back to the previous "non-root" solution when that fails.

* Fail if we are root and changing ownership failed

Since this code is security sensitive we document exactly the expected
permissions of the temporary files once this function has run.  That way
if a flaw is found in one end-result we know more precisely what scenarios
are affected and which are not.
10 years ago
jctanner 76f73dc81f Change the raw module's detection of environment settings. (#15535)
The task_vars datastructure always contains an environment key,
so use the _task.environment property to look for a non-empty
list instead.
10 years ago
chouseknecht a79e9182e1
Set the name of the user_agent in each mangement client. 10 years ago
Kei Nohguchi 9d5b4fe212 openswitch.py: Use new ops.dc declarative Config(DC) module (#15489)
Instead of using the old OpenSwitch runconfig, we'll use
Mir's new ops.dc declarative config for the DC interaction
with OpenSwitch.  This gives us the clearer separation between
ansible and the OpenSwitch, as well as the performance
improvement done inside the ops.dc module itself.

Squashed the original Mir's change into single commit.

Tested-by: Kei Nohguchi <kei@nohguchi.com>
10 years ago
Brian Coca a76531ca3a submodule ref update 10 years ago
chouseknecht af5e4abf66
Rename azure inventory script. Fix bug preventing AD user login via environment vars. 10 years ago
James Cammarata 772d659929 Updating CHANGELOG and extras submodule pointer for new kubernetes module 10 years ago
Toshio Kuratomi bac47f6281 Update submodule refs 10 years ago
Chris Houseknecht ba74f5f3e5 Adding docker doc frag (#15494) 10 years ago
Brian Coca a5d79a39d5 Ensure action plugins remove tmp dirs created (#15501)
fixes #14917
10 years ago
Matt Davis 67e6bd18e4 Merge pull request #15488 from jctanner/AMC-32
WARN if the play or the task attempts to pass environment to the raw module
10 years ago
Toshio Kuratomi 6520312a65 Update submodule refs 10 years ago
Brian Coca b1c3d2aacb removed unused section regex, corrected group one 10 years ago
Toshio Kuratomi 5fc90058e4 Make ziploader handle python packages as well as python modules 10 years ago
James Tanner 095ec760ac Provide a warning if the play or the task attempts to pass environment to the raw module.
Addresses ansible-modules-core/issues/32
10 years ago
James Cammarata f32592f092 Merge pull request #14400 from d3matt/FIX/paramiko_lecture
paramiko transport appears to hang if it gets a sudo lecture
10 years ago
Toshio Kuratomi ee18af48ef Merge pull request #15385 from bjne/mysql_unix_socket
mysql_*: enable mysql connection via unix socket
10 years ago
James Cammarata a0dea1ac35 Fix var precedence bug introduced in ff9f5d7d
Fixes #14067
10 years ago
Toshio Kuratomi 7b5d2d3bec Make sure that args are interpreted as utf8 on python3 10 years ago
Toshio Kuratomi e386a51cf8 Trnasform file name to bytes before opening it to avoid unicode errors if python tries to encode it implicitly 10 years ago
Toshio Kuratomi 0a31c24938 Merge pull request #15419 from nitzmahone/module_debug_arg_override
add _load_params debug overrides for module args/file passed on cmdline
10 years ago
Toshio Kuratomi 596f6e0894 Update core submodule ref again for another git fix 10 years ago
Toshio Kuratomi 0e63f09d5a Fix for apt module test failures 10 years ago
Brian Coca 33761efd19 Merge pull request #15417 from bcoca/copy_vaulted
Copy vaulted
10 years ago
Toshio Kuratomi c8cb5e1042 Update submodule refs 10 years ago
Matt Davis 822f904aa6 Merge pull request #14813 from mattclay/lxd-plugin
Add lxd connection plugin.
10 years ago
James Cammarata 0e2f1b423d Merge pull request #15455 from chemikadze/devel
Fix duplicate host with different uuid created after add_host
10 years ago
James Cammarata 6eefc11c39 Make the loop variable (item by default) settable per task
Required for include+with* tasks which may include files that also
have tasks containing a with* loop.

Fixes #12736
10 years ago
Toshio Kuratomi d2a7be142e A couple fixes for ziploader:
* Move zipcache temp dir creation into the locked section otherwise it
  races with other workers.
* Catch IOError and turn it into an AnsibleError.  IOErrors can hang
  multiprocessng.
10 years ago
nitzmahone 5b336832af add _load_params debug overrides for module args/file passed on cmdline
Updated python module wrapper explode method to drop 'args' file next to module.
Both execute() and excommunicate() debug methods now pass the module args via file to enable debuggers that are picky about stdin.
Updated unit tests to use a context manager for masking/restoring default streams and argv.
10 years ago
James Cammarata ed35e8bce2 Don't override the http status code when successful in urls.py 10 years ago
Toshio Kuratomi 7833b5bec4 Merge pull request #15420 from robinro/distribution_version_tests
Distribution version tests
10 years ago
Chris Houseknecht f28a0ca4bb Update Azure doc fragment (#15450)
* Add default attribute to all option doc strings.

* Fix fragment file name.
10 years ago
Brian Coca 621b98668f fixed boto.ec2 import
alternative to #15224 and fixes #11755
10 years ago
Nikolay Sokolov d8867d7ce3 Fix duplicate host with different uuid created after add_host
If add_host is performed with hostname existing in inventory, but
not yet accessed and put in inventory cache, additional host with
same hostname and different uuid is created, causing patterns to
misbehave.
10 years ago
Ritesh Khadgaray 3608829b1b vmware.py: allow for better search functionality (#15053)
- search entity by path
 - search vm based on folder
 - search for a vm based on given id ( uuid/name/dns_name/ip/inventory_path)
 - search for a cluster by name, in a given datacenter (optionally)
 - search for objects of a given type in a folder

Note: instance uuid is unique to a VM
10 years ago
chouseknecht ea07afe67b
Add missing AD user params. 10 years ago
Chris Houseknecht 9e6988c7b5 Merge pull request #15359 from chouseknecht/azure_common
Adding common utils module for new Azure modules.
10 years ago
chouseknecht 98d8da1e67 Adding Azure module doc fragments. 10 years ago
chouseknecht 47620737fb Adding common utils module for new Azure modules. 10 years ago
Matt Clay 5fc76df18b Add lxd connection plugin. 10 years ago
Matt Martz a985bf6a31 Don't pass context to urlopen, instead add it to the handlers. Fixes https://github.com/ansible/ansible-modules-core/issues/3437 10 years ago
Robin Roth 37188ea336 cleanup tests
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
10 years ago
Robin Roth 2b104fe6ad fix tests for SLES and CoreOS
* include #15230
10 years ago
Brian Coca 7062e086d4 made paging marker configurable as boto differs 10 years ago
nitzmahone e75077fb23 bump submodule refs 10 years ago
Peter Sprygada 9111efc975 adds two new regex filters for use in playbooks (#14696)
The first filter is regex_search which adds the ability to do a regex
search on a fact.  The filter supports returning either all capture groups
or a set of capture groups (either by index or named).

Example usage of regex_search filter

debug: msg="{{ out.stdout[0] | regex_search('image version. (?P<test>\d+).(\d+)', '\\g<test>', '\\2' ) }}"

The second filter is regex_findall with adds the capability to do a
regex findall on a fact or variable and return all occurances of a pattern.

debug: msg="{{ out.stdout[0] | regex_findall('vlan (\d+)' }}"

The filter supports two addtional keyword arguments, ignorecase=[true, false]
and multiline=[true, false]
10 years ago
Brian Coca 5940d3d45b fixes to vault/copy
rm _del_ as it might leak memory
renamed to tmp file cleanup
added exception handling when traversing file list, even if one fails try rest
added cleanup to finally to ensure removal in most cases
10 years ago
Cambell cdf6e3e4bf feature/copy-vault-dataloader: Add method get_real_file(file_path) to dataloader
- get_real_file will decrypt vault encrypted files and return a path to
  a temporary file.

- cleanup_real_file will remove a temporary file created previously with
  get_real_file
10 years ago
Patrick Ogenstad 6c5ea685a2 Allow timeout to be configurable (#14973) 10 years ago
Toshio Kuratomi 78365e206f Merge pull request #15059 from willthames/remove_boto_ec2_requirement
Remove need for unnecessary boto.ec2 import
10 years ago
Toshio Kuratomi 2163a24a12 Fix when debug commands are run on the wrapper and the wrapper as a file in the current directory 10 years ago
Brian Coca a5a6bcfbbf updated capabilities to new way of module ref 10 years ago
Brian Coca b63238ff2c removed unused code for signal handling 10 years ago
Michael Scherer 74c83a91ed Add caps facts, fix #10360 (#15292) 10 years ago
Wolfgang Karall 7a9b8e43da get_mount_facts -- find bind mounts and add info to options field (#12036)
* get_mount_facts -- find bind mounts and add info to options field

* get_mount_facts -- only run findmnt if get_bin_path() finds the binary
10 years ago
Toshio Kuratomi 208ad36ce4 Merge pull request #15344 from abadger/ziploader
Ziploader "recursive imports" and caching
10 years ago
Jonathon Klobucar 7bee994e1c Fix for serial when percent amount is less than one host (#15396)
Ansible when there was a percentage that was calculated to be less than
1.0 would run all hosts as the value for a rolling update.

The error is due to the fact that Python will round a
float that is under 1.0 to 0, which will trigger the case of
0 hosts. The 0 host case tells ansible to run all hosts.

The fix will see if the percentage calculation after int
conversion is 0 and will else to 1 host.
10 years ago
Toshio Kuratomi afc7ec431a Update submodule refs 10 years ago
Toshio Kuratomi 7d174910c3 Make the ziploader wrapper work with PY3 10 years ago
Toshio Kuratomi 0031e08f7d excommunicate fix 10 years ago
Toshio Kuratomi 55bb24fb7d Reenable unicode=>byte conversion for module parameters to fix integration tests 10 years ago
Toshio Kuratomi 75546678d9 Fix unittests 10 years ago
Toshio Kuratomi 452034564c python-2.4's -m is severely limited.
Extract the module and invoke it as a script to work around python-2.4's
lack of features.
10 years ago
Toshio Kuratomi b571ecdfec Move module arg passing from the environment to stdin (from the wrapper to the module) 10 years ago
Toshio Kuratomi dcc5dfdf81 Controller-side module caching.
This makes our recursive, ast.parse performance measures as fast as
pre-ziploader baseline.

Since this unittest isn't testing that the returned module data is
correct we don't need to worry about os.rename not having any module
data.  Should devise a separate test for the module and caching code
10 years ago
Toshio Kuratomi b5717ef696 First whack at a recursive and ast based ziploader. I'm afraid this one may be too slow. 10 years ago
Toshio Kuratomi b4b058794e Correct the worker.run documentation 10 years ago
Toshio Kuratomi c929556226 Fix encoding string to show up in wrapper 10 years ago
Toshio Kuratomi 6bb0e35f85 Update submodule refs 10 years ago
Chris Houseknecht 432bfe5a4f Merge pull request #15364 from gregsidelinger/galaxy-ingore-certs-fix
Fix issue with ansible-galaxy and --ignore-certs
10 years ago
James Cammarata 8ef564176b Handle includes which may have been created in the flow of the playbook
Since 2.0 made all includes dynamic, it is now possible to create and
include a file in the course of executing a playbook. However, with the
introduction of implicit static includes this can cause problems if an
include is thought to be static but does not yet exist. For now, we're
handling missing implicit static includes as a potential dynamic include
but also adding a deprecation message to show includes like this will
need to be marked as `static: no` in the future.

Fixes #15342
10 years ago
Nathaniel Case 7290b6282d Update IOS, IOSXR, JUNOS, & OpenSwitch for environment vars. 10 years ago
Nathaniel Case dbc49ad95b First implementation of 'fallback' parameter
Implemented & documented for EOS & NXOS
10 years ago
James Cammarata 2e55b3567b Also fix intermittent ssh error using pty's for paramiko
Related to #13876
10 years ago
Bjørnar Ness d868cdc7b8 enable mysql connection via unix socket 10 years ago
Toshio Kuratomi 0ced20951f Use /var/tmp is user set remote_tmp below /var/tmp.
We want them to be able to influence this choice in case they want to
keep files out of /tmp (perhaps to conserve RAM if that is a tmpfs).
10 years ago
James Cammarata 44877b7c7e Don't use -tt for ssh connections when sudoable=False
Due to an apparent race condition while using pty's on a heavily loaded
system, rarely a request to create a temp directory returns an empty
string rather than the newly created path, causing an error. Disabling
forced pty's appears to resolve the issue, so this patch modifies the
mkdtemp remote call not use -tt as we're not escalating privileges and
thus no pty is required.

Fixes #13876
10 years ago
Toshio Kuratomi 6a97d6386f Always use system /tmp if system=True.
Otherwise unexpected errors can happen when the user sets remote_tmp.

Fixes #15372
10 years ago
Toshio Kuratomi b27c424fa1 Fixes to the documentation build (#15356)
* Could only have one alias before.  Subsequent aliases overrode the
  previous ones.  Now multiple aliases work.
* Fix BLACKLISTED_MODULES.   Previously, modules were listed in the
  generated documentation despite being blacklisted
* Deprecated modules form extras were showing the (E) tag and not the
  (D) tag. Reversed that now (Probably not necessary to also show the
  E tag).
* Sort the deprecated modules alphabetically in the Category docs as
  well as the list of all modules
* Optimization: Previously rendered the modules to rst twice once in all
  group and once in individual categories.  Fixed to only render them
  once.
* Add fireball to blacklist and remove async_status (as people need to
  use that).
10 years ago
nitzmahone 336b1ae84b add win_reboot action
also includes WinRM connection plugin change to support connection reset
10 years ago
Jesper Geertsen Jonsson bd0066d621 Adds support for converting a MAC address to an integer.
Example:
---
- hosts: local
  tasks:
    - set_fact: mac_str="52:54:00:00:00:00"
    - set_fact: base_mac="{{ mac_str | macaddr('int') }}"
    - debug: msg="{{ (base_mac|int + 257) | macaddr('linux') }}" # 52:54:00:00:01:01
10 years ago
Greg Sidelinger 11ffc0bfee Fix issue with ansible-galaxy and --ignore-certs
The --ingore-certs flag was not honored for https://server/role.tar.gz roles in the requirements file.
10 years ago
Toshio Kuratomi 54acdd7ead Remove workaround for fixed bug. (#15340)
* Remove workaround for fixed bug.

The bug where PluginLoader required objects to directly inherit from
base_classes has been fixed.  Remove workaround from this strategy
plugin   Also switched to using super so that we don't have to modify
all of hte code anytime something like that happens.

* These should be to_uniocde because they're being sent to display()
10 years ago
Brian Coca 005dc84aa7 moved last utils.debug to display.debug 10 years ago
Kishin Yagami e4a6106ea5 Add debug strategy plugin (#15125)
* Add debug strategy plugin

* Fix Python 2-3 compatiblity issue

* Add document for debug strategy
10 years ago
Brian Coca 0eb2844cc6 moved display's debug lock to cli as global 10 years ago
Matt Martz dd39f57ae7 Merge pull request #15289 from sivel/sni-urllib3-contrib-try2
Optional Use of urllib3 for SNI verification
10 years ago
Brian Coca a7f2588920 updated submodule ref 10 years ago
peter.jang 65856f2231 added suport rsync protocol (#12197)
* added suport rsync protocol

* use startswith method for safety
10 years ago
Toshio Kuratomi d29b833cb1 Update extras submodule ref 10 years ago
James Cammarata e5c4f88b71 Fix free strategy, which was incorrectly using _wait_on_pending_results
Broken in 210cf06d
10 years ago
nitzmahone eac4cf1177 fix options_vars iteration for py3 10 years ago
nitzmahone 83a17662cc update core submodule ref 10 years ago
Strahinja Kustudić eed6cf5dad Adds 'ansible_check_mode' boolean magic variable
* Makes it possible to pass any options variable to VariableManager
  by changing `load_options_vars(options)` in `lib/ansible/utils/vars.py`
10 years ago
Brian Coca 1942cd33dc draft add group merge priority and yaml inventory
* now you can specify a yaml invenotry file

* ansible_group_priority will now set this property on groups

* added example yaml inventory

* TODO: make group var merging depend on priority

  groups, child/parent relationships should remain unchanged.
10 years ago
Toshio Kuratomi 03ec71e5af Updae submodule ref 10 years ago
Toshio Kuratomi 19737236ee Add "excommunicate" debug option
Some debuggers are easier to work with when we do everything in a single
process.  This debug option caters to that at the expense of being
different from what Ansible will actually do to invoke a module.

When we document this we should be clear that this shouldn't be used for
general purpose debugging and that some modules may show strange
"errors" when used with this.  Those won't be considered real bugs as
it's not how ansible really invokes the modules.
10 years ago
Matt Davis 957b336cc1 skip fixup_perms for Powershell
action plugins will now skip _fixup_perms for Powershell. We'll have to come up with another way to do this at some point, but it's not necessary yet since we don't support become on Windows. Also added NotImplementedError throws to chmod/chown/set_facl operations on Powershell (instead of returning '') in case anyone tries to use them in the future.



fixes #15312
10 years ago
Brian Coca 5225048df9 capture attribute errors for invalid class plugins
also switched to py3 safe to_str
10 years ago
Toshio Kuratomi fd9838f1a0 Add BSD license information to the ZIPLOADER_TEMPLATE string since it
may be combined with module code.
10 years ago
Toshio Kuratomi 647123ee18 Ziploader subprocess.Popen
* Run the module as a script from the wrapper instead of executing in the same process.

Fixes cornercases where the module could potentially be executed twice
if we import and then run the main() function without calling sys.exit()
somewhere.

Also fixes problem with concurrent.futures() hanging.  Not sure
precisely how this is being triggered but it is related to invoking the
main() function outside of an if __name__ == '__main__' conditional.

* Fix for python-2.6
10 years ago
Toshio Kuratomi 8d46bcaa65 Update submodule refs for git fix 10 years ago
Toshio Kuratomi a57a32adcc Revert "Make the 'path' param type also use abspath on the value"
This reverts commit 1ffadbcc80.

Some modules seem to have path listed for things that are "commands"  --
something that may be a path to a command or a bare command that should
be looked up in PATH.  With this change, if they were formerly looked up
inPATH they are now being made into an absolute path in the cwd.
Reverting this until we can think more about whether to do this and
change those modules to not use path for those parameters.
10 years ago
James Cammarata 1ffadbcc80 Make the 'path' param type also use abspath on the value 10 years ago
Nathaniel Case 77e3dc9e6a Fix network modules for ziploader changes 10 years ago
James Cammarata 040893a677 Adding a config option to allow disabling locale settings upon module exec
Fixes #15138
10 years ago
Matt Martz 398218b6ea More intelligent building of the SSLValidationError message based on capabilities 10 years ago
Matt Martz bce79c67c3 Cascade ssh_*args configurations in synchronize instead of limiting to just ssh_args. See https://github.com/ansible/ansible-modules-core/issues/3370 10 years ago
Matt Martz 6e9c09d7f7 Utilize urllib3.contrib.pyopenssl functionality for SNI capability in python versions lacking SNI support
Also add SNI tests, move test_uri to destructive since we are messing with packages for SNI testing
10 years ago
Toshio Kuratomi edab8d338d Expand tilde after expanding vars 10 years ago
Peter Sprygada 72ce1e8f14 bugfix eos shared module handling config replace
fixes an issue with doing a config replace using eapi where the configuration
wasn't being replaced.
10 years ago
Peter Sprygada b97c8ce8e7 bugfix netcfg return config as str
fixes issue where netcfg would return out of order configuration
10 years ago
Toshio Kuratomi 4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
10 years ago
Matt Davis 6a3670b1f0 Merge pull request #15281 from jpic/fix_plugin_configuration
Regression fix: proper plugin configuration was reset
10 years ago
James Cammarata 0f2b1244d2 Make sure VariableManager has a view of HostVars
Fixes #15261
10 years ago
jpic da175d0a57 Bugfix: proper plugin configuration was reset
Before this patch, if config was ['/some/path'] then it would enter the
else block and config would be set to [].

The regression this patch fixes was introduced by 700db154.
10 years ago
Peter Sprygada cca084c89d enhancement to ios shared module connection
this enhancement will cause the module to connect to the remote ios device
the first time a command wants to run instead of building a connection
immediately
10 years ago
Peter Sprygada c2fac6c808 enhancement to iosxr shared module to lazy connect to device
this update will only connect to the remote device when the first request
is made to run a command instead of building the connection immediately
10 years ago
Toshio Kuratomi 315cfe2f63 Update module refs 10 years ago
Peter Sprygada 39a576697d feature to localize prompt search login to iosxr shared module
this localizes the cli prompt search logic to the iosxr shared module
instead of using the common regexp list in shell.py
10 years ago
Peter Sprygada 73c3f35112 fixes ansible/ansible-modules-core#3304 10 years ago
Toshio Kuratomi c75b5ba85f Use to_bytes and to_str instead of str as str is unsafe. 10 years ago
Dag Wieers 055aae55f7 Implement own CSVRecoder and CSVReader from documentation
As detailed in the python manual:
https://docs.python.org/2/library/csv.html
10 years ago
Dag Wieers ac75069ee0 Support different encoding types in csvfile lookup plugin
This fixes #15266.
10 years ago
Peter Sprygada 17f4db19ea adds additional details in exception handling in shell shared module 10 years ago
Peter Sprygada f5bcd38380 adds additional details in exception handling to ios shared module 10 years ago
Peter Sprygada 008395eda2 bugfix for nxos shared module to not immediately send \n
this fixes a bug in nxos shared module to not immediately send a \n when
the connection is made.  this commit also localizes the prompt handling
to the nxos module
10 years ago
Peter Sprygada 4e497b10b0 bugfix in netcfg to handle multilevel commands
this fixes a bug where netcfg would not properly find a statement that was
more than one level deep
10 years ago
James Cammarata d358a22542 Modification to 347b282 to prevent running the lookup with empty terms
Fixes #15258
10 years ago
Chris Houseknecht 2dd687acdd Merge pull request #15256 from alikins/galaxy_roles_path_fix_15255
Fix galaxy roles_path cli usage. (#15255)
10 years ago
Peter Sprygada c0230e6f12 refactors netcfg to pull common functions into shared library
The network config and template modules share a set of common functions that
have been pulled into the netcfg shared module.  This is backwards compatible
with the current implemention in the modules.
10 years ago
Peter Sprygada 437beb001b adds commands key to fail message in eos shared module
The commands the lists the set of commands it tried to configure when
using eapi as a transport
10 years ago
Adrian Likins 05b46091e4 Fix galaxy roles_path cli usage.
If we specify a roles_path from the cli, use a
optparse action callback to make sure the roles_path
is set to a path list.

Fixes #15255
10 years ago
Toshio Kuratomi dbd17322bf Update extras submodule ref for lxc_container fix 10 years ago
nitzmahone 700db15452 fix unconfigured plugin path case
We tried to expand paths for None- ensure we're not passing [None] in that case, but [] instead.
10 years ago
Brian Coca dbc5cc9d7a fix issue with plugin load path inconsistency
now assures it is always a list of paths and not just assumes it
this avoids issues of parsing a 'string path' and picking up '/' as
a valid path for plugin loader
10 years ago
Brian Coca 0bd6f3a5e8 correctly adds searchpath as list 10 years ago
Toshio Kuratomi 4ccea9905b Fix async for old style modules and don't send an args file for new-style modules 10 years ago
Toshio Kuratomi d9ecff9d4f Update submodule refs 10 years ago
Brian Coca 4d4c364ba8 updated module subrefs 10 years ago
Brian Coca 1e06a9f48d verifies required is a boolean 10 years ago
Brian Coca 39bc3e624a show callback exception on debug 10 years ago
Brian Coca 3b667e48ff Merge pull request #15242 from dagwieers/silence-diff-output
On change in diff-mode we don't need to see file content in task output
10 years ago
Dag Wieers d46af7cda3 On change in diff-mode we don't need to see file content in task output
I was surprised to see complete file content in the (JSON) task output when
in diff-mode. Since we see the diff anyhow, there's no need to send everything
on screen.
10 years ago
Dag Wieers 0d4f627654 Add the method_name to the catchall warning when using callback plugins
Without this you have no clue to where the exception is occuring.
10 years ago
Toshio Kuratomi 837f3dd24d Update submodule refs 10 years ago
Toshio Kuratomi f29b8e461b Merge pull request #15151 from mattclay/accelerate-unicode
Add to_bytes to file paths for accelerate plugin.
10 years ago
Matt Davis 3f70d7a70d Merge pull request #15144 from mattclay/winrm-test
Add winrm tests and fix exposed unicode errors.
10 years ago
James Cammarata 0656d1466a Adds two variables to facts when a task fails and a rescue block starts
`ansible_failed_task`:
   Contains the task data, essentially a serialized view of the Task() object.
`ansible_failed_result`:
   Contains the result of the task failure, which is identical in function
   to registering the result. Doing so automatically like this saves the user
   from having to register every result in a block and then trying to figure
   out which result had the failure

Similar to the way try/except/finally work, these variables will not be
available in the `always` portion of a block unless there is a corresponding
`rescue` first.

Fixes #12341
10 years ago
James Cammarata 26a4761d0f Fix logic error in script action plug related to use of shell.exists 10 years ago
Toshio Kuratomi e003ef93fc Update submodule refs 10 years ago
Matt Clay 262c341cda Add connection tests for winrm connection plugin.
These are the same tests used for the other connection plugins,
adapted to use winrm modules and Windows friendly paths.
10 years ago
Brian Coca e1461ef792 Merge pull request #15200 from wimnat/feature/handle_lists_in_snake_dict_creation
Handle lists during dict recursion
10 years ago
René Moser c0618794a2 Merge pull request #15213 from resmo/fix/cloudstack-api-secret-arg
cloudstack: fix bug, api_secret always None
10 years ago
Matt Clay 83e53cbb91 Add to_bytes to file paths for accelerate plugin. 10 years ago
James Cammarata a8dbd3dee9 Pass the variable manager into load_list_of_blocks for include files
Fixes #15194
10 years ago
Brian Coca 4b3257c4fe Merge pull request #15208 from bcoca/constants_pathlist
centralize path list handling
10 years ago
Brian Coca 5dfc013e18 Merge pull request #14971 from bcoca/clear_facts
meta: clear_facts
10 years ago
Brian Coca 5022fe9adc Merge pull request #15209 from temal-/devel
Add '--skip-tags' to ansible-pull
10 years ago
Rene Moser 65e61e340a cloudstack: fix bug, api_secret always None
In case if api args are used, api_secret is None in every cloudstack module.
10 years ago
Nathaniel Case e4e913b331 Override params from environment variables, if set.
Fix a typo while I'm in the area.

Handle having None set in module.params more intelligently
10 years ago
James Cammarata eab4ce19f3 Making the return parsing in ActionBase generic for reuse
Now also correctly parses the return value for the _low_level_execute_command
10 years ago
James Cammarata 4fc0aadd84 Only combine vars in include_vars if both are mappings
Fixes #15184
10 years ago
Brian Coca c09e085480 Merge pull request #14735 from jsok/open_url-netrc
Lookup netrc for credentials in open_url
10 years ago
Malte Krupa 3c954e6572 Add '--skip-tags' to ansible-pull 10 years ago
Brian Coca 92d154f4ef centralize path list handling
move it to constants and avoid duplicating code or misinforming
developers on the nature of the data
10 years ago
Brian Coca 3f6166d2bf always return rc 10 years ago
Rob White a46de20772 Handle lists during dict recursion 10 years ago
Peter Sprygada fa6464e807 feature to localize prompt search logic for ios shared module
Prompt search logic is now localized to the ios shared module instead
of using the common regexps in the shell module.  This resolves a number
of problems with ios modules functioning properly
10 years ago
James Cammarata 2be1726350 Don't remove _raw_params from static include args 10 years ago
nitzmahone 05af5c88ea fix Mac chown/chmod -R issue, add error checks
The changes to chown/chmod were broken on Mac (-R was being appended to the end of the command- OSX requires it before the file list).

A number of base action remote setup commands were also blindly proceeding without checking for success. Added error raises for unrecoverable failure cases.
10 years ago
James Cammarata f2713f764c Take previous jinja2 blocks into account in splitter when we see quotes
Previously, split_args() was not taking print/block/comment depth into account
when splitting things, meaning that if there was a quote character inside an
un-quoted variable (ie. {{ foo | some_filter(' ') }}), it was incorrectly
splitting on the quotes instead of continuing to append to the previous param.

Fixes #13630
10 years ago
Brian Coca 04610106a3 Merge pull request #15173 from mattclay/issue6072
Support remote_user in jail connection plugin.
10 years ago
Brian Coca e9a4526251 allow bypassing executable setting
if you set executable to an empty string this avoids passing one to the command constructor
fixes #14813
10 years ago
Rob White a5b05922ed Some helper functions to work with boto3 10 years ago
Brian Coca c303ed24b5 Merge pull request #15159 from sigio/filter-ip4-hex
Add ip4_hex filter to convert ip-address to hex notation
10 years ago
Brian Coca b77bba8f9f Merge pull request #15175 from wimnat/feature/camel_case_fixing
Add function to convert CamelCased key names to snake_names
10 years ago
Brian Coca 363384f517 Merge pull request #15174 from mattclay/conn-msg-host
Fix inconsistent/missing host names in messages.
10 years ago
David Wittman 5036d1742c Fix boolean choices in module docs fragments
A few of the docs fragments have the available choices for some params
defined as "BOOLEANS". Because choices accepts a list, it treats
"BOOLEANS" as an iterable and then generates a list composed of each
letter.

Instead, define the available choices as a list of `['yes', 'no']`,
as is common in most other modules.
10 years ago
Toshio Kuratomi 0fffb6c60c Merge pull request #15163 from ansible/synchronize-connection-vs-play_context
Use _connection instead of _play_context for information about the connection
10 years ago
Brian Coca c6c3fd79c2 Merge pull request #15168 from bcoca/script_exists_fix
Script exists fix
10 years ago
Rob White ef8c1124d0 Add function to convert CamelCased key names to snake_names 10 years ago
James Cammarata eff89d6290 Merge pull request #15140 from berlic/args-splitter-exception-context
Show error context in args splitter exception
10 years ago
Matt Clay 5fdc29e00f Fix inconsistent/missing host names in messages. 10 years ago
Matt Clay b60062bdf9 Support remote_user in jail connection plugin.
Resolves #6072.
10 years ago
Brian Coca 28d20dbe53 moved 'path exists' function to shell
now it will work with powershell/winrm
10 years ago
Toshio Kuratomi 0cabd133ba have to always run dwim() on the path to get the full absolute path.
Fixes #14944
10 years ago
Toshio Kuratomi e2f5762232 Use _connection instead of _play_context for information about the connection
If we're not delegating then we change _connection into a local
connection midway through the file but we don't change
_play_context.connection (no need to alter that).  When we later check
it in process_remote() we need to know the actual connection, not the
connection that we thought we were going to use at the start of run().
So we have to use _connection.transport in process_remote().  The rest
of the places could use either one (because we have not yet changed to
a local connection) but we go ahead and switch those to
_connection.transport as well to avoid confusion in the future.

Fixes https://github.com/ansible/ansible-modules-core/issues/3136
10 years ago
James Cammarata f4eb9aac24 Fix --start-at-task which was broken by the setup task revamp
Fixes #15010
10 years ago
Toshio Kuratomi 2adf8f7ec9 Update submodule refs 10 years ago
Mark Janssen -- Sig-I/O Automatisering b1015d897d Re-add accidentaly removed comment 10 years ago
Mark Janssen -- Sig-I/O Automatisering 73766e0816 Add ip4_hex filter to convert ip-address to hex notation 10 years ago
Matt Davis afc82f6beb Merge pull request #14930 from mholiv/enable_dollar_as_first_char_in_folder_and_userName
Modified files to use single quotes rather than double for file path.…
10 years ago
Toshio Kuratomi 3221be4340 Reverse boilerplate order because from __future__ must be the first code in the file 10 years ago
Brian Coca 1c4cfee415 Merge pull request #15046 from bcoca/script_raw
removes python requirement to script
10 years ago
nitzmahone 4241106ad2 fix breakage from new recursive=True arg to chmod 10 years ago
Toshio Kuratomi 80e7fbff75 Add python3 compat boilerplate 10 years ago
Toshio Kuratomi 17e8500202 Don't process the same host multiple times
Fixes #14259
10 years ago
Brian Coca 1ebc2fda71 removes python requirement to script
mistakenly added when checksum was made to use stat module
fixed assertion in test
10 years ago
Brian Coca 6768f34b31 Merge pull request #15062 from gechr/gc-subset-superset-filters
Add `issubset` and `issuperset` tests
10 years ago
Thomas Steinbach 870160b8ed fixed some breaks after merging ansible/devel 10 years ago
Thomas Steinbach cd2c140f69 forwarded docker_extra_args to latest upstream/origin/devel 10 years ago
Toshio Kuratomi 228ad3ca39 Should be errors=strict since we don't want to end up matching hosts like '???' 10 years ago
Toshio Kuratomi 13b295f1ee Fix using non-ascii for inventory hostname patterns with the CLI. 10 years ago
James Cammarata 2c20579a06 Add options to make includes 'static'
* Can be configured in the ansible.cfg for tasks/handlers individually
* If an included filename contains no vars or loops, it will be expanded
  in-place as if it were marked as static
10 years ago
Toshio Kuratomi f323eb858e nv_por is needed later in the file
Fixes #14654
10 years ago
Toshio Kuratomi c4a5cf174b Merge pull request #15009 from bcoca/py3_compat_fixes
Py3 compat fixes
10 years ago
James Cammarata f427955640 Make default var lookup for tasks follow the dep chain
Related to #14296 (@jjshoe's follow-up example on that issue)
10 years ago
Konstantin Suvorov 1c922135a0 show error context in args splitter exception 10 years ago
Brian Coca 5b11494437 python3 compatiblity
remove use of basestring
deal with configparser
10 years ago
Toshio Kuratomi 52e9209491 Don't create world-readable module and tempfiles without explicit user permission 10 years ago
Brian Coca fdb56e4bad avoid bad path entries 10 years ago
Toshio Kuratomi 728bb7d85e Update submodule refs 10 years ago
Toshio Kuratomi 917da92e2b Get rid of extra trailing space in log messages 10 years ago
Matthew Gamble 7b06ec79e3 Add documentation for squash_actions configuration setting 10 years ago
Matthew Gamble 197e590d7c Small comment improvement in AnsibleModule class 10 years ago
Abhijit Menon-Sen 1b242ffb89 Merge pull request #15111 from xiaket/devel
complete the docstring. Fixed #14794
10 years ago
夏恺(Xia Kai) f9a9e5e1b9 complete the docstring. Fixed #14794
Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
10 years ago
Peter Sprygada 5bb876b0e2 fixes issue with getting value with . (dot) in key in netcfg
This commit addresses a problem when attempting to retrieve a value from
the result that includes a dict key using . (dot).
10 years ago
Brian Coca b4b44b2708 Merge pull request #15086 from robinro/patch-2
remove double read of "path" (/etc/SuSE-release) in facts.py
10 years ago
Brian Coca 43f70d66a5 Merge pull request #15088 from robinro/patch-3
break after parsing SuSE-release in facts.py
10 years ago
Joel 23a74eb125 Sort plugins by basename to support ordering callbacks 10 years ago
Toshio Kuratomi 06d77996da Update submodule refs 10 years ago
Robin Roth 2c28dcc5cb break after parsing SuSE-release in facts.py
All sections that lead to succesful parsing of the version break afterwards, for SuSE-release this break was missing, potentiall causing #14837
10 years ago
Robin Roth fea5500605 remove double read of "path"
path is already read in line 444, don't reread the file here, but use the existing content
10 years ago
Toshio Kuratomi 3511abb9d9 Merge pull request #15055 from ansible/ansible_sudo_pass-should-override-cli
Fix ansible_sudo_pass inventory variable so that it overrides setting of sudo password from the command line
10 years ago
Toshio Kuratomi f39a1da360 Merge pull request #15074 from ansible/pluginloader-cleanups
Cleanup some minor issues in PuginLoader:
10 years ago
George Christou 02ad029840 Add `issubset` and `issuperset` tests 10 years ago
Toshio Kuratomi ed9e164b80 Fix ansible_sudo_pass inventory variable so that it overrides setting of sudo password from the command line 10 years ago
Toshio Kuratomi 7ce130212f Cleanup some minor issues in PluginLoader:
* class_only was a keyword arg of get() and all() that was mistakenly
  passed on to Plugins.  Be sure to strip it from the keyword args
  before instantiating Plugins.  (Reworked API probably should either
  not instantiate Plugins or take the args for the Plugin as a separate
  list and a dict.)
* Checking required base_classes was only done in get() and only if
  class_only was False (ie: that Plugin was instantiated).  This meant
  that different plugins could be found depending on whether the call
  was to .get() or to all() and whether it was for classes or instances.
  Fixed so that required base_classes are always checked.
10 years ago
Brian Coca 3ae9a272e0 Merge pull request #14977 from towolf/hide_ok_items_in_actionable
For `actionable` cb plugin also hide ok for itemized results
10 years ago
James Cammarata ae21d98955 Properly use check_raw when using parse_kv in cli/ code
Fixes ansible-modules-core#3070
10 years ago
Toshio Kuratomi 407f8f934e Merge pull request #14976 from xiaket/devel
use __mro__ for plugin loading when we search for its base class.
10 years ago
Tobias Wolf 4938b98e4e For `actionable` cb plugin also hide ok for itemized results
The purpose of the `actionable` callback plugin is to hide uninteresting
results.

Also hide the ok results when the task was itemized.
10 years ago
夏恺(Xia Kai) 38092dcc27 import the base class and check whether this obj has the required base class.
Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
10 years ago
Toshio Kuratomi 9053d0468e Merge pull request #15006 from ansible/local-pipelining
Add changes necessary for enabling pipelining for local connections
10 years ago
Will Thames f438c074af Remove need for unnecessary boto.ec2 import
Modules shouldn't need to import boto.ec2.
The check was to test if profile_name was supported by boto.
Two years after the introduction of the support, we will now
assume that if people are passing `profile`, they are using
a version of boto that supports it (this requirement is
already documented in the aws documentation fragment)

Also remove even older version check for `validate_certs`

Fixes #1901
10 years ago
James Cammarata 9d2fe2fb2c Fixing role param precedence issues
* Make role param resolution follow the role dependency chain, rather
  than using all roles within the play
* Also move params to be merged in after role vars in general, to match
  our variable precedence rules
* Changes to the way var lookup is done in role helper methods for
  get_vars(), get_inherited_vars(), and get_role_params() to make the
  above possible without trampling on previously merged vars

Fixes #14472
Fixes #14475
10 years ago
Toshio Kuratomi 4a00999875 Update to latest git submodules 10 years ago
Toshio Kuratomi b80c9b5032 Merge pull request #15049 from mattclay/paramiko-unicode
Add missing to_bytes for cmd.
10 years ago
Matt Clay 24c4384f0e Add missing to_bytes for cmd. 10 years ago
James Cammarata e4a5bcae3c Merge pull request #14679 from dagwieers/merge_hash_v2
Avoid merging a dict and a AnsibleUnicode
10 years ago
Brian Coca 7a5ff16aee Merge pull request #15042 from RNanney/RNanney-validate_certs
Update nxos.py
10 years ago
Toshio Kuratomi f5654dced9 Merge pull request #15043 from mattclay/docker-user
Use docker exec -u only when supported.
10 years ago
Matt Clay ea1a6c56b9 Use docker exec -u when needed and if supported.
If remote_user is given and cannot be set in docker, a warning will
be displayed unless the default container user matches remote_user.
10 years ago
RNanney 8bceff5136 Update nxos.py 10 years ago
James Cammarata 13f3cbaf3b Renaming per-item and retry callbacks 10 years ago
Toshio Kuratomi 60c943997b More doc updates regarding ansible_shell_executable 10 years ago
Toshio Kuratomi 8bdf0d4746 And another doc fix 10 years ago
Toshio Kuratomi 08394df8d0 Update submodule links for docs fixes 10 years ago
Abhijit Menon-Sen efdac490ff Merge pull request #14924 from mvgrimes/patch-1
Dynamically add ssl key to the mysql config hash iff needed
10 years ago
Brian Coca d43fc631dd mount facts now include network mounts (nfs) 10 years ago
Brian Coca b809d23863 fixed typo 10 years ago
Abhijit Menon-Sen e5460d6a6e Merge pull request #15002 from camradal/devel
add find_host_portgroup_by_name function to vmware utils
10 years ago
Toshio Kuratomi e25caebe7a Cleanups to docs and rename of inv var 10 years ago
Toshio Kuratomi 8fc1c26c37 Merge pull request #14936 from bcoca/ansible_executable
add ansible_executable inventory var
10 years ago
Toshio Kuratomi 2ba4428424 Catch ValueError as well because of El Capitan provoking a bug in python2's subprocess
Fixes #14895
10 years ago
Abhijit Menon-Sen a61a3e28da Merge pull request #9776 from MiLk/fixes/git-repo-info-branch
ansible.utils._git_repo_info() now supports branch names with slashes
10 years ago
Brian Coca db61e9be0c add ansible_executable inventory var
also handle the overrides appropriately
also new executable to set shell type
10 years ago
Thomas Steinbach 14dfad730e use just 'remote_user' as user for the docker connection 10 years ago
Thomas Steinbach 4ac49ed4a8 use remote_user or become_user in docker connection 10 years ago
Brian Coca 5d9b552317 Merge pull request #15024 from bcoca/delegation_vars_fix
ensure we use delegated vars on delegation
10 years ago
Toshio Kuratomi ab693579a9 Clarify the document about the order of matryoshka shells
(nesting shells)
10 years ago
James Cammarata 1ee6d489ab Make sure tuples returned by _get_item() are handled correctly in formatting
Fixes #14800
10 years ago
Brian Coca 292be944c6 ensure we use delegated vars on delegation
this prevents falling back to connection vars from the inventory_hostname
when matching connection var is not in delegated host.
10 years ago
René Moser 0a457230ab Merge pull request #14982 from Linuturk/GalaxyInitWhitespaceFix
Remove trailing whitespace from the galaxy init Jinja2 template. Defa…
10 years ago
Toshio Kuratomi 2dd6bae9e1 Merge pull request #15003 from ansible/jail-enable-pipelining
Enable pipelining for jail connection plugin
10 years ago
Brian Coca bc60f52db5 avoid exceptiosn when not being called by CLI 10 years ago
Toshio Kuratomi e80cd8bcaf Merge pull request #14908 from mattclay/mysql-connect-timeout
Document mysql connect_timeout and update tests.
10 years ago
James Cammarata 0e68c6d6fe Cleaning up use of literal_eval in basic.py AnsibleModule.safe_eval 10 years ago
Matt Clay 6a1f97ad42 Add docs for mysql* modules connect_timeout. 10 years ago
Brian Coca 5ae9955aad Merge pull request #15011 from dagwieers/fix-unreachable-color
Fix the color when unreachable in default cb plugin
10 years ago
Brian Coca 0cb804f0c2 fix lsb fact gathering
was erroring out when rc !=0 also fixed redundant paths
fixes #14965
10 years ago
Brian Coca d7d47bcd75 Merge pull request #14989 from nifoc/patch-fetch_url
Check return value of get_distribution()
10 years ago
Dag Wieers ed457ad53b Fix the color when unreachable in default cb plugin
The dedicated color for unreachable errors was not being used in the default cb plugin.
This corrects the color.
10 years ago
qqo a7f89cac63 fix TypeError: coercing to Unicode: need string or buffer, AnsibleParserError found 10 years ago
qqo 85e843baee Revert "fix TypeError: coercing to Unicode: need string or buffer, AnsibleParserError found"
This reverts commit d1e0719e4c.
10 years ago
qqo d1e0719e4c fix TypeError: coercing to Unicode: need string or buffer, AnsibleParserError found 10 years ago
Brian Coca 61f05c2e8d strip keys recursively 10 years ago
Toshio Kuratomi 7346e3098a Update extras submodule ref 10 years ago
Toshio Kuratomi 1346c209b0 Add changes necessary for enabling pipelining for local connections 10 years ago
Toshio Kuratomi a8acd7f93e Enable pipelining for jail connection plugin 10 years ago
Alexey Kalinin 9763e76f6f add find_host_portgroup_by_name function to vmware utils 10 years ago
Toshio Kuratomi de306eb5da Small cleanup to use class attribute directly instead of property for transport names 10 years ago
Toshio Kuratomi fee73100c4 Move BUFSIZE to __init__ since it's common to many connection plugins 10 years ago
Toshio Kuratomi 0ca4be6fb5 Update submodule refs for docs fixes 10 years ago
Toshio Kuratomi ec419446b7 Update submodule refs 10 years ago
Daniel Kempkens 696b68f07a Check return value of get_distribution()
On none-Linux systems `get_distribution()` returns `None`, which fails in `fetch_url`, because the return value of `get_distribution()` is not checked before calling `lower()` on the result.
10 years ago
Toshio Kuratomi fe278202f2 Fix saving of tracebacks on module failure 10 years ago
Justin Phelps d604c8c3a6 Remove trailing whitespace from the galaxy init Jinja2 template. Default a description. 10 years ago
Toshio Kuratomi 86080fbaa9 Update submodule refs 10 years ago
Toshio Kuratomi 66328e5200 Merge pull request #14967 from ansible/facts-subset-and-cleanup
Facts subset and cleanup
10 years ago
夏恺(Xia Kai) cd6d865e27 use __mro__ for plugin loading when we search for its base class.
This would relax the constraint a little bit, allowing subclassing existing plugins.

Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
10 years ago
Brian Coca 09699d0cd0 meta: clear_facts
draft implementation
10 years ago
Brian Coca f3b9449e07 don't raise exceptoins on bad hosts files
fixes #14969
10 years ago
Peter Sprygada ace0c9c5c2 fixes ansible-modules-code#3250
Sets the default value for transport to 'cli'
10 years ago
Peter Sprygada c039ac524d updates to nxos shared module
This commit address a number of minor updates the nxos shared module

* connect() is now lazy loaded
* parse inner output messages when errored
* code syntax cleanup
10 years ago
Toshio Kuratomi 512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 10 years ago
Toshio Kuratomi 5a1e35224b Make changes proposed during review of restrict fact gathering feature:
* Make documentation examples into code blocks
* Make code to call the subsets more general.
* Made min subset always execute (cannot disable it).
* Use a passed in modules parameter rather than global modules.  This is needed for ziploader
* Remove unneeded __init__()
* Remove uneeded multiple inheritance from a base class
* gather_facts is now a list type
10 years ago
Toshio Kuratomi d665911bab Allow FieldAttribute lists and sets to be set from a comma separated string 10 years ago
Yannig Perré 88772b6003 Add a way to restrict gathered facts in Ansible:
- Using gather_subset options
- By ignoring ohai/chef or facter/puppet facts
10 years ago
Brian Coca 2984ffdfac now item callback honors display_skipped_hosts
fixes #14956
10 years ago
Peter Sprygada d211b4c962 feature to implement localized cli prompts to eos
This change localizes the cli prompt regexps to the eos shared module
instead of the common prompts implemented in shell
10 years ago
Peter Sprygada 5338d6af28 feature in ios to tell shell not to kickstart
This commit is necessary to tell shell not to kickstart the cli session as
it causes problems in IOS to recognize the prompt.
10 years ago
Peter Sprygada 249caac0d3 feature to allow prompts to be configured at instatiation
This commit adds a new feature to allow implementations of shell to
specify the command prompt regexp to be used.  It allows adds a new
kwarg at instantiation to kick the remote device with a carriage return.
By default the kickstart flag is true but can be disabled by passing
kickstart=False.
10 years ago
Peter Sprygada c55d1c55af Merge pull request #14906 from devananda/fix-shell-for-junos
Send empty command before recv
10 years ago
Brian Coca 00b8b49112 Merge pull request #14873 from bcoca/paging_aws
paging for amazon modules
10 years ago
Brian Coca fdcd80bf87 Merge pull request #13339 from bcoca/retry_rate
draft of common retry and rate limiting decorators for api based modules
10 years ago
Peter Sprygada e3671a8a83 bugfix for eos shared module and new optimization
This commit address to issues in the eos shard module.  The first one
is a bug fix for returning the running config when the transport is eapi.
The shared module will now return config text instead of an object.  The
second is a optimization that delays when the eos module connects to the
remote devices.  This provies a performance enhancement when using
ssh since the module doesn't default to connecting immediately
10 years ago
Toshio Kuratomi 180e70b67a Merge pull request #14937 from mattclay/unicode-dir
Fix missing to_bytes on directory path.
10 years ago
Matt Clay 1e1852c34d Add missing to_bytes on directory path. 10 years ago
root 2aba1c211d Modified files to use single quotes rather than double for file path. Powershell does not process $ variables in strings that are single quoted. Powershell DOES process $ variables that are in double quoted strings.
Using single quotes enables ansible to  handle file paths that contain folders that start with $. (i.e. C:/Users/$admin/...)
10 years ago
mvgrimes e613737b80 Dynamically add ssl key to the mysql config hash iff needed
Just including the `ssl` key in the config for MySQLdb.connect, causes it to check for the existence of SSL support. This patch only adds the key if one of the ssl configuration options is included.
10 years ago
David Shrewsbury 336d19d3b0 Set type for OpenStack 'verify' param
The 'verify' param is a bool, so we don't want it to be an assumed
str.
10 years ago
Peter Sprygada a59fe25bb1 bugfix for shared module shell.py
removes get_cli_connection function which was left over from a refactor
but was no longer in use
10 years ago
Matt Clay ba1bcdfc17 Add noseclabel support to libvirt_lxc plugin. 10 years ago
James Cammarata 16f107a491 Add mysql connection_timeout param to module_utils/mysql.py 10 years ago
Devananda van der Veen 08f270ad71
Send empty command before recv
On some switches, starting an SSH connection and immediately calling
recv() will result in a connection timeout. The switch requires some
input on the channel before it provides any prompt.

As such, this patch sends an empty command immediately upon connection,
triggering the switch to send a prompt which the shell can then
interpret.

Signed-off-by: Devananda van der Veen <devananda.vdv@gmail.com>
10 years ago
James Cammarata 52efd7438c Fixing template/assemble action plugins related to tmp dir use/cleanup 10 years ago
Matt Clay f878a5d2e0 Fix unicode handling in connection plugins. 10 years ago
James Cammarata 09e5f0578a Don't always insert failed in the results (again) 10 years ago
Brian Coca 5cbdaff9fd avoid creating extra tmp dirs we don't delete
fixes #14867
10 years ago
James Cammarata ccf646665b Revert "Removing explicit setting of failed/failed_when"
This reverts commit 4e528e9535.
10 years ago
James Cammarata 4e528e9535 Removing explicit setting of failed/failed_when 10 years ago
Brian Coca df1268ed69 Merge pull request #14892 from dagwieers/patch-14
Another misspelling
10 years ago
Brian Coca 05983fdaa5 Merge pull request #14891 from dagwieers/patch-13
Fix misspelling and some cosmetic change
10 years ago
Brian Coca 1c1f5e9f99 Merge pull request #14889 from nitzmahone/fix_failed_when_blind_override
Fix blind override in failed_when
10 years ago
Peter Sprygada ca2871de20 Merge pull request #14697 from privateip/shared_module_openswitch
bugfixes for openswitch shared module
10 years ago
Peter Sprygada ae5951b97f Merge pull request #14698 from privateip/plugin_action_ops_template
updates the ops_template plugin action backup key
10 years ago
Dag Wieers a5e11b1325 Another misspelling
...while reading the source
10 years ago
Dag Wieers d7d04ad2cd Fix misspelling and some cosmetic change 10 years ago
nitzmahone dbff3a6bbc Fix blind override in failed_when
caused all task failures to be success
10 years ago
Brian Coca 18e9bc9753 common retry and rate limiting decorators for apis
allows modules to wrap their request functions in common retry and rate limiting
decorators or functions
10 years ago
Brian Coca 9318727021 corrected changed_when handling 10 years ago
James Cammarata 7f233c4c5e Updating submodule refs 10 years ago
Toshio Kuratomi 331f62f769 Update submodule refs 10 years ago
Toshio Kuratomi 0628951ac6 Handle shlex incompatibility between python2.6 and python3 10 years ago
Toshio Kuratomi c0e2dd1693 Fix ssh connection plugin to work with python3 10 years ago
James Cammarata eb463fab00 Also changing ansible-shell -> ansible-console in cli code comments 10 years ago
James Cammarata 9d61a6cba8 Fixing PlayIterator bugs
* Unit tests exposed a problem where nested blocks did not correctly
  hit rescue/always portions of parent blocks
* Cleaned up logic in PlayIterator
* Unfortunately fixing the above exposed a potential problem in the
  block integration tests, where a failure in an "always" section may
  always lead to a failed state and the termination of execution
  beyond that point, so certain parts of the block integration test
  were disabled.
10 years ago
Brian Coca d7bd5fc075 Merge pull request #14824 from bcoca/ansible_shell
draft 1st release of ansible shell
10 years ago
Brian Coca 7067bb32b8 make all conditionals lists
this brings them to equivalence with when:
fixes #13905
10 years ago
Matt Clay 33f93f9241 Fix misplaced paren. 10 years ago
Brian Coca 33b550fc76 paging for amazon modules
this adds a decorator for use in amazon modules so retrieval functions
can page using the 'marker' that most boto functions return
10 years ago
James Cammarata aee2eb6287 Merge pull request #14864 from dagwieers/patch-12
Only show diff when the task actually induced a change
10 years ago
James Cammarata 1a5ee115f0 Fixing minor logic error in error detection/handling in ssh connection plugin
If max retries were reached, no AnsibleConnectionFailure was raised, which
means potentially in some cases an unreachable error might not be returned
10 years ago
Dag Wieers f5b6f52940 Only show diff when the task actually induced a change
This implements solution #1 in the proposal #14860.

It only shows the diff if the task induced a change, which means that if the changed_when control overrides the task, not diff will be produced.
See #14860 for a rationale and the use-case.
10 years ago
Dag Wieers 175351f200 Little improvement in flow
Don't get the hostname if it's not needed.
10 years ago
Brian Coca 49bb4803b5 clarify --step prompt
now shows full words and indicates default
fixes #7433
10 years ago
Brian Coca 3d6ec52e83 Merge pull request #14830 from bcoca/assemble_fix
fix assemble to not pass extra args to copy/file
10 years ago
Brian Coca eb4cb46c84 Merge pull request #14859 from sivel/issue/14858
Strip proc_1 before testing it. Fixes #14858
10 years ago
Matt Martz 2f90a4f4e2 Strip proc_1 before testing it. Fixes #14858 10 years ago
Brian Coca e24e619cf1 added stderr from vault script to error 10 years ago
Brian Coca 75ae62a978 Merge pull request #12674 from sudarkoff/fail_if_executable_password_file_returns_nonzero
(TRIVIAL) Fail if the vault password script returns non-zero.
10 years ago
Brian Coca e74ab3ecdd draft 1st release of ansible-console
porting @dominis 's ansible-shell tool from 1.9 and integrating it into ansible
added verbosity control
made more resilitent to several errors
added highlight color, to configurable colors
more resilient on exception and interruptions
prompt coloring, goes red and changes to # when using become = true and root
become setting is now explicit and not a toggle
10 years ago
Matt Martz 53bb889ef6 update submodule refs 10 years ago
Matt Martz 098333b2ec Fix redirects for get_url
* fetch_url shouldn't both accept follow_redirects and support follow_redircts via module.params
* Default follow_redirects for open_url should be 'urllib2'
* Add redirect test for get_url
10 years ago
Brian Coca 325fccfa78 added v for least verbose display function 10 years ago
James Cammarata 299d93f6e9 Updating unit tests for PlayIterator
This knowingly introduces a broken test, planning to fix that later.
10 years ago
Brian Coca 66ea464ebd Merge pull request #14793 from xiaket/devel
remove main_q for simplicity.
10 years ago
Brian Coca 25e9b5788b add per item diff handling
fixes #14843
10 years ago
John Barker 8b4ebd8e4a Make it easier to read error message 10 years ago
Jonathan Sokolowski 5ec7adc64d Lookup netrc for credentials in open_url 10 years ago
Brian Coca 0b2f631197 Merge pull request #14504 from bcoca/template_comments
template also when only comments present
10 years ago
Brian Coca 7d8b84dae6 fix assemble to not pass extra args to copy/file
also small refactor to dedupe code
fixes https://github.com/ansible/ansible-modules-core/issues/3154
10 years ago
Brian Coca 5aab158987 removed unused imports 10 years ago
Peter Sprygada c0f1e1801b adds multiline flag to regex test for search and match
This commit adds the multiline flag to the regexp search and match test
plugin.  It defaults to re.M = False for backwards compatibility.  To use
the multiline feature add multiline=True to the test filter

{{ config | search('^hostname', multiline=True) }}
10 years ago
Brian Coca 66a9a1feff Merge pull request #14823 from jjahns/devel
add find_vm_by_name function to vmware utils
10 years ago
Brian Coca 75b9c7db14 moved hardcoded settings from doccli to constants 10 years ago
Jay Jahns 3a1944edc1 add find_vm_by_name function to vmware utils 10 years ago
Kishin Yagami 299c18d700 Support strategy_plugins setting in a configuration file 10 years ago
Brian Coca 62ac5c047e clarified message 10 years ago
Brian Coca 8867d73420 reject extraneous data passed to mode
strictly permissions are allowed, file type info should not be passed in
alternate fixes #14771
10 years ago
Toshio Kuratomi bd618c3490 Merge pull request #14797 from mattclay/unicode-fixes
Use to_bytes on filenames in filesystem calls.
10 years ago
Brian Coca d6546a7513 make sure group_names is always sorted
this makes it consistent with previous ansilbe versions and other
paths that create the group_names variable
10 years ago
Matt Clay 5b79ed77e7 Use to_bytes on filenames in filesystem calls. 10 years ago
Brian Coca 27a33a6f18 dont erase previous nameservers in fact gathering
fixes #14806
10 years ago
夏恺(Xia Kai) b33074b703 remove main_q for simplicity.
main_q is not used anywhere in the codebase.

It is created in TaskQueueManager._initialize_processes, bundled with rslt_q
into TaskQueueManger._workers, later unwrapped in StrategyBase but not used.
This queue is closed in TaskQueueManger._cleanup_processes.

Historically, it is passed as a init parameter into WorkerProcess,
introduced in 62d7956, but this behavior is changed in 120b9a7.

Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
10 years ago
Toshio Kuratomi 8f1303c81a Remember to use errors=strict since this is looking up a filename on the filesystem (ie it has to match exactly) 10 years ago
Toshio Kuratomi 253376b3b7 Make the source path into a byte string before passing to os.path 10 years ago
Brian Coca e762095497 better task parsing errors
fixes #14790
10 years ago
Brian Coca f565508d7f Merge pull request #14764 from bcoca/max_diff_config
made max diff size configurable
10 years ago
Brian Coca e432973310 Merge pull request #14757 from bcoca/register_no_template
don't template register
10 years ago
Brian Coca 13282e29a8 Merge pull request #14500 from yfried-redhat/fix_os_auth
Fix openstack auth type
10 years ago
Brian Coca b901b15d3b Merge pull request #14537 from Yannig/devel_better_error_handling
Improve message content to get more hint about the raised error.
10 years ago
Brian Coca cc3cb0f65e fix issues with older yaml lib versions
also added missing json import and removed unused ones
10 years ago
Brian Coca 6cad356b3b updated docs to show new output 10 years ago
Brian Coca b2a6784a9f changed the output to keep backwards compat
still shows path when verbose
10 years ago
Brian Coca fd8593d613 Merge pull request #14661 from jjshoe/fix-up-profile-tasks
Update the profile task callback plugin to include a fix for duplicate named tasks. Added additional features to adjust the number of tasks output and the sort order.
10 years ago
Brian Coca c022a43a47 fixed str to to_str 10 years ago
Brian Coca 347aa7b032 Merge pull request #14774 from lamby/ignore-epipe-when-flushing-stdout-stderr
Ignore EPIPE when flushing stdout stderr
10 years ago
Chris Lamb eb1141ee79 Ignore EPIPE to avoid tracebacks when piping output to other commands
For example:

  $ ansible web --list-hosts | head -n1
  hosts (7):
  ERROR! Unexpected Exception: [Errno 32] Broken pipe
  Traceback (most recent call last):
    File "/home/lamby/git/private/lamby-ansible2/.venv/bin/ansible", line 114, in <module>
      display.display("to see the full traceback, use -vvv")
    File "/home/lamby/git/private/lamby-ansible2/.venv/local/lib/python2.7/site-packages/ansible/utils/display.py", line 133, in display
      sys.stdout.flush()
  IOError: [Errno 32] Broken pipe

Such a pipe target will close up shop early when its seen enough input,
causing ansible to print an ugly traceback.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
10 years ago
Chris Lamb 951c8a5d27 Alias fileobj. 10 years ago
Brian Coca 4cfd042839 more complete and informative errors
mostly templating issues now all return data templated and actual error
fixes #14781
10 years ago
Brian Coca 0031a72e0d tweak deprecation warnings display 10 years ago
Brian Coca ea5e089056 restore initial json parsing attempt to loader
fixes issues with extra vars json strings not being parsed correctly by the yaml parser
10 years ago
Toshio Kuratomi 4657be4eab Transform pathnames to bytes before passing on to os.path functions 10 years ago
Toshio Kuratomi 468eea82bd Merge pull request #14765 from sivel/redirect-ssl-validation
Support SSL validation with redirect control for python versions without ssl context
10 years ago
Matt Davis 0ab29f573a Merge pull request #14755 from bcoca/pause_nohup_fix
avoid issues when stdin is a closed file
10 years ago
Matt Martz 6ff0b079b4 Support SSL validation with redirect control for python versions without ssl context 10 years ago
Brian Coca c24249c57d made max diff size configurable 10 years ago
Toshio Kuratomi 1dbbd2a80c Remove debugging and fix the place where bytes are being handed to StringIO 10 years ago
Brian Coca ca0797fc4e avoid issues when stdin is a closed file
this seems to happen when nohup is involved, so the check tty
does not get a chance to fail, it just works with pipes

fixes http://github.com/ansible/ansible-modules-core/issues/3166
10 years ago
Toshio Kuratomi 093b3422ec more information 10 years ago
Brian Coca 7ba790bbaf don't tempalte register 10 years ago
Toshio Kuratomi 5aef65edcd Testing whether this fixes jenkins 10 years ago
James Cammarata 3247390123 Conditionally import StringIO in template so we only use io.StringIO on py3 10 years ago
James Cammarata 2c7a33f71d Fixing bug in setup related to StringIO fixes 10 years ago
James Cammarata 9acb5aa176 Changing location of reduce import to not use six.moves 10 years ago
James Cammarata b559d0e6ee Adding py3 stub for reduce from six.moves 10 years ago
Brian Coca 71402abf21 only do squash when 'squashable field' present 10 years ago
James Cammarata e011f52557 Expanding unit tests for module_utils/basic.py 10 years ago
Brian Coca 7af5787030 Merge pull request #14717 from xiaket/devel
Fix __repr__ for meta tasks
10 years ago
Brian Coca dd003a42b0 Merge pull request #14273 from resmo/for-ansible-2.1
[2.1] cloudstack: new generic code
10 years ago
Rene Moser 6c641fb6a8 cloudstack: add CS_HYPERVISORS constant 10 years ago
夏恺(Xia Kai) d033c40e80 Make task repr really work for meta tasks.
Signed-off-by: 夏恺(Xia Kai) <xiaket@xiaket@gmail.com>
10 years ago
Brian Coca 0d1138e0a0 Merge pull request #14712 from chouseknecht/galaxy2_paging
Fix bug 14715: Galaxy CLI paging error
10 years ago
chouseknecht 42b2077c93 Fix bug 14715: Galaxy CLI paging error 10 years ago
Peter Sprygada c2ce509aaf bugfixes for openswitch shared module
This commit fixes two bugs in the openswitch shared module.  The first
bug was a wrong argument type for the use_ssl argument.  It was set
to int and should be bool.  The second changes the default ports for http
(was 80, now 8091) and https (was 443, now 18091).  This change aligns
the default port values with the OS
10 years ago
nitzmahone 915037c628 update submodule refs 10 years ago
nitzmahone ac54f66741 don't lock file when calculating checksum 10 years ago
Brian Coca badc922c73 added warning for when host file doesn't exist
fixes #14692
10 years ago
Brian Coca 82d6a83cca Merge pull request #14633 from Etherdaemon/fix_boto3_params
Fixup boto3_conn aws_session_token and verify
10 years ago
Brian Coca 157ebcfe0b Merge pull request #14709 from bcoca/squash_fix_atp
added package to special 'squashable' fields
10 years ago
Brian Coca 67d5b77898 added package to special 'squashable' fields
apt has it as alias, this should fix https://github.com/ansible/ansible-modules-core/issues/3145
10 years ago
James Cammarata 7c049c3200 Fixing up jsonify and adding unit tests 10 years ago
Matt Martz d0a717694f Fix variable name in paramiko connection plugin 10 years ago
Matt Martz e27eb73cba sys.subversion unavailable in py24. Fixes #14704 10 years ago
Peter Sprygada f67bf3f775 updates the ops_template plugin action backup key
This commit changes the key the ops_template will search for in order
to backup the current configuration to local disk on the Ansible control
host.  This change was made to make ops_template consistent with the
other network template modules.
10 years ago
Toshio Kuratomi e01b6ad6b4 We are actually taking the repr of a string so we need separate to_bytes and repr calls 10 years ago
Toshio Kuratomi b70bf3b056 Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3 10 years ago
Toshio Kuratomi c29f51804b Fix mixing of bytes and str in module replacer (caused traceback on python3) 10 years ago
Brian Coca 512d3dd621 with_ loops always should want a list 10 years ago
Brian Coca 528f073bfa update core subref 10 years ago
Toshio Kuratomi 1f2595306a normalize path components to unicode before combining or operating on them
Note that this will break if we deal with non-utf8 paths.  Fixing this
way because converting everythig to byte strings instead is a very
invasive task so it should be done as a specific feature to provide
support for non-utf8 paths at some point in the future (if needed).
10 years ago
Toshio Kuratomi ef8bec18bf Use a unicode format string so that we don't convert to byte strings
Fixes #14349
10 years ago
Dag Wieers 0eca47cf91 Avoid merging a dict and a AnsibleUnicode
This is the same fix we applied to v1.9 in PR #14565, however it does not fix #14678 completely !
The dictionaries are not being merged as tey are on v1.9.
10 years ago
Brian Coca ad5a6e7993 updated submodule refs 10 years ago
James Cammarata 771f1e31a9 Rework the way ad-hoc filters inventory to match how cli/playbook does it 10 years ago
Brian Coca e2d2798a42 hosts can be list or string 10 years ago
Brian Coca 2d56293768 default play name to hosts entry
return to previous behaviour as now the name was left blank
10 years ago
Joel b3aa373932 Update the profile task callback plugin to include a fix for duplicate named tasks. Added additional features to adjust the number of tasks output and the sort order. 10 years ago
James Cammarata cd51ba7965 Use abspath instead of realpath for group/host vars files
The use of realpath means when following symlinks the actual path is
used when loading these files in the VariableManager, which may not
line up with the host or group name specified.

Fixes #14545
10 years ago
Toshio Kuratomi 9c9cce51ab Update submodule refs 10 years ago
Brian Coca 03c33053aa clarified become options do not imply others
fixes #14635
10 years ago
ivovangeel 23349911f1 Fixed bug in find_mount_point function
The find_mount_point function does not resolve the mount point of paths with a soft-link correctly and returns the wrong mount-point.

I have mounted an NFS filesystem on /nfs-mount. This directory contains a directory called "directory". I also created a soft-link to this last directory: /soft-link-to-directory -> /nfs-mount/directory. I created the following task to copy a file into /soft-link-to-directory:

    - name: copy file to nfs-mount
      copy:
        src: "file"
        dest: "/soft-link-to-directory/file"

This throws an exception:

invalid selinux context: [Errno 95] Operation not supported

This is caused by the find_mount_point function to return '/' as the mount point for '/soft-link-to-directory/file'. This should have been /nfs-mount. Because the find_mount_point returns the wrong mount-point, the is_special_selinux_path function does not recognise the file is on an NFS mount and tries to set the default SELinux context (system_u:object_r:default_t:s0), which fails. The context should have been: system_u:object_r:nfs_t:s0

Full Ansible output:

TASK [copy file to nfs-mount] **************************************************
fatal: [hostname]: FAILED! => {"changed": false, "checksum": "f34b60930a5d6d689cf49a4c16bd7f9806be608c", "cur_context": ["system_u", "object_r", "nfs_t", "s0"], "failed": true, "gid": 24170, "group": "foundation", "input_was": ["system_u", "object_r", "default_t", "s0"], "mode": "0644", "msg": "invalid selinux context: [Errno 95] Operation not supported", "new_context": ["system_u", "object_r", "default_t", "s0"], "owner": "root", "path": "/soft-link-to-directory/.ansible_tmpWCT6Z4file", "secontext": "system_u:object_r:nfs_t:s0", "size": 37, "state": "file", "uid": 0}
10 years ago
Etherdaemon 06977d5cb1 Fixup boto3_conn as commit 6ea772931f broke commit 27398131cf 10 years ago
James Cammarata 2db3f290ba Fix logic error when copying files recursively to a directory 10 years ago
Brian Coca 34541b4e5e preserve no_log for async also 10 years ago
James Cammarata d74ea51287 Submodule update 10 years ago
James Cammarata da02aba173 Don't inject PlayContext properties as variables if they're None
Fixes bug introduced in 078ebb0
10 years ago
James Cammarata e02b98274b issue callbacks per item and retry fails
- now workers passes queue to task_executor so it can send back events per item and on retry attempt
- updated result class to pass along events to strategy
- base strategy updated to forward new events to callback
- callbacks now remove 'items' on final result but process them directly when invoked per item
- new callback method to deal with retry attempt messages (also now obeys nolog)
- updated tests to match new signature of task_executor

fixes #14558
fixes #14072
10 years ago
Brian Coca 6eb4633b07 always return a checksum key, even if empty 10 years ago
Peter Sprygada fc57b88356 Merge pull request #14618 from ogenstad/devel
Fixes authentication error bug when user has rsa keys
10 years ago
James Cammarata 6cf6130468 Fixing/cleaning up do/until logic in TaskExecutor
* Fixes bug where the task was not marked as failed if the number of
  retries were exceeded (#14461)
* Reorganizing logic to be a bit cleaner, and so retrie messages are
  shown before sleeping (which makes way more sense)

Fixes #14461
Fixes #14580
10 years ago
Matt Martz cacb74aeeb Merge pull request #14340 from sivel/uri-no-httplib2
Add RedirectHandler class for controlling redirects in urllib2
10 years ago
Matt Martz 27a55d3f33 Merge pull request #14586 from sivel/python-facts
Add python info to facts
10 years ago
Matt Martz 3ac0143cf1 Merge pull request #13654 from sivel/paramiko-proxy-command
Add ProxyCommand support to the paramiko connection plugin
10 years ago
Matt Martz 38b663471d Merge pull request #14311 from sivel/unsafe-yaml-constructor
Add new 'unsafe' YAML constructor
10 years ago
Matt Martz d9a207f24f Add has_sslcontext fact as well 10 years ago
Matt Martz 7158eb489f Add python info to facts 10 years ago
ogenstad 3f95f163ff Avoids authentication failed exception if user has private rsa keys under .ssh 10 years ago
James Cammarata 078ebb0dec Don't re-inject become* variables as it causes problems when templating is involved
Prior to 75b6f61, we strictly limited variables we re-injected. After that
patch however, we re-injected everything which causes problems under certain
circumstances. For now, we'll continue to filter out some properties of
PlayContext for re-injection.

Fixes #14352
10 years ago
Brian Coca e35b1cf154 show task path on vv and above 10 years ago
Brian Coca cea10794fd removed unused color var 10 years ago
Matt Martz f8211f83a0 Merge pull request #14591 from sivel/issue/14541
Allow lookups to return python data structures
10 years ago
Matt Martz 439a385215 Catch TypeError on join, and if caught just return a single item, or a list of many 10 years ago
Brian Coca d9246aacd0 fixed mount sizes for linux 10 years ago
Brian Coca f1d2b9ea9e added size to mount facts on all non linux OSs
fixes #14528
10 years ago
Brian Coca 547afda8d4 Merge pull request #14546 from furlongm/devel
fix ansible_os_family fact on openSUSE Leap
10 years ago
Brian Coca d87fd68287 Merge pull request #14560 from dagwieers/merge_hash_v2
Improve efficiency of merge_hash (Ansible v2.0)
10 years ago
Brian Coca 81368d8119 Merge pull request #14552 from kilburn/lsblk-dedup
Avoid duplicate /bin/lsblk calls in the setup module.
10 years ago
Brian Coca 6febb816d2 Merge pull request #14569 from sivel/json-stdout-callback
Add json stdout callback
10 years ago
George Christou bbc855c218 Make --diff lines of context configurable 10 years ago
Toshio Kuratomi f9526b2ab2 Missed constants.py in the commit for #14557 10 years ago
Matt Martz 7f7536f7ad Add json callback to be used in replace of the default stdout to print a JSON structure to stdout 10 years ago
Brian Coca 844754b8e3 added missing config to constants.py
fixes #14567
10 years ago
Brian Coca 0f73fb0d6f better error messages when failing to decrypt 10 years ago
Matt Davis 4c58066153 Merge pull request #14557 from ansible/display-play-args
Add a configuration setting that allows the user to specify printing …
10 years ago
Dag Wieers 5a57139d91 Improve efficiency of merge_hash
This is related to #14559, but only the part for Ansible v2.0

This commit makes merging empty dicts, or equal dicts more efficient.

I noticed that while debugging merge_hash a lot of merges related to empty dictionaries and sometimes also identical dictionaries.
10 years ago
Brian Coca 5552c04976 allow skipping debug depending on verbosity 10 years ago
Toshio Kuratomi 86b8dc0e79 Add a configuration setting that allows the user to specify printing of task arguments in the header.
Fixes #14554
10 years ago
Brian Coca 1dba6da40f changed filtered to actionable cb plugin 10 years ago
Brian Coca 54942ee8ff Merge pull request #13593 from agaffney/devel
Add 'filtered' stdout callback plugin
10 years ago
Brian Coca d54d9dabe9 added specific info to deprecation message
should now show actual variable that is undefined
fixes #14526
10 years ago
Brian Coca 22082216a4 Merge pull request #13408 from sivel/v2-slack-callback
V2 slack callback plugin
10 years ago
Brian Coca 6012646d8c added playbook and options info to callbacks
will display on certain verbosity levels, both playbook/file info
and non empty options with which it's running.
avoid errors when not using CLI classes
10 years ago
Brian Coca 5300a2eafc Merge pull request #14491 from gechr/gc-simple-colour-diff
Add simple --diff colour support
10 years ago
Brian Coca 413abcf16d Merge pull request #14450 from bcoca/include_vars_merge
Include vars merge
10 years ago
Brian Coca 3e407ed743 Merge pull request #14490 from bcoca/stat_instead_of_checksum
Use stat module instead of checksum code
10 years ago
Brian Coca 3b3709e715 Merge pull request #14488 from bcoca/become_shell_fixes
shell + become fixes
10 years ago
Brian Coca 2b5fffa751 updated to use to_unicode as per feedback 10 years ago
Marc Pujol 6779f91b88 Avoid duplicate /bin/lsblk calls in the setup module.
The setup module calls /bin/lsblk once for each device appearing in the /etc/mtab file. However, the same device appears there mutliple times when the system uses bind-mounts. As a result, /bin/lsblk is being called repeatedly to get the uuid of the same device.

On a system with many mounts, this leads to a TimeoutError in the get_mount_facts function of the setup module as described in #14551.

Fixes #14551
10 years ago
Marcus Furlong 90fb809f62 fix ansible_os_family fact on openSUSE Leap
ansible_os_family on openSUSE Leap has the wrong value:

        "ansible_os_family": "openSUSE Leap",

It should be:

        "ansible_os_family": "Suse",

This change fixes that by adding the relevant key and ensuring that dict
lookups replace ' ' with '_' so the key does not contain a space.
10 years ago
Yannig Perré 588045cc46 Improve message content to get more hint about the raised error. 10 years ago
Peter Sprygada 91f3558c64 minor bugfix that will catch connection errors in eos
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
10 years ago
Peter Sprygada 0d3c0515c0 minor bugfix that will catch connection errors in ios
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
10 years ago
Peter Sprygada b72b14fdf2 minor bugfix that will catch connection errors in iosxr
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
10 years ago
Peter Sprygada 1a072578c3 minor bugfix that will catch connection errors in junos
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
10 years ago
Peter Sprygada 9e31e33850 minor bugfix that will catch connection errors in nxos
This commit fixes a situation where connection errors would be caught
but no useful information display.  The connection error is now caught
and emitted in a call to fail_json
10 years ago
James Cammarata 58a6cf822a Merge pull request #13203 from willthames/galaxy_10620
Allow tree-ish versions for ansible-galaxy
10 years ago
George Christou 56239ee347 Make --diff colours configurable 10 years ago
Brian Coca 6102a4b9b4 template also when only comments present 10 years ago
Brian Coca b9d0662faf use stat module instead of checksum code
- added new function for action plugins this avoids the very fragile checksum code that is shell dependant.
- ported copy module to it
- converted assemble to new stat function
- some corrections and ported temlpate
- updated old checksum function to use new stat one under the hood
- documented revamped remote checksum method
10 years ago
Yair Fried c3b30d251f Fix openstack auth type
Otherwise auth type defaults to 'str' and shade fails
10 years ago
George Christou 8edcca0ef5 Add simple --diff colour support 10 years ago
Brian Coca 6ddea3e915 removed follow from common file docs 10 years ago
Brian Coca 6dc910c13a shell + become fixes
1 less level of shell + quoting
simplified become commands, less quote and shell
10 years ago
Brian Coca bc41f46fec pushed non-atomic to option of last resort
try to copy into place first
10 years ago
Pascal Grange 5d49f4e629 Fix related to #13981
When working around "bad systems that insist on not allowing
updates in an atomic manner", we should not run previous exception
management code that tries to perform atomic move in case of
exception since the dirty non atomic move has already been
performed.
10 years ago
Brian Coca 0bb49090cf make some options not mandatory to pass
this should simplify api calls
10 years ago
James Cammarata 06b072c1f7 Fix bugs related to task_includes and dep chain inheritance
* Fix the way task_include fields were created and copied
* Have blocks get_dep_chain() look at task_include's blocks for proper
  dep chain inheritance
* Fix the way task_include fields are copied to prevent a recursive
  degradation

Fixes #14460
10 years ago
Peter Sprygada 22aaff5af7 adds new action plugin iosxr_template
This adds a new action plugin iosxr_template that allows the
iosxr_template module to pass network device configurations through the
template engine.  It also allows configurations to be backed up.
10 years ago
James Cammarata 275728e0f6 Fixing bugs related to nested blocks inside roles
* Make sure dep chains are checked recursively for nested blocks
* Fixing iterator is_failed() check to make sure we're not in a
  rescue block before returning True
* Use is_failed() to test whether a host should be added to the TQM
  failed_hosts list
* Use is_failed() when compiling the list of hosts left to iterate
  over in both the linear and free strategies

Fixes #14222
10 years ago
Brian Coca 00f600bfc8 Merge pull request #14319 from bcoca/shell_plugin_revamp
moved to base class for shell plugins
10 years ago
Sandra Wills edf776d6a4 Merge pull request #13805 from aioue/patch-1
profile_tasks README.md
10 years ago
Tom Paine edb36b6c4a Update profile_tasks.rst
remove brackets on links
10 years ago
Peter Sprygada 09a6bf5c15 Merge pull request #14432 from chouseknecht/net_common_cleanup_2
Cleanup for networking common bits.
10 years ago
Brian Coca a327420b67 properly combine vars if merge is set
hash_behaviour = merge now also applies to include vars
10 years ago
James Cammarata c485981d1a Merge pull request #14445 from marcpo/maint/display_string_causing_exception
Display the string which is causing an exception to be raised.
10 years ago
Brian Coca af68ae1e87 switched from threading to multiprocessing
functions same, just keeping names from confusing people
10 years ago
James Cammarata df4912957c Merge pull request #14442 from bcoca/remove_signal_handling
removed signal trapping
10 years ago
Toshio Kuratomi 37879ea671 Update submodule refs 10 years ago
Marc Poirier 0792983ec8 Display the string which is causing an exception to be raised.
In the ansible template module, when there is an error while
expanding a templated string, displaying the string causing the
exception is very useful.
10 years ago
Brian Coca effa64383c removed signal trapping 10 years ago
Brian Coca 347b28252a allow skipping tasks due to undefined var
mimic 1.x behaviour but give out big deprecation message, not only
for missing attribute but any undefined error.
10 years ago
Brian Coca cd076dbcfa Merge pull request #14421 from bcoca/terminate
Terminate
10 years ago
Brian Coca a8aa5ff4eb fix cartesian lookup
it seems that this was not working in 1.9 but we swallowed up the error
fixes #14437
10 years ago
Peter Sprygada cf251258a8 initial add of new action plugin junos_template
This adds a new action plugin, junos_template that allows the
the junos_template module to perform the templating function.  It
implements net_template
10 years ago
Peter Sprygada 8f9badb2b4 update shared module junos to handle root logins 10 years ago
Peter Sprygada 9c36c0aa80 minor bug fixes and updates to shell 10 years ago
chouseknecht 5a45ca8bb1 Move Conditional class to netcfg. Added error handling for connect and execute methods.
Fix comments
10 years ago
Toshio Kuratomi 9286143b53 Merge pull request #14374 from robinro/fix-mount-without-permission-bug
add ismount function in module_utils
10 years ago
Toshio Kuratomi 6276585882 Module params should default to str in most cases. 10 years ago
Brian Coca 64c976a6c3 Merge pull request #14416 from bcoca/diff_size_fix
read full file when doing diff
10 years ago
Brian Coca 38120c1075 termination handling
- moved to base cli class to handle centrally and duplicate less code
- now avoids duplication and reiteration of signal handler by reassigning it
- left note on how to do non-graceful in case we add in future
  as I won't remember everything i did here and don't want to 'relearn' it.
10 years ago
Brian Coca 3079a03773 read full file when doing diff
but avoid reading file at all or full file when file is too big for diffing
10 years ago
Toshio Kuratomi 371c7315b0 Merge pull request #14261 from kamsz/devel
Add validate_certs param to skip SSL verification in VMware
10 years ago
Toshio Kuratomi 486304ba1c Clarify error message when module replacer encounters a bad import line for module_utils code 10 years ago
Brian Coca d9dcb2a427 Revert "centralized TERM signal handling"
This reverts commit 5a88478ccc.
is WIP, not ready for use yet
10 years ago
James Cammarata 2adddac94c Catch exceptions during module execution so they don't fail the worker
Fixes #14120
10 years ago
Brian Coca 5a88478ccc centralized TERM signal handling 10 years ago
Brian Coca 1b8dec9c88 avoid termination message when term is internal 10 years ago
Brian Coca b4b24a0889 moved to base class for shell plugins
fish now sets env vars correctly
fish checksum now works
fixed and cleaned up imports
fixed typo
10 years ago
Matthew Stoltenberg c90ab8856d paramiko transport appears to hang if it gets a sudo lecture
* bring paramiko transport closer to ssh transport in how it deals with prompt
10 years ago
Brian Coca f50b381dba Merge pull request #13678 from Etherdaemon/fix_datetime_objects
fix for datetime exception in ecs_tasks
10 years ago
James Cammarata a54f472b08 Submodule pointer update for devel 10 years ago
Matthew Stoltenberg d36394d6a6 strip BECOME-SUCCESS at lower level
Fixes #14395
10 years ago
James Cammarata 162dd2594f Filter become success string from the stdout of script results
Fixes #14390
10 years ago
Kamil Szczygiel 9f1eea43fa support for python < 2.7 10 years ago
Toshio Kuratomi 0f15e59cb2 Also hide the before state of files with --diff and no_log 10 years ago
Toshio Kuratomi 06b2400aae Need to apply to_str to each element of the list so that we don't mix types in the join()
"Third time's the charm"
10 years ago
Brian Coca 81a40ac235 fix winrm erorr formatting 10 years ago
Brian Coca 5014919099 Merge pull request #14347 from bcoca/die_now
fix termination on user/signal interrupt
10 years ago
Jonathan Davila b220051c14 Added more info to the no action detected error
Error fix
10 years ago
Tom Paine 8e3cc3eecd Update profile_tasks.rst 10 years ago
Toshio Kuratomi 1aaf5a399c Merge pull request #14317 from resmo/feature/fail_on_missing_params
module_utils/basic: add generic method for checking for missing param…
10 years ago
Robin Roth f3f3e3c660 fix typo 10 years ago
Robin Roth c0ebb74ad0 add ismount function from python Lib/posixpath.py
needed for https://github.com/ansible/ansible-modules-core/pull/2737
10 years ago
THEBAULT Julien 7c2ff0e66b Ansible-galaxy support the include directive 10 years ago
Brian Coca 46ce9a0016 Merge pull request #13883 from shaba/devel
Add support ssh configs from /etc/openssh.
10 years ago
Tom Paine 5a88cd8ad9 Rename profile_tasks.md to profile_tasks.rst 10 years ago
James Cammarata 1ea21f1f8c Also chmod the args file path when using become for old-style modules
Fixes #14348
10 years ago
Brian Coca 5a1887cc76 correctly handle term signals
- adhoc now terminates gracefully
- avoid race condition on terminations by ignoring errors if
  worker might have been reaped between checking if active and termination call
- ansible-playbook now properly exits on sigint/term
- adhoc and playbook now give exceptions that we should not normally capture
  and rely on top level finally to reap children
- handle systemexit breaks in workers
- added debug to see at which frame we exit
partial fix for #14346
10 years ago
James Cammarata 45755bc0e5 Merge pull request #14353 from felixfontein/devel
Include's tags argument allows only one tag to be specified.
10 years ago
Toshio Kuratomi ccbc7d217b Update submodule refs 10 years ago
Toshio Kuratomi d1c2d16706 Allow setting run_command environment overrides for the life of an AnsibleModule 10 years ago
Michael Ludvig ab64918cb5 Add support for AWS_SESSION_TOKEN environment variable.
According to http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
the "official" environment variables that should be used for
AWS credentials should be:
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN
This patch adds support for the latter (the first two are already
supported).
10 years ago
Felix Fontein 8eea1c7e01 Allowing multiple tags to be specified in include's tags argument. 10 years ago
Brian Coca ad37a91514 really only want to prevent None typep here
false is sometimes needed
10 years ago
Matt Martz 0e57c577f4 Add RedirectHandler class and factory function for controlling redirects in urllib2 10 years ago
Tom Paine 9eca815377 Update profile_tasks.md
Converted to RST.
10 years ago
James Cammarata c79d9a9c62 Handle run_once scenarios in the free strategy
* Raise an error if the action is using BYPASS_HOST_LOOP, to prevent
  unexpected behavior from those actions
* Show a warning regarding tasks marked as run_once, as the free strategy
  does not yet support that behavior
* Minor tweak to linear strategies run_once code to make sure we don't
  raise an error if an action isn't found
10 years ago
James Cammarata 27f9cc05f8 Make sure run_once tasks also set any_errors_fatal so all hosts fail
Currently implemented only in the linear strategy (free strategy simply
ignores run_once/BYPASS_HOST_LOOP actions).

Fixes #14252
10 years ago
Brian Coca d2846dbf30 Merge pull request #14280 from bcoca/always_tag_setup
WIP: tag the setup task with always
10 years ago
Peter Sprygada 18094d8595 Merge pull request #14313 from chouseknecht/net_template_changes
When in context of a role, create backup dir within role_path
10 years ago
Brian Coca 5679b5414c avoid errors from possible None/False args 10 years ago
James Cammarata 75b6f61619 Fix the way we re-add variables from PlayContext to the variable dict
* If the internal value is None, do not add the variable
* Make sure all aliases for a given variable name are set (if they're
  not already set in the dictionary)

Fixes #14310
10 years ago
Rene Moser 11522b22c3 module_utils/basic: add generic method for checking for missing params when argspec can not be used. 10 years ago
Toshio Kuratomi e2a7ba35db Fix --diff to respect no_log task parameter. 10 years ago
chouseknecht 4f61fb6cce Add safety check on _backup key. 10 years ago
chouseknecht 0766219f58 When in context of a role, create backup dir within role_path 10 years ago
Toshio Kuratomi 4b7b3794c9 Update submodule refs 10 years ago
Brian Coca 89c57666c3 fixed py3 compatibility 10 years ago
Brian Coca 70ac47ae61 allow atomic_move to not be atomic ...
just 'cause people build bad systems that insist on not allowing
updates in an atomic manner and force us to do them in a very
unsafe way that has race conditions and can lead to many issues.

if using this option you should really be opening a bug report with
the system that only allows for this type of update.

and now i shower though i doubt i'll feel clean
10 years ago
Peter Sprygada f30d5b1d94 Merge pull request #14012 from privateip/action_nxos_config
initial add of action plugin nxos_template
10 years ago
Peter Sprygada c7180cf1a5 Merge pull request #14011 from privateip/action_ops_config
initial add of action plugin ops_template
10 years ago
Peter Sprygada a48b521e62 Merge pull request #14010 from privateip/action_ios_config
initial add of action plugin ios_template
10 years ago
Peter Sprygada 30d03b93b4 Merge pull request #14009 from privateip/action_eos_config
initial add of action plugin eos_template
10 years ago
Peter Sprygada ed3842aa87 Merge pull request #14008 from privateip/action_net_config
initial add of action plugin net_template
10 years ago
Brian Coca 6149685652 Merge pull request #14293 from dagwieers/fix-eval-json-booleans
Defined JSON booleans in global context for python eval()
10 years ago
Matt Martz 8bc2d3be9c Add new 'unsafe' YAML constructor 10 years ago
Dag Wieers 2e171610e0 Also add 'null' as a possible JSON value 10 years ago
James Cammarata 699a854bf3 Fixing bugs in play iteration and strategies
* Fixed a bug in PlayIterator when ITERATING_ALWAYS, where the block
  was advanced but the incorrect data structure elements were cleared
* Cleaned up the logic of is_failed() in PlayIterator
* Fixed a bug in the free strategy which had not been updated to use
  the base strategy _execute_meta() method
* Stopped strategies from using is_failed() to determine if tasks should
  still be fetched for a host

Fixes #14040
10 years ago
James Cammarata da9ae14ff6 Adding new feature - meta: clear_host_errors
Allows for the clearing of any failed/unreachable hosts
10 years ago
Dag Wieers dc48d27dd2 Defined JSON booleans in global context for python eval()
We define 'false' and 'true' as variables so that python eval() recognizes them as False and True.

This fixes #14291.
10 years ago
Brian Coca 26cd465068 Merge pull request #14281 from dagwieers/fix-first-found-list
Handle when the lookup-plugin is used in jinja-style
10 years ago
Dag Wieers dee5dba82a Handle when the lookup-plugin is used in jinja-style
This fixes #14190.
10 years ago
Brian Coca dc6f0c1290 avoid logging color codes 10 years ago
Tobias Wolf c902f926ca Do not print empty diffs with _display.display() 10 years ago
Tobias Wolf 28169492f9 Do not insert newlines when diff is empty 10 years ago
Tobias Wolf 67594e8ec2 Fix handling of difflist containing multiple before/after pairs
Commit ansible/ansible@c337293 introduced a difflist feature. The return
value was not adequately outdented to append any diff after the first.
10 years ago
Peter Sprygada 4bda4a13e5 initial add of action plugin net_template
The net_config local action handles templating for network configuration
file.  It will also allow network device configurations to be backed up
to the control host

Note: this plugin was originally named net_config but has been refactored to
net_template
10 years ago
Brian Coca 84f8241ff8 tag the setup task with always
fixes #14228
10 years ago
Toshio Kuratomi 42e312d3bd Change $() into backticks. Backticks should work for both POSIX and non-POSIX compatible shells.
Fixes #14176
10 years ago
Toshio Kuratomi 147dba5d97 Merge pull request #14277 from ansible/default-shell-type
Establish sh as the default shell plugin.
10 years ago
Toshio Kuratomi 5b1d8cfd5c Establish sh as the default shell plugin.
This is a fix for one of the problems pointed out in #14176
10 years ago
Brian Coca 8d4bc2003f better fix for ansible-pull inventory handling
now it mirrors what it did in previous versions
and properly uses inventory and limit options
10 years ago
Brian Coca 197bed6fd8 make executable setting connection dependant
winrm shoudl not use executable, rest should?
fixes #14233
10 years ago
James Cammarata b2c0abe998 Don't mark host as having gathered facts when peeking at next task
Fixes #14243
10 years ago
Kamil Szczygiel fa13aa8c00 rename param from skip_ssl to validate_certs 10 years ago
Brian Coca a584ab3420 Merge pull request #11113 from sysadmin75/11104_osx_facts_bridge
Fixes OSX fact gathering for the bridge interface.
10 years ago
Brian Coca f628704a71 added option groups to make --help readable
Also moved -K to become to keep short option in view of removing the
separate sudo/su prompt options
10 years ago
Brian Coca eafc31f3f8 Merge pull request #14197 from bcoca/safer_data_load
load now does not modify the incomming data
10 years ago
Brian Coca dc15eb806e deprecate all bare variable conversions (not debug)
now deprecation message appears with variable name in all spots where this occurs
debug's var= option is excluded as this is only place where bare variables shold actually
be accepted.
10 years ago
Brian Coca 28cf4bc00b fix incorrect environment processing
it was assumed it could only be a dict or string (it starts out as a list)
also a 2nd assumption that bare vars only would appear in one of the dict keys.

removed deprecation warnings from here as they should be signaled in the bare conversion itself.
10 years ago
Brian Coca 6a62ad6c4b hide internal params once used 10 years ago
Brian Coca e0ed88e668 normalize error message on src != dir when local
now action plugin returns same error as module
10 years ago
Matt Martz ddfab5faf1 Use isinstance type checks in bool filter so we can handle unsafe proxy objects. Fixes #14240 10 years ago
Peter Sprygada b2f1c0691d initial add of action plugin ops_template
Adds new local action ops_config for handling openswitch configurations using
either dc or cli based configurations.  Implements the common net_config
local action.

Note this refactors the ops_config plugin to ops_template
10 years ago
Peter Sprygada 4f2a75923e initial add of action plugin ios_template
Adds a new local action ios_config for working with cisco ios configuration
files.  Implements the common net_confing local action

Note this plugin was refactored from ios_config to ios_template
10 years ago
Peter Sprygada 54f7a7b6d2 initial add of action plugin nxos_template
Adds new local action for working with cisco nxos configurations.  Implemements
the net_config local action.

Note this action plugin was refactored from nxos_config to nxos_template
10 years ago
Peter Sprygada be82caefd2 initial add of action plugin eos_template
Adds a new local action for eos_config module to handle templating configs
and backing up running configurations.   Implements the local action
net_config

Note this action was refactored from eos_config to eos_template
10 years ago
Peter Sprygada 1733bf4053 minor update for nxos
This fixes a minor bug in the nxos config module to ensure that both the
cli and nxapi transport return the running config as a string and not
a list object.
10 years ago
Peter Sprygada 633b16d116 add exeception handling for invalid commands over nxapi
This commit will catch invalid commands being send over nxapi and call
fail_json on the module.  The nxos shared module will now return the
failure
10 years ago
Brian Coca 49c15c8137 Merge pull request #14220 from bcoca/ansible_pull_once
harcoding inventory/hosts when pulling from repo
10 years ago
Toshio Kuratomi 9e3932ffca Some attributes of callbacks aren't in v2. Port plugins to the v2 way to do that
Update porting guide with info on callback porting
10 years ago
Toshio Kuratomi fb57818ea3 Explicitly set validate_certs=False as the boto default is True
Fixes #14089
10 years ago
Brian Coca 7964a35918 harcoding inventory/hosts when pulling from repo
return to pre 2.0 behaviour which did not factor inventory into the repo pull
10 years ago
Brian Coca 1aae6499ca fixed code for v1 callback runtime compatiblity
old exception code obsoleted by exception avoidance
errors on callback produce warnings and don't stop play
10 years ago
James Cammarata 5587b08335 Make sure setup tasks inherit properly from their parent play
Fixes #13602
10 years ago
Toshio Kuratomi ceef202024 Update submodule refs 10 years ago
Toshio Kuratomi 315fd15f69 Merge pull request #12909 from photoninger/sles11.4-fix_2nd_try
Fix for SLES 11.4, which has now also an /etc/os-release file.
10 years ago
Brian Coca dd4787701f fix unicode input for template lookup
fixes #14207
10 years ago
James Cammarata 0c237c4531 Merge pull request #14191 from paulcalabro/devel
Added hyphen (-) as a valid character for permissions
10 years ago
Brian Coca db375c22af load now does not modify the incomming data
also removed json loader as yaml loader can do both
10 years ago
Toshio Kuratomi 2c825539ff When setting up the local connection for the rsync we need to set the shell as well.
Fixes #13490
10 years ago
Matt Martz 4547ac7fb1 v2 version of slack callback plugin 10 years ago
Paul Calabro 901d349f45 Adding a hyphen in the perms pattern section, since doing something like
go=- is a quick way to strip all permissions for non-owners.
10 years ago
Toshio Kuratomi 5ecfa8ddfc Merge pull request #14189 from ansible/unicode-pager
Changes to convert to unicode at the borders
10 years ago
Toshio Kuratomi 605fb08487 Merge pull request #14168 from ansible/safer-squashing
Squashing was occuring even though pkgs didn't have a template that would be affected by squash
10 years ago
Toshio Kuratomi fa9822df0f Changes to convert to unicode at the borders
The module docs and vault changes solve issues where tracebacks can
happen.  The galaxy changes are mostly refactoring to be more pythonic
with a small chance that a unicode traceback could have occurred there
without the changes.  The change in __init__.py when we actually call
the pager makes things more robust but could hide places where we had
bytes coming in already so I didn't want to change that without auditing
where the text was coming from.

Fixes #14178
10 years ago
Toshio Kuratomi e7a9031d61 Update submodule refs 10 years ago
Toshio Kuratomi 0e410bbc8a Squashing was occuring even though pkgs didn't have a template that would be affected by squash
This broke other uses of looping (looping for delegate_to in the
reported bug)

Fixes #13980
10 years ago
Brian Coca c857b20043 fixed issue with vars prompt warning causing error
sometimes display object is not magically available, use it explicitly,
no need to be classmethod anymore
fixes #14147
10 years ago
Toshio Kuratomi 3f3e3e3d5b Return an error when synchronize is used with something other than an ssh connection
Suggested in #2832
10 years ago
Kamil Szczygiel a381c1bbd6 added skip_ssl argument for VMware module to skip SSL verification (required when using self signed certificates) 10 years ago
Brian Coca 6bf2f45ff5 fix for so su works in more cases
should not fail anymore on csh, fish nor the BSDs
fixes #14116
10 years ago
Peter Sprygada 4fa6902c96 address minor bugs in nxos shared module
This addresses two issues with the nxos shared module.  The first issue is
argument precedence checking.  The module should prefer explicit arguments
over arguments passed vi the provider.  This is now fixed to honor that
precedence.  The second issue is collecting output from nxapi and returning
the response.  Prior to this change the entire json structure was returned.
Now just the output is returned to align it better with cli based output
10 years ago
Peter Sprygada c59916c43d fixes issue with eos shared module argument precedence
The eos shared module should prefer to use explicit task arguments over
arguments provided through the provider.  This fixes a problem where
that was not the case
10 years ago
James Cammarata a61e51efb7 Don't try to generate retry files if the tqm hasn't been initialized
Fixes #14144
10 years ago
Toshio Kuratomi cb2b19ced8 Fix for inventory hosts on localhost with alternate ports.
Fixes https://github.com/ansible/ansible-modules-core/issues/2831
10 years ago
James Cammarata 3ed3a5f43a Make retry file generation not use StringIO 10 years ago
James Cammarata 78d499140c Re-implementing the retry file feature for 2.0
Fixes #13944
10 years ago
James Cammarata 07a9a54b0e Fix lookup of parent attribute when parent doesn't have the attr
Fixes #14100
10 years ago
Brian Coca 66104191d1 fixed permissions check for ansible.log
fixes #13990
10 years ago
Brian Coca 46fde754af Merge pull request #14044 from skorochkin/devel
Adding support for scm-based role source urls (ansible-galaxy)
10 years ago
Tobias Wolf 5b293b56d6 Handle the key 'prepared' in the 'diff' result from modules
So far, when a 'diff' dict is returned with module results, it is
checked for 'before' and 'after' texts, which are processed in
_get_diff() by python difflib.  This generates the changes to display
when CLI users specify --diff.

However, some modules will generate changes that cannot easily be
expressed in a conventional diff. One example is the output of the
synchronize module, which presents changed files in a common log format
as in `rsync --itemize-changes`.

Add a check for a diff['prepared'] key, which can contain prepared diff text
from modules.
10 years ago
Toshio Kuratomi c44110bc81 Update submodule refs to pick up the synchronize internal parameter 10 years ago
Toshio Kuratomi a23a5d1b93 Merge pull request #13968 from ansible/synchronize-become-is-reversed
synchronize: First cut at not doing sudo on the control machine but on the remote machine instead.
10 years ago
Toshio Kuratomi d0a062ffa3 python3 doesn't have raw explicit-unicode literals. Workaround it with a raw native string that we make unicode in py2. 10 years ago