Commit Graph

495 Commits (1ff93e6b08ef9a0246d0b87deb8071d205d4e8e7)

Author SHA1 Message Date
Steven Dossett 1ff93e6b08 Plugin with_inventory_hostnames - loops generated from groups or
hosts in inventory
2013-06-01 11:42:44 -04:00
node a58baae2c4 Make the actual user used for executing play available as 'ansible_ssh_user' variable 2013-05-31 16:03:56 -04:00
Michael DeHaan fd77804bff Merge pull request #3017 from sergevanginderachter/roles-script
Add roles support for the script module
2013-05-29 15:54:18 -07:00
Michael DeHaan a9fcea5893 Merge branch 'escape' of git://github.com/ngrilly/ansible into repr 2013-05-29 18:29:16 -04:00
Jeremiah Heller 7de718cd51 Fix copy when force=no and update _remote_md5 docs.
Previously setting force=no caused copy to subversively
fail when target did not exist on remote host.

Caused by Runner._remote_md5 returning 1
when files don't exist, rather than 0.
2013-05-29 10:14:47 -04:00
Serge van Ginderachter 5859af7285 script support for roles: use the files/ directory
instead of an additional scripts/ directory
2013-05-25 16:51:59 +02:00
Michael DeHaan 3a635d2d26 Lots of formatting fixes 2013-05-24 23:46:23 -04:00
Michael DeHaan 84623441e1 Merge pull request #2945 from jsmartin/new_fetch
Fetch destination path can now be overriden.
2013-05-24 19:57:19 -07:00
Michael DeHaan 4fc6be8579 Merge pull request #2993 from SirScott/pkgng
Make pkgng and with_items result in a single module call.
2013-05-24 19:55:56 -07:00
Michael DeHaan 4b988dbd43 Merge pull request #2978 from bryanlarsen/basename
add basename and dirname to the core jinja2 filters
2013-05-24 19:54:36 -07:00
Michael DeHaan 27236cf598 Merge pull request #2998 from SirScott/runner-permissions
Ensure the tmp_path is sufficiently open.
2013-05-24 19:52:23 -07:00
Serge van Ginderachter 94028852d9 Make debug module always verbose in playbooks
Created a new flag 'verbose_always' handled by
on_ok callback, similar to the 'verbose_override'
flag used by the setup module.
2013-05-25 00:27:23 +02:00
Serge van Ginderachter 4c9ebe8522 Add roles support for the script module
allows to put scripts directly in a dir within the
role:

 roles/<role>/scripts/..

Same as the copy and template module.

As requested in and closes #2969
2013-05-24 22:10:46 +02:00
Nicolas Grilly 75ceb80572 Escape args injected in new style modules 2013-05-24 01:01:07 +02:00
Scott Sturdivant 5516ece859 Ensure the tmp_path is sufficiently open. 2013-05-23 12:13:09 -06:00
James Martin 3c131dbd2b Initial Commit. 2013-05-23 13:33:36 -04:00
Scott Sturdivant d91bc1692e Make pkgng and with_items result in a single module call. 2013-05-23 09:43:38 -06:00
Bryan Larsen f629baef11 add basename and dirname to the core jinja2 filters 2013-05-22 14:06:18 -04:00
Michael DeHaan 16709ecd76 Replace tab with spaces. 2013-05-19 19:26:30 -04:00
Dimos Alevizos e96bc981ce Set paramiko's logging level
Excplicity set paramiko's logging level to WARNING.
By default it inherits ansible's DEBUG logging level (set in
callbacks.py) and fills the log file with useless debug messages.
Obviously it only applies if log_path is set in ansible.cfg
2013-05-19 19:26:30 -04:00
Maykel Moya 60f24bb077 Remove unused modules 2013-05-18 23:11:47 +02:00
Maykel Moya f52e3dee70 Don't hardcode chroot executable path 2013-05-18 23:09:38 +02:00
Ben Ritcey 0938d4d89a Allow the remote MD5 checks to be run via sudo 2013-05-18 16:20:54 -04:00
Michael DeHaan 8475a92dec Merge pull request #2939 from mmoya/lookup-crypted-passwds
Add support for crypted passwords to password lookup
2013-05-18 13:17:41 -07:00
Stoned Elipot 94ba0f740a Fix for issue #2916 : for each host promote the host variables as globally scoped variables for the sake of the groups determination 2013-05-16 18:57:05 +02:00
Maykel Moya 45f5447f9f Fix name in copyright 2013-05-16 18:49:35 +02:00
Maykel Moya 96afc3f462 Add support for crypted passwords to password lookup
Added new parameter 'encrypt' with same semantics from that of
vars_prompt. When encryption is requested a random salt will be
generated and stored along the password in the form:
'<password> salt=<salt>'.

