Commit Graph

114 Commits (5aec5e5eb0bd5fce426df580c76dbff7c741c933)

Author SHA1 Message Date
Brian Coca b85ce38834 slight changes to error handling to align with v1 9 years ago
James Cammarata ce3ef7f4c1 Making the switch to v2 9 years ago
Brian Coca 5f6db0e164 preliminary privlege escalation unification + pbrun
- become constants inherit existing sudo/su ones
- become command line options, marked sudo/su as deprecated and moved sudo/su passwords to runas group
- changed method signatures as privlege escalation is collapsed to become
- added tests for su and become, diabled su for lack of support in local.py
- updated playbook,play and task objects to become
- added become to runner
- added whoami test for become/sudo/su
- added home override dir for plugins
- removed useless method from ask pass
- forced become pass to always be string also uses to_bytes
- fixed fakerunner for tests
- corrected reference in synchronize action plugin
- added pfexec (needs testing)
- removed unused sudo/su in runner init
- removed deprecated info
- updated pe tests to allow to run under sudo and not need root
- normalized become options into a funciton to avoid duplication and inconsistencies
- pushed suppored list to connection classs property
- updated all connection plugins to latest 'become' pe

- includes fixes from feedback (including typos)
- added draft docs
- stub of become_exe, leaving for future v2 fixes
9 years ago
Matt Martz 68358e31fb Allow ansible (ad-hoc) to support --extra-vars also 10 years ago
Toshio Kuratomi fbadcfd44f Fix for not all platforms having optional libraries at the proper versions. 10 years ago
Pete Smith 0953322b23 Remove no-op string declaration 10 years ago
Bruno BAILLUET 16108e4a99 Adding a new 'load_callback_plugins' config option, defaults to False
This option, when set to True, allows "ansible" command to load callback plugins
10 years ago
Michael DeHaan 6caad9ac8f No hosts matched goes to stderr. 10 years ago
James Cammarata 4fc8d4b6fe Merge pull request #7649 from sivel/vault-password-script
Allow --vault-password-file to work with a script as well as a flat file
10 years ago
Matt Martz 19f5ce2c9c Allow --vault-password-file to work with a script as well as a flat file 10 years ago
Serge van Ginderachter f6a55a3552 Refactor vars_plugins (host/group_vars)
Split out parsing of vars files to per host and per group
parsing, instead of reparsing all groups for each host. This enhances
performance.

Extend vars_plugins' API with two new methods:
* get host variables: only parses host_vars
* get group variables: only parses group_vars for specific group
The initial run method is still used for backward compatibility.

Parse all vars_plugins at inventory initialisation, instead of
per host when touched first by runner. Here we can also loop through
all groups once easily, then parse them.
This also centralizes all parsing in the inventory constructor.

	modified:   bin/ansible
	modified:   bin/ansible-playbook
	modified:   lib/ansible/inventory/__init__.py
	modified:   lib/ansible/inventory/vars_plugins/group_vars.py
10 years ago
jctanner adbd6865da Merge pull request #6681 from zytek/devel
Properly revert changes introduced in #6579
10 years ago
Jakub Paweł Głazik 6b53ac8a9a strip() vault password file 10 years ago
James Tanner 409044155d Fixes #6579 allow for vault passwords ending with newline chars
Also add a unit test for vaulteditor to verify 1.0 passwords with newline chars.
10 years ago
James Tanner 70f4e0807c Fixes #6467 ansible command should not assume sudo if ask_sudo_pass or sudo_user 10 years ago
James Tanner 35def422a3 Addresses #6188 Add --vault-password-file to bin/ansible and bin/ansible-playbook 10 years ago
James Tanner 9ba053c885 Fix ansible cli to use vault for group var files 11 years ago
Paul Durivage f72f5a20df Revert "Revert "Merge pull request #5325 from angstwad/add-su-support""
This reverts commit c17d0e0357.

Conflicts:
	lib/ansible/runner/connection_plugins/paramiko_ssh.py
11 years ago
James Tanner c17d0e0357 Revert "Merge pull request #5325 from angstwad/add-su-support"
This reverts commit 6f4bfa2cff, reversing
changes made to c91ba3a7c7.
11 years ago
Paul Durivage c95be4ceaa Make sudo and su command line arguments mutually exclusive 11 years ago
Paul Durivage 4088243deb Proposing fix for Issue #4324; adding support for su in connection plugins ssh, ssh_alt
Fixes for ssh_alt support, adding in references to in_data where appropriate
11 years ago
Jesse Keating 46554bbc30 Exit 0 with no matched hosts
And also print to stdout not err

