Commit Graph

5256 Commits (0bb34fd0765d56ce17c31fe0d1af3c20cc6f5885)

Author SHA1 Message Date
Abhijit Menon-Sen 0bb34fd076 Make «ansible-vault view» not write plaintext to a tempfile
CLI already provides a pager() method that feeds $PAGER on stdin, so we
just feed that the plaintext from the vault file. We can also eliminate
the redundant and now-unused shell_pager_command method in VaultEditor.
9 years ago
Brian Coca bf06e36382 updated async to pass along no_log setting 9 years ago
Brian Coca ddafed4403 Merge pull request #12528 from bcoca/task_logging
task logging revamp
9 years ago
Brian Coca 7b64126c9d pushed up openvz detection for cases of 'stacked' virtualization 9 years ago
Linus Unnebäck 45f9800754 facts: correctly detect docker inside a xen host 9 years ago
James Cammarata 3bd71d0619 Use delegated_to field for play context remote_addr, if none other exists
Fixes #12527
9 years ago
James Cammarata 40bdf09998 Merge pull request #12561 from srvg/anotherdirpy
Inject existing groups at InventoryDir initialization
9 years ago
James Cammarata 6fcd292c5e Merge pull request #12569 from amenonsen/fixes
Bring groups handling in ini.py up-to-date (trivial fix)
9 years ago
James Cammarata dfa33d0f23 Tweak variable manager use in role includes to avoid test failures 9 years ago
Abhijit Menon-Sen 50d75f8d6d Bring groups handling in ini.py up-to-date
Since c8f2483d, ini.py expects to always be passed in a pre-created list
of groups, and can no longer deal sensibly with an empty list; this just
makes that expectation clear.
9 years ago
James Cammarata a89412ecb1 Fail all hosts if a run_once task fails
Fixes #12563
9 years ago
James Cammarata 7173f587ed Allow delegate_to on a role again
Fixes #12560
9 years ago
James Cammarata a3e913da62 Don't assume handlers exist in the same role (if any)
Fixes #12536
9 years ago
Serge van Ginderachter 7461ba9998 Inject existing groups at InventoryDir initialization
This fixes a corner case where ini files live in a subdir
of the main inventory directory.

Reproducing the original error:

mkdir -p inventory/ini
cat > inventory/ini/hosts << EOF
[www]
www1
EOF

$ ansible -i inventory/ all -m ping
ERROR! 'all'

(or without the [www] group, it would complain about 'ungrouped')
9 years ago
James Cammarata 79e364d98b Properly template role dependency names
Fixes #12505
9 years ago
Marius Gedminas 5edd6d9be4 Python 3: there's no basestring
Fixes another failing test.

