Commit Graph

1494 Commits (1a4d801cdb0b7e23cbdd05a53ae87e26d783e956)

Author SHA1 Message Date
Michael DeHaan 553751aee1 Merge branch 'numeric_ids_refactor' of git://github.com/insom/ansible into testing_427 12 years ago
Michael DeHaan aa55268514 Adds a logfile for ansible playbooks that can be set by the environment or configuration file. 12 years ago
Michael DeHaan 515fbd5a17 Restructure output to prevent rare cases of interlaced I/O in multiprocessing paths. 12 years ago
Matt Coddington c164609dd6 typo fix 12 years ago
Michael DeHaan 5af271911b Fix duplicate handler notification issue in 1.2 devel 12 years ago
Michael DeHaan 224e20ca60 complex_arg templating should be smarter. Make it so! 12 years ago
Aaron Brady bd226eb826 Refactor user_and_group so it works off of numbers
There are various cases where a UID to username to UID mapping breaks
down. One UID can be used by two usernames, or no username. If we
always use UIDs internally, then these ambiguous cases won't be a
problem.
12 years ago
Aaron Brady d2e457f81f Accept numeric user and group parameters 12 years ago
Jeroen Hoekx ac7a632711 Remove leftover debug statement in template code. 12 years ago
Michael DeHaan 21fe750cef Flush handlers before pre and post task sections change, but not between task and roles, as this seems
to be confusing to people (and not usually neccessary)
12 years ago
Michael DeHaan 6fdfbb1a34 Improve variable smushing so it only has to be done in one place. This is related to shlex.split being called
on untemplated variables in some rare cases.
12 years ago
Michael DeHaan af2fb56a10 Changes to allow WANT_JSON to allow JSON to non-Python modules 12 years ago
Stephen Fromm 189b210f5a Catch exception when logging to systemd journal fails
systemd journal will throw IOError exception when journal.sendv() fails.
This catches that and falls back to syslog.  See issue #2773.
12 years ago
Michael DeHaan bd0c22868e With fileglob should return full paths as in 1.1 12 years ago
Michael DeHaan 35e61d8f16 Merge pull request #2688 from dagwieers/module-global
New module 'set_fact' to define host facts
12 years ago
Michael DeHaan be947e5266 Resolve merge conflict 12 years ago
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. 12 years ago
Michael DeHaan e12f91799c Allow args: var to be used to pass a variable in bare, and also templated versions should also DWIM. 12 years ago
Michael DeHaan 6c778acd91 Smush the braces in various places (hey, that rhymes) to avoid undo key=value splitting surprises
in new template system.
12 years ago
Michael DeHaan 5cced79cf3 Allow variables to be used raw in with_nested 12 years ago
Michael DeHaan fbea88b9d9 Allow the environment string to be referenced by a bare variable name like:
environment: foo
12 years ago
Michael DeHaan f9f1d5ee42 Merge pull request #2745 from sfromm/issue2742
Fix test so that it is /bin/sh compliant (issue #2742)
12 years ago
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}
12 years ago
Michael DeHaan 3e0c33c1fa Empty plays should still gather facts 12 years ago
Michael DeHaan b08181e9b4 Merge pull request #2731 from stoned/flush_handlers-cleanup
handlers must be run once
12 years ago
Michael DeHaan 08324cb5d7 Allow play tagging in context of new meta-tasks. 12 years ago
Stoned Elipot 747c7f0dff handlers must be run once
so remove all occurences of each host from the handlers notified by
lists
12 years ago
Michael DeHaan 32fb6c807c Allow handlers to run in between pre_tasks, roles, tasks, and post_tasks. 12 years ago
Michael DeHaan 37789a852a Rename set_up and tear_down to pre_tasks and post_tasks 12 years ago
Michael DeHaan d7623d1f91 Added a 'set_up' and 'tear_down' which are like tasks, but execute before and after roles. 12 years ago
Michael DeHaan e6bf01a6b0 Make plugin loader path operations more efficient. 12 years ago
Michael DeHaan 5a8dff5bce Instantiate inventory plugins only once for efficiency reasons. 12 years ago
Michael DeHaan 817b0cdc80 Instantiate filter plugins only once to save some efficiency. 12 years ago
Michael DeHaan 6e1514e975 Merge pull request #2727 from dsedivec/devel
Don't send unicode instances to the selinux module
12 years ago
Michael DeHaan 5b44c3d52c Merge commit '53ac0bb' into devel 12 years ago
Michael DeHaan 87788b1d17 Ignore inventory config files when using an inventory directory. 12 years ago
Michael DeHaan 53ac0bbec2 Instantiate callback plugins only once so we can set play/task objects on them and they'll stick. 12 years ago
Dale Sedivec c8f4a56cad Don't send unicode instances to the selinux module
This fixes #2632.  Briefly: specifying things like paths using complex
args in a playbook will make the objects unicode instances.  The selinux
module does not accept unicode instances for its char * arguments; it
wants str instances.

Per mpdehaan's comment on #2632 I just went ahead and converted all
paths to UTF-8.  I don't know if it would be better to do something like
converting to locale.getpreferredencoding(), but I factored all the
conversions out into new method _to_filesystem_str, so there's only one
place that needs to be changed in the future.
12 years ago
Michael DeHaan df93d7dd97 Ignore inventory config files when using an inventory directory. 12 years ago
Michael DeHaan 8e7dc3c79c Remove an extra space in the module execution line if no environment was set. 12 years ago
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}
```
12 years ago
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
12 years ago
Michael DeHaan 5f1e2afc34 Revert "make atomic_replace use shutil.copy2 instead of os.rename() so it will work across filesystems".
AR function was leaving some tmp files behind, want to revert, will have better implementation soon, this is the old way now.

This reverts commit f74a1fa4f0.
12 years ago
Michael DeHaan d8bf87b008 (A) include errors in inventory scripts should they occur.
(B) allow registration with ignore_errors: True
12 years ago
Bernhard Weitzhofer fb0a99e5d8 Fix if-statement that always evaluates True 12 years ago
C. Morgan Hamill 88eb5516eb Fix 'sequence' plugin error.
If 'terms' is a string, replace it with a single item list.
12 years ago
C. Morgan Hamill 663d37b537 Fix errors in lookup plugins.
Lookup plugins 'sequence' and 'template' now import 'ansible.utils'
appropriately in order to use the 'listify_lookup_plugin_terms'
function.

Also, 'dnstxt' and 'env' now check to see if 'terms' is a string;
without this calls like '{{ lookup('env', 'HOME') }}' fail.
12 years ago
Dale Sedivec 515fd9e915 copy action plug-in check mode respects force=no
The copy action accepts force=no, which tells it not to replace an
existing file even if it differs from the source.  The copy action
plug-in wasn't respecting this option when operated in check mode, so it
would report that changes are necessary in check mode even though copy
would make no changes when run normally.

Runner._remote_md5 was changed to make the logic for setting rc perhaps
a little more clear, and to make sure that rc=0 when the file does not
exist.
12 years ago
Michael DeHaan 7c6341718e Merge branch 'combine_vars' of git://github.com/laggyluke/ansible into exp
Conflicts:
	lib/ansible/inventory/vars_plugins/group_vars.py
	lib/ansible/runner/__init__.py
	lib/ansible/utils/__init__.py
	test/TestPlayBook.py
12 years ago
C. Morgan Hamill 863cb50530 Allow '.yml'/'.yaml' extension on group_vars files.
Look for a file with the base name of the group/host, first without
a file extension, then with a '.yml' extension, and, finally, with
a '.yaml' extension, loading vars from only the first one found.
12 years ago