Commit Graph

1285 Commits (7b51f67128a240eeb74fc6ad31eb12e685973d4e)

Author SHA1 Message Date
Daniel Hokka Zakrisson 4807fbc8b7 Use regular strings to allow tests to work 12 years ago
Michael DeHaan 323ed27106 Merge pull request #2221 from sfromm/fix-ansible-cli-check-mode
Fix CliRunnerCallbacks.on_file_diff in callbacks.py
12 years ago
Stephen Fromm fa07604d43 Fix CliRunnerCallbacks.on_file_diff in callbacks.py
When running ansible -C, I get a traceback that ends with
    AttributeError: Values instance has no attribute 'diff'
This fixes on_file_diff to behave similar to
PlaybookRunnerCallbacks.on_file_diff().
12 years ago
Daniel Hokka Zakrisson cedfec763a jsonify needs to return a string of {}, rather than a dict 12 years ago
Daniel Hokka Zakrisson e4b72c0fd5 Revert to just escaping \ for JSON-args 12 years ago
Daniel Hokka Zakrisson 1601f0b4d7 Use repr to transfer JSON-arguments, so Python doesn't eat things
Fixes transferring newlines in args:, as well as """.
12 years ago
Daniel Hokka Zakrisson bcf7a2c53a Catch all exceptions coming from lookup plugins
Fixes using $TEMPLATE() and hostvars in a task without a name, among
other things.
12 years ago
Michael DeHaan 1366c663eb Merge branch 'copy-diff-take2' of git://github.com/stoned/ansible into better_diff
Conflicts:
	library/file
12 years ago
Daniel Hokka Zakrisson 93f02d614b Merge pull request #2187 from dhozac/argument-type-check
Add type checking for module arguments, converting as much as possible
12 years ago
Stoned Elipot 8816dc7ca7 Make diff header lines more explicit about what the diff is about
This gives a more readable output when producing diff for a task
with multiple items (with_items).
12 years ago
Stoned Elipot 1b8c9bab35 Fix diff when template destination is absent 12 years ago
Daniel Hokka Zakrisson 22e40b6a61 Merge pull request #2198 from skvidal/nolog-params
No_log params
12 years ago
Stoned Elipot 10e9f1fc1e Implement --diff for the copy module. 12 years ago
Seth Vidal f02ea15f0c command: make sure that all _handle_aliases() calls returns {}
module_common: also work if there are no aliases (shell, command, etc) modules
12 years ago
Seth Vidal c95848ae59 - add an aliases attribute as a lookup of aliasname to canonical name
of parameters
- add support for no_log attribute per-parameter which will not log
  that information to syslog
12 years ago
Daniel Hokka Zakrisson e32fbd312f Shell-quote environment contents 12 years ago
Daniel Hokka Zakrisson 27f3ba53f9 Remove debug print for environment 12 years ago
Daniel Hokka Zakrisson 1df56c07d3 If expand_lists is true, make lookup plugin result into a string
Fixes #2196.
12 years ago
Daniel Hokka Zakrisson 7e0ee6809c Don't template delegate_to too early, not all vars are available
Fixes using delegate_to: $item within a playbook include.
12 years ago
Daniel Hokka Zakrisson f03e845920 Allow hyphens in complex variables
Primarily to support ${hostvars.hostname-with-hyphens.<var>}.
12 years ago
Shaun Zinck e7719e4e46 pass in int() args to get_pty
If LINES or COLUMNS was set, get_pty was failing because it was
expecting an int value to be passed in.
12 years ago
Michael DeHaan 294e43ba2f Removing pipe once since it has some issues about evaluating more than once :) 12 years ago
Daniel Hokka Zakrisson 9076f8eb31 Add type checking for module arguments, converting as much as possible
Converts to list from comma-separated strings, and to dicts from
comma-separated, key=value strings.

Fixes #2126.
12 years ago
Michael DeHaan b75b9681a8 more places to use yaml.safe_load 12 years ago
Michael DeHaan a9ea3136cf Use yaml.safe_load as we are just using basic data structures 12 years ago
Michael DeHaan 5b31feb73b Merge pull request #2179 from skinp/host_connection
Add support for connection type in ansible_hosts file
12 years ago
Patrick Pelletier 2b4ddfb0a2 Handle delegate_to case for local connections in hosts file 12 years ago
Michael DeHaan e51707711c Merge pull request #2120 from jpmens/doc_ex1
Add support for additional EXAMPLES string in Ansible modules
12 years ago
Michael DeHaan f7fb681bb2 Fix comment in chroot connection type 12 years ago
Michael DeHaan 5a1aef5372 Merge branch 'local-chroot-support-v2' of git://github.com/mmoya/ansible into testing 12 years ago
Michael DeHaan 93f73739d3 Merge branch 'paramiko-termcap' of git://github.com/madduck/ansible into testing 12 years ago
Patrick Pelletier 4c0e6722c4 Add support for connection type in ansible_hosts file 12 years ago
Maykel Moya 9a493ef388 Add support for running modules chrooted in a local dir
Adds 'chroot' connection for executing modules chrooted to
a local dir. Requires running ansible as root.

chroot dirs should be specified in the inventory like any
other host.

You can do things like:

$ sudo -E ansible -vvv -f 1 "./chroot1,./chroot2" -c chroot \
  all -m setup
$ sudo -E ansible-playbook -vvv -f 1 -i "./chroot1,./chroot2" \
  -c chroot some-playbook.yml

some-playbook.yml:
---
- hosts: all
  tasks:
    - name: echo something
      shell: echo "Yaaay!" >/tmp/foobar.txt
    - name: install less
      apt: pkg=less state=latest
12 years ago
Stoned Elipot 9f2bba01ba Fix diff output vertical spacing 12 years ago
Michael DeHaan 6d604469d8 Always adjust file attributes with the template module. 12 years ago
Jan-Piet Mens 396a07bcc7 Add support for additional EXAMPLES string in Ansible modules
return DOC and EXAMPLES as a list
add moduledev explanation
more
12 years ago
Michael DeHaan ab389d8908 For consistency, add host should take a key named 'name' in addition to 'hostname'. 12 years ago
Michael DeHaan c4779d95b8 Removing unused import, 'make pyflakes' is now clean. 12 years ago
Michael DeHaan 9cf66f4376 Fixes from 'make pep8'. Partial, more to come. 12 years ago
Michael DeHaan 11e7ede4d9 Merge pull request #2112 from kavink/devel
Fixing syntax error
12 years ago
Michael DeHaan 61d01f549f Show a nicer message when attempting to diff unicode files. 12 years ago
Kavin Kankeshwar 359ac9a495 Fixing syntax error
running install_lib
byte-compiling /usr/lib/python2.6/site-packages/ansible/runner/action_plugins/add_host.py to add_host.pyc
SyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/ansible/runner/action_plugins/add_host.py', 37, 92, '    def run(self, conn, tmp, module_name, module_args, inject, complex_args=None, **kwargs)\n'))
12 years ago
Daniel Hokka Zakrisson 43d22b0c42 Flatten argument to with_items
Fixes #1711.
12 years ago
Michael DeHaan f02b9987fc We all agreed on the list that the ansible module common module snippet, since it's dynamically embedded in modules on the fly, should
be a BSD licensed snippet so that it's ok to write proprietary modules.  The actual license of Ansible (GPLv3) or any modules
written for ansible (any) do not change.
12 years ago
Michael DeHaan 1ecf4a6943 Working on complex argument support. 12 years ago
Michael DeHaan cd32597af0 Make the file module work as expected in check mode 12 years ago
Michael DeHaan fa21b41357 Fixup the pipe_once plugin 12 years ago
Michael DeHaan 0af83317a1 Added a $PIPE_ONCE lookup plugin, that caches the result so it is only evaluated one time. 12 years ago
Michael DeHaan b365e04616 Allow add_host to add hosts to multiple groups, groups is now an alias for groupname. 12 years ago
Rob Parrott ef17fc9f20 add the ability to take variables in the add_host module, and be willing to parse a host:port hostname handed to add_host 12 years ago