(I don't want to do a global search/replace for 'basestring' because I
want to have unit tests covering each occurrence.  When I run out of
existing failing tests, I'll try to write new ones.)
9 years ago
Toshio Kuratomi 95ede22a1e Add a comment about the docker connection and usage by non-root users 9 years ago
Toshio Kuratomi 0e110d23f8 Misc cleanups and some fixes for docker connection plugin
* Remove extraneous imports
* Fix some error handling
* Enable pipelining
* Disable su since it doesn't work
* Add error message when installed docker is not recent enough to
  support this plugin
* Move nested functions to class level
* Make transport a class attribute
* Make exec_command, put_file and fetch_file more robust
9 years ago
Toshio Kuratomi 1d119a1f46 Cleanup some extraneous imports 9 years ago
James Cammarata ffdba96668 Save the included directory for playbook includes for use as the basedir
Fixes #12524
9 years ago
Konstantin Manna 4226e49bc6 bugfix: statement had no effect => statement now has assumed effect 9 years ago
Konstantin Manna 1ccfeafa76 bugfix: use correct close calls 9 years ago
Brian Coca c1ad96e5cf removed fixme as it is already implemented below. 9 years ago
Toshio Kuratomi 12a2585e84 chroot plugin minor touchups:
* Disable su as it's not currently working 100% (and was disabled in v1).
* Move BUFSIZE out of the class to match other conenction plugins
* _connect shouldn't return self.
9 years ago
Toshio Kuratomi 7a4266e9c5 One more try -- the error message should reference the become method
requested via play context
9 years ago
Toshio Kuratomi 696cf32d63 Correct name of variable 9 years ago
Brian Coca 8d024c3747 Merge pull request #12472 from resmo/for_ansible
cloudstack: improvements and tests
9 years ago
Toshio Kuratomi 0dfa1fb43a Correct call to method typo 9 years ago
Toshio Kuratomi d827325644 Re-order the methods in ssh.py so that methods needed for implementation are near and just above the relevant public methods.
Standard with the rest of the code base.
9 years ago
Toshio Kuratomi 37844a5c1b Update submodule refs 9 years ago
Toshio Kuratomi c811668a4d Merge pull request #12546 from amenonsen/ssh-cleanups
A couple of ssh cleanups
9 years ago
Toshio Kuratomi 05af4c8e91 Merge pull request #12471 from amenonsen/pipelining
Make pipelining a connection variable
9 years ago
Abhijit Menon-Sen 38c7422da5 Move ControlPersist/Path checking into a separate method
This is also peripheral to what _build_command needs, can be improved
and tested independently, and so makes more sense in a separate method.

This commit doesn't change any functionality (and I've verified that it
works with the various combinations: control_path set in ansible.cfg,
ssh_args adding or not adding ControlMaster/ControlPersist, etc.).
9 years ago
Toshio Kuratomi c3a05b1181 Update to fix one more doc error 9 years ago
Abhijit Menon-Sen f33d541964 Move sshpass checking into a separate method
Checking for sshpass is peripheral to the calling code, so it's easier
to follow when the details are moved into a method.
9 years ago
Abhijit Menon-Sen 565c6f1ae7 Make ansible_pipelining a connection variable
SSH pipelining can be a significant performance improvement, but it will
not work if sudoers is configured to requiretty. With this change, one
could have pipelining enabled in ansible.cfg, but use sudo to turn off
requiretty in a separate play (or task) where pipelining is disabled:

    - hosts: foo
      vars:
          ansible_pipelining: no
      tasks:
        - lineinfile: dest=/etc/sudoers line='Defaults requiretty' state=absent
          sudo_user: root

(Note that sudoers has a complicated syntax, so the above lineinfile
invocation may be too simplistic for production use; but the point is
that a separate play can do something to disable requiretty.)
9 years ago
Toshio Kuratomi fd267989fb Fix docs build 9 years ago
Toshio Kuratomi 69ebb899a7 Update submodule refs 9 years ago
James Cammarata c860775b5d Another fix for --limit in adhoc 9 years ago
James Cammarata babf47decb Clean up some bugs related to --limit on adhoc commands 9 years ago
James Cammarata 621575681a Merge pull request #12542 from amenonsen/qfix
Clarify why we add -q only for ssh
9 years ago
Abhijit Menon-Sen 2ce219b5af Clarify why we add -q only for ssh 9 years ago
Marius Gedminas 9b39af8e9a Python 3: the StringIO module is gone
Fixes 17 failing tests on Python 3.4, restoring the 8 failures we had
last Friday.
9 years ago
James Cammarata 4cd810a674 Only append -q option for ssh if we're using ssh 9 years ago
James Cammarata 46984a067c Don't wrap vars from include_vars with UnsafeProxy 9 years ago
James Cammarata abfeb104df Merge pull request #12529 from soarpenguin/bug-fix
fix no self pointer out of class.
9 years ago
Toshio Kuratomi 342bc97322 Port chroot conection plugin to the latest v2 connection API.
Also get pipelining working for people who look to chroot as an example
for their own connection plugins

Note: In the latest v2 API, action handles become but chroot doesn't
reliably handle become.  Maybe we need to add a has_become attribute
that the action can display an appropriate error.
9 years ago
Toshio Kuratomi 056a020357 Do not fail if /proc/uptime is not present
This can happen in chroot environments that don't have all of /proc
available
9 years ago
Toshio Kuratomi ae66d01a33 Document how a command is executed on the remote machine
Helps connection plugin implementors understand how to structure
exec_command()
9 years ago
James Cammarata 6dd38c2a10 Fix parent attribute lookup to be default
Fixes #12526
9 years ago