Also store passwords with an ending '\n' for easier looking at files
with console tools. File content was being already rstripped so this
is harmless.
2013-05-16 13:24:54 +02:00
Serge van Ginderachter 7eeab168bc bug fix in first_found search path assembly 2013-05-13 13:48:56 +02:00
Michael DeHaan a78edbb45c More pep8 2013-05-11 17:26:06 -04:00
Michael DeHaan 05a4513a03 Merge branch 'group-by-global' of git://github.com/stoned/ansible into devel
Conflicts:
	lib/ansible/runner/action_plugins/group_by.py
2013-05-11 14:28:04 -04:00
Michael DeHaan ad777f6538 Fix contrib link. 2013-05-11 14:03:07 -04:00
Stoned Elipot 75100201a2 Allow globally scoped variables with group_by module's conditionals and key argument 2013-05-10 00:02:14 +02:00
Michael DeHaan 9ed177e25e Merge pull request #2840 from toshywoshy/devel
Patch so that delegate_to also uses ansible_ssh_private_key_file
2013-05-05 09:45:35 -07:00
Toshaan Bharvani 62b53f4d2c changed the delegate_to to also use ansible_ssh_private_key_file from the inventory file 2013-05-05 16:54:26 +02:00
Serge van Ginderachter 53a7ab74c8 use os.path.join instead of hardcoded unix separator in first_found lookup plugin 2013-05-02 13:58:23 +02:00
Michael DeHaan a81089231e Register skipped tasks so we can at least check their changed/not-changed status. 2013-04-28 10:13:58 -04:00
Kahlil (Kal) Hodgson 9f90f0e856 fix arguments to isinstance() in env lookup 2013-04-28 14:58:26 +10:00
Matt Coddington c164609dd6 typo fix 2013-04-25 23:04:17 -04:00
Michael DeHaan 224e20ca60 complex_arg templating should be smarter. Make it so! 2013-04-25 21:11:17 -04:00
Michael DeHaan af2fb56a10 Changes to allow WANT_JSON to allow JSON to non-Python modules 2013-04-24 22:00:40 -04:00
Michael DeHaan bd0c22868e With fileglob should return full paths as in 1.1 2013-04-23 00:54:39 -04:00
Michael DeHaan 35e61d8f16 Merge pull request #2688 from dagwieers/module-global
New module 'set_fact' to define host facts
2013-04-22 21:16:46 -07:00
Michael DeHaan 9871707998 If sudoing and the sudo user is not root, the original file is saved as you, therefore delete that file as you. 2013-04-22 23:43:13 -04:00
Michael DeHaan e12f91799c Allow args: var to be used to pass a variable in bare, and also templated versions should also DWIM. 2013-04-22 22:17:55 -04:00
Michael DeHaan 5cced79cf3 Allow variables to be used raw in with_nested 2013-04-22 21:35:09 -04:00
Michael DeHaan fbea88b9d9 Allow the environment string to be referenced by a bare variable name like:
environment: foo
2013-04-22 21:29:15 -04:00
Stephen Fromm ab3cb4912e Fix test so that it is /bin/sh compliant (issue #2742)
The old test used syntax that appeared to be bash-specific and did not
work on platforms where /bin/sh did not point to bash.  See issue #2742
where copy to solaris hosts failed with the error:

    output: {'stdout': '', 'stderr': '/bin/sh: test: argument expected\n',
             'rc': 1}
2013-04-22 16:14:27 -07:00
Michael DeHaan 8e7dc3c79c Remove an extra space in the module execution line if no environment was set. 2013-04-19 08:11:56 -04:00
Dag Wieers b13beb3689 New module 'set_fact' to define host facts
This module allows you to set host facts (or export play variables to the playbook scope if you fancy that).

The module also accepts complex arguments.

```yaml
 - action: set_fact fact="something" global_fact="${local_var}"'
 - action: set_fact
   args:
      fact: something
      global_fact: ${local_var}
```
2013-04-18 23:06:58 +02:00
Seth Vidal 7b8cec3f59 clean up first_found to fix a few issues:
- add a skip option so it won't raise an exception if you don't match anything
 - make it work as a drop-in replacement for first_available_file
 - document in the module comments all of the above cases
2013-04-18 16:47:10 -04:00