Commit graph

1515 commits

Author SHA1 Message Date
Michael DeHaan
4ecc7ea2e0 Merge pull request #2817 from sfromm/issue2810
Set selinux context on file after shutil.move in atomic_move()
2013-05-03 06:45:42 -07: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
Stephen Fromm
50e94e4a2f Set selinux context on file after shutil.move in atomic_move()
This is intended to fix #2810.  It sets the context of the tmp_dest file
after shutil.move() operation and before os.rename().  This should
retain the selinux context of the file across moves.
2013-04-30 10:15:09 -07:00
Michael DeHaan
7117ca5395 Allow modules in a "./library" directory to be referenced by their shortforms "modulename:" instead of just "action: modulename" 2013-04-28 21:05:19 -04:00
Michael DeHaan
e90023281d Slightly refine log output to include username in addition to pid. 2013-04-28 20:57:32 -04:00
Michael DeHaan
ba8f2fca26 Merge branch 'add_pid_to_logging' of git://github.com/mcodd/ansible into devel 2013-04-28 20:52:53 -04:00
Stoned Elipot
df3c4849e9 Also load Jinja2 extensions when processing template from string 2013-04-28 20:52:01 -04:00
Michael DeHaan
4bea9a612f Don't use "finally" here as it's not 2.4 compliant. 2013-04-28 16:03:03 -04:00
Michael DeHaan
68f711d5ae teach plugin loader to find modules in subdirectories 2013-04-28 15:22:46 -04:00
Michael DeHaan
391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04: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
3b8f69bac8 add pid to log 2013-04-27 13:00:02 -04:00
Stoned Elipot
75b51f79b4 Add module path library/ if it exists in role directory 2013-04-27 18:43:56 +02:00
Michael DeHaan
75cf5c985b Allow playbook tags to be comma seperated strings as well as lists 2013-04-27 12:29:32 -04:00
Michael DeHaan
bcac289667 Cows don't need to display brackets around strings. 2013-04-27 11:50:53 -04:00
Michael DeHaan
016b04dff1 Merge branch 'roles_dir_search_order' of git://github.com/mcodd/ansible into devel 2013-04-27 11:46:29 -04:00
Brian Coca
caf6bd6ce5 Changed atomic_replace to atomic_move, now ti DOES move atomically in the last
step
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-04-27 11:46:08 -04:00
Michael DeHaan
b8fdcff524 Merge branch 'nocows' of git://github.com/jpmens/ansible into devel
Conflicts:
	lib/ansible/callbacks.py
	lib/ansible/constants.py
2013-04-27 11:34:39 -04:00
Michael DeHaan
553751aee1 Merge branch 'numeric_ids_refactor' of git://github.com/insom/ansible into testing_427 2013-04-27 11:21:30 -04:00
Michael DeHaan
aa55268514 Adds a logfile for ansible playbooks that can be set by the environment or configuration file. 2013-04-27 10:24:26 -04:00
Michael DeHaan
515fbd5a17 Restructure output to prevent rare cases of interlaced I/O in multiprocessing paths. 2013-04-27 09:46:48 -04:00
Matt Coddington
c164609dd6 typo fix 2013-04-25 23:04:17 -04:00
Matt Coddington
c83c534a7d Search for roles in the roles subdir first. Throw an error when no role .yml files are found. 2013-04-25 22:40:04 -04:00
Michael DeHaan
5af271911b Fix duplicate handler notification issue in 1.2 devel 2013-04-25 21:24:15 -04:00
Michael DeHaan
224e20ca60 complex_arg templating should be smarter. Make it so! 2013-04-25 21:11:17 -04:00
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.
2013-04-25 13:23:07 +01:00
Aaron Brady
d2e457f81f Accept numeric user and group parameters 2013-04-25 13:23:07 +01:00
Jeroen Hoekx
ac7a632711 Remove leftover debug statement in template code. 2013-04-25 08:47:38 +02:00
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)
2013-04-24 22:28:06 -04:00
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.
2013-04-24 22:00:40 -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
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.
2013-04-24 15:00:47 -07:00
Jan-Piet Mens
dfd885a012 Make ANSIBLE_NOCOWS configurable
nocows = 1 in ansible.cfg
	or old environment variable ANSIBLE_NOCOWS=1
add to ansible.cfg example
2013-04-23 16:43:23 +02: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
be947e5266 Resolve merge conflict 2013-04-22 23:57:20 -04: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
6c778acd91 Smush the braces in various places (hey, that rhymes) to avoid undo key=value splitting surprises
in new template system.
2013-04-22 22:05:06 -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
Michael DeHaan
f9f1d5ee42 Merge pull request #2745 from sfromm/issue2742
Fix test so that it is /bin/sh compliant (issue #2742)
2013-04-22 16:23:26 -07: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
3e0c33c1fa Empty plays should still gather facts 2013-04-21 17:35:09 -04:00
Michael DeHaan
b08181e9b4 Merge pull request #2731 from stoned/flush_handlers-cleanup
handlers must be run once
2013-04-21 14:14:04 -07:00
Michael DeHaan
08324cb5d7 Allow play tagging in context of new meta-tasks. 2013-04-21 17:12:12 -04:00
Stoned Elipot
747c7f0dff handlers must be run once
so remove all occurences of each host from the handlers notified by
lists
2013-04-21 17:23:13 +02:00
Michael DeHaan
32fb6c807c Allow handlers to run in between pre_tasks, roles, tasks, and post_tasks. 2013-04-20 18:03:03 -04:00
Michael DeHaan
37789a852a Rename set_up and tear_down to pre_tasks and post_tasks 2013-04-20 16:19:01 -04:00