This lines up with how ansible-playbook will exit. 0 in the case of no
matched hosts. This makes it easier to script ansible commands w/
variable iventory input which may or may not have an entry for the
specific ansible task being scripted. No matched hosts is acceptable,
but matched hosts w/ failures is not.
11 years ago
Jesse Keating 2b96c347dc Exit with status 3 if no failures but unreachable.
Provide hints to playbook callers that a playbook execution had
unreachable vs failures. 2 == failures, 3 == no failures, but
unreachable hosts. 0 continues to be all good.
11 years ago
Michael DeHaan 0988a86653 Misc style fixes. 11 years ago
Andy R 5a47953e7d Never ask for SSH password when using local connection.
With the command line option "-c local", ansible and ansible-playbook
should never ask for a SSH password even if this is set in the config.

Fixes #3720
11 years ago
Joshua Lund dc984d94ac Updates to Ansible command options
* Moved the --list-hosts option that is common to both `ansible` and
  `ansible-playbook` into utils/__init__.py (corrects a FIXME)
* Wrote new help text for the --list-hosts option that makes sense
  for both of the commands that it applies to
* Changed the usage argument in `ansible-playbook` so that it is
  setup in the base_parser method the same way that it is in
  the `ansible` executable
* Updated the help text for several options to correct typos,
  clarify meaning, improve readability, or fix grammatical errors.
  In the case of `ansible-pull`, I changed the help text so that
  it adheres to the same standards as the other executables.
11 years ago
Michael DeHaan aa55268514 Adds a logfile for ansible playbooks that can be set by the environment or configuration file. 11 years ago
Michael DeHaan be947e5266 Resolve merge conflict 11 years ago
Serge van Ginderachter 94243e983f make bin/ansible error output consistent for shell module as for the command module when no arguments 11 years ago
Michael DeHaan a9162a86f2 Very basic --diff option for showing what happens when templates change.
Probably output is not useful if not used with --limit

Works well with --check mode
12 years ago
Stoned Elipot 82011b043a For ansible --list-hosts benefit apply hosts selection limits early 12 years ago
Michael DeHaan fed82c2188 This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list
shortly.
12 years ago
Christopher A. Snapp 8655f64e68 add --list-hosts support to bin/ansible
add error handling when no arg passed to command module
12 years ago
Michael DeHaan 6f938c9f4c Merge branch 'playbook_ssh_ask_pass' of git://github.com/clatour/ansible into devel
Conflicts:
	examples/ansible.cfg

+ doc tweak
12 years ago
Chandler Latour f436a8c88b Added config option for default ask for ssh_pass 12 years ago
Brian Coca 604bf9f58a Added config option to control default of asking or not for sudo password
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
12 years ago
Aleksej Romanov 05464816c2 Different return codes for different errors. 12 years ago
Aleksej Romanov 01e922aa69 Indicate errors with exit code. 12 years ago
Michael DeHaan 3587ffdef3 Allow /bin/ansible to use --limit 12 years ago
Michael DeHaan 846186e2fc Add -vvv support for debugging activity 12 years ago
Michael DeHaan faed4b5a33 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
12 years ago
Michael DeHaan efac68b636 Remove the -D module debug flag, which no longer is functional due to sudo pty requirements, and replace with -v/--verbose.
This flag will show playbook output from non-failing commands.  -v is also added to /usr/bin/ansible, but not  yet used.

I also gutted some internals code dealing with 'invocations' which allowed the callback to know what module invoked
it.  This is not something 0.5 does or needed, so callbacks have been simplified.
12 years ago
Michael DeHaan db1d5b154a Fix casing/underscore convention in method name, split polling logic away from runner. 12 years ago
Seth Vidal b42628d858 hook up --private-key to the runner 12 years ago
John Kleint 710d085def Fix non-sudo execution, add --sudo-user to ansible-playbook. 12 years ago
Michael DeHaan 05545e3735 Fixup the previous sudo_user support patch to work with playbooks. 12 years ago
Jim Richardson 93a20a33e9 first bit of getting sudo -u functionality 12 years ago
Rafal Lewczuk 06e99ee75e Trivial fix: make PyDev happy (imports). 12 years ago
Jeroen Hoekx 029fe1273c Modify /usr/bin/ansible and playbooks to use the new async API. 12 years ago
Michael DeHaan edb8988e8e Unused imports 12 years ago