1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

4366 commits

Author SHA1 Message Date
Michael DeHaan
db7ba87111 Add polling logic in runner such that all actions get kicked off everywhere then polling
happens only on needed hosts, allowing some hosts to fail and drop out of the running.
2012-03-11 20:54:54 -04:00
Michael DeHaan
49a636d8a0 Fixed up async and polling logic. 2012-03-11 19:27:43 -04:00
Michael DeHaan
5be1a612d3 Add async polling logic to runner. Will add to playbook shortly, have to diagnose why paramiko
is not letting async_wrapper daemonize itself when it does work fine when directly executed.
2012-03-11 18:40:35 -04:00
Michael DeHaan
d5c239404b Update .gitignore 2012-03-11 04:23:00 -04:00
Michael DeHaan
e5386b82c6 Put index.html back in git, problem with staleness was related to .buildinfo, not git. 2012-03-11 04:21:53 -04:00
Michael DeHaan
e3adca1431 Makefile needs to clean things up 2012-03-11 04:21:19 -04:00
Michael DeHaan
f7ff5d1055 Doc build 2012-03-11 21:53:13 -04:00
Michael DeHaan
4cc8fe7561 Split paragraph 2012-03-11 21:53:00 -04:00
Michael DeHaan
91d8d0e502 update faq 2012-03-11 21:47:57 -04:00
Michael DeHaan
e726b9796d Fix some example command line options, add some more links to home page. 2012-03-11 21:46:05 -04:00
Michael DeHaan
817cac7954 Add missing "-a" to examples page 2012-03-11 21:20:30 -04:00
Michael DeHaan
0bccec9fb5 Add polling info to docs 2012-03-11 21:09:21 -04:00
Michael DeHaan
d3fe5f617a Rename 'yamlscripts' to 'yamlsyntax', add some extra crosslinking to make sure folks find the
interesting docs pages, some misc editing here and there.
2012-03-11 15:34:21 -04:00
Michael DeHaan
02549869b1 Attempt to force update 2012-03-11 15:04:08 -04:00
Michael DeHaan
0404acfcc2 Move all html content on the website to build top level such that we do not need the redirect. 2012-03-10 22:34:53 -05:00
Michael DeHaan
60a13cf540 Ignore commented out lines in the ansible setup files. 2012-03-10 21:19:41 -05:00
Michael DeHaan
0035181c59 Remove URL target for clicking on arch diagram, add width/height so it loads
nicer.
2012-03-10 19:57:24 -05:00
Michael DeHaan
e284c8cedc Merge pull request #16 from tbielawa/master
Updates for better RPM packaging (plus tasks)
2012-03-10 16:51:34 -08:00
Michael DeHaan
667aa81bee Add arch diagram to website + docs build 2012-03-10 19:48:53 -05:00
Tim Bielawa
82befee081 Change Source0 in spec file to point at github downloads 2012-03-10 16:25:46 -05:00
Tim Bielawa
dce6074a81 Fixes for better RPM packaging
Spec file installs default example hosts files
Spec file marks the contents of /etc/ansible as %config(noreplace)

Example hosts file now with instructional comments
2012-03-10 16:19:33 -05:00
Tim Bielawa
3f245498c4 Fixup RPM building: Makefile, Spec File, .gitignore
Fixup distutils: setup.py

Clean old cruft: section 5 man pages
2012-03-10 14:22:11 -05:00
Michael DeHaan
4c9dd972b4 Fixes for output formatting 2012-03-10 13:40:08 -05:00
Michael DeHaan
bb5e4fad48 Abstracted out transport from implementation so it can be pluggable. Also fixes for output format. 2012-03-10 13:35:46 -05:00
Michael DeHaan
a13def0fbe Add yum module to examples + playbook examples 2012-03-10 11:40:49 -05:00
Michael DeHaan
8bf7e79ee3 Add yum to examples 2012-03-10 11:35:36 -05:00
Michael DeHaan
d397c13d9c Added "Fork Me On Github" 2012-03-10 10:39:34 -05:00
Seth Vidal
a99b491b32 touch up to yum module.
fix a couple of bugs
comment about state='latest'
2012-03-10 02:19:57 -05:00
Michael DeHaan
557f4d382b add links 2012-03-09 22:58:17 -05:00
Michael DeHaan
ff64996542 doc build 2012-03-09 22:49:40 -05:00
Michael DeHaan
88140938cb Fix heading 2012-03-09 22:49:30 -05:00
Michael DeHaan
4ecad80725 Add google stats 2012-03-09 22:31:54 -05:00
Michael DeHaan
10d197d77f Add missing files 2012-03-09 22:14:31 -05:00
Michael DeHaan
a631c21e5a Add ansible-playbook(1) manpage. 2012-03-09 22:11:41 -05:00
Michael DeHaan
209760f8f6 Add manpage for ansible-playbook, since it is a command. More detailed docs will remain on the web site. 2012-03-09 22:06:44 -05:00
Michael DeHaan
8e7ae6cf69 Minor reordering and linking some things up. 2012-03-09 21:50:00 -05:00
Michael DeHaan
37864337eb Added FAQ page (limited space in menu, so trimmed some topics on lesser used bits) + docs build 2012-03-09 21:41:18 -05:00
Michael DeHaan
e575c0639f Added one last image to header + docs rebuild 2012-03-09 19:13:34 -05:00
Michael DeHaan
1346fd02c9 Added stub yum docs + docs rebuild 2012-03-09 19:04:40 -05:00
Michael DeHaan
ef5e326215 Docs build 2012-03-09 18:51:06 -05:00
Michael DeHaan
1699013fbd Rename 'ensure' to 'state' so it lines up with the service module 2012-03-09 18:50:34 -05:00
Seth Vidal
b576e389b1 runner buglet and yum module
runner: fix buglet causing logger output to include a u for the command
yum: add yum module:
   ensure=installed pkg=name/name.arch/name-ver-rel.arch
   ensure=removed pkg=name/name.arch/name-ver-rel.arch
   list=installed
   list=updates
   list=available
   list=pkgspec
   list=repos
2012-03-09 18:33:58 -05:00
Michael DeHaan
fae963a6d2 Docs build + attempt to add image to website 2012-03-09 18:29:01 -05:00
Tim Bielawa
a1010e5405 Spellcheck. Formatting. References. 2012-03-09 14:39:29 -05:00
Tim Bielawa
8bd523fe36 More bootstrap tweaks 2012-03-09 11:50:07 -05:00
Tim Bielawa
f25b39b7ce Switch to the 'Sphinx Bootstrap' Theme:
https://github.com/ryan-roemer/sphinx-bootstrap-theme

Fix some rst related formatting.
2012-03-09 11:44:14 -05:00
Michael DeHaan
f3a0eb4b23 Docs build 2012-03-09 07:43:06 -05:00
Michael DeHaan
e8eb7ab5ed Update docs 2012-03-09 07:42:53 -05:00
Michael DeHaan
c89a0f96bd Merge pull request #87 from skvidal/feature
if we've failed a connection to a host - we cannot set items to the
2012-03-09 04:19:03 -08:00
Seth Vidal
19b784e480 if we've failed a connection to a host - we cannot set items to the
'conn' object since it is not an object on failure - it's a string.
2012-03-09 00:19:55 -05:00
Michael DeHaan
fe2d1c7cc9 Docs rebuild 2012-03-08 23:06:07 -05:00
Michael DeHaan
7a4df9e2fc RST reformatting a few things 2012-03-08 23:05:52 -05:00
Michael DeHaan
358859d2f3 Docs rebuild 2012-03-08 22:52:16 -05:00
Michael DeHaan
bc62feb583 Don't say script 2012-03-08 22:52:02 -05:00
Michael DeHaan
2c6dd03229 docs rebuild 2012-03-08 22:50:12 -05:00
Michael DeHaan
1952bd0aa3 add some docs 2012-03-08 22:50:00 -05:00
Michael DeHaan
d89ee675fc Oh I have to commit these too 2012-03-08 14:07:13 -05:00
Michael DeHaan
56de2e112a Update README.md 2012-03-08 13:59:12 -05:00
Michael DeHaan
742258a078 Drop other man(5) pages so we can have only one source of docs -- ansible.github.com for those operations.
Easier to maintain and much more verbose.
2012-03-08 13:56:27 -05:00
Michael DeHaan
2cafb8d221 Minor docs restructuring 2012-03-08 13:53:48 -05:00
Michael DeHaan
12fd193450 Docs updates 2012-03-08 13:36:47 -05:00
Tim Bielawa
6fe8e4d348 Unjekyllify these pages. 2012-03-07 13:48:56 -05:00
Tim Bielawa
5738f8724a Polish up more. Refactor build-site.py and Makefile. 2012-03-07 13:08:31 -05:00
Tim Bielawa
baf2a05708 Polish the docs up some more. Also make 'index.html' forward to the actual html output 2012-03-07 12:41:53 -05:00
Tim Bielawa
95502c3089 Adding version and author to ansible init. 2012-03-07 12:02:05 -05:00
Tim Bielawa
5e453555e3 Let me upgrade your docs 2012-03-07 11:35:18 -05:00
Michael DeHaan
8e20ed3714 src= parameters for template and copy operations can be relative to the playbook (for /usr/bin/ansible-playbook) or current directory (for /usr/bin/ansible) 2012-03-06 21:13:50 -05:00
Michael DeHaan
7eedc3fb1a Breakout includes into seperate functions, allow vars to apply to handlers but handlers
still may not be parameterized because it does not make sense to import them more than
once since they are keyed by name.
2012-03-06 21:01:05 -05:00
Michael DeHaan
3ee22ad351 Merge branch 'master' of github.com:mpdehaan/ansible 2012-03-06 19:25:28 -05:00
Michael DeHaan
85e0de5bb2 Move print statements out of playbook.py and back into CLI so we can simplify playbook operations
independent of output, and can also see all the output nicely grouped together if we want
to reformat it or make summaries of statistics.
2012-03-06 19:24:36 -05:00
Michael DeHaan
7e0ff815b9 Do I have to change something here to trigger a rebuild? 2012-03-06 19:00:52 -05:00
Michael DeHaan
eadd5644b0 Fix project name from where I copied it from :) 2012-03-06 18:59:33 -05:00
Michael DeHaan
bd4bda95d0 Check in files. 2012-03-06 18:58:23 -05:00
Michael DeHaan
2e75c21e4b first commit 2012-03-06 18:55:16 -05:00
Michael DeHaan
498a4c8056 Update README.md 2012-03-06 08:56:51 -05:00
Michael DeHaan
7cb6ce6613 Update README.md 2012-03-06 08:54:06 -05:00
Michael DeHaan
de3cff8cef Removing vim swap files and MANIFEST from rpmbuild on 'make clean' 2012-03-05 22:47:30 -05:00
Michael DeHaan
e835cd6f92 Have 'make clean' clean up test output directory 2012-03-05 22:44:39 -05:00
Michael DeHaan
001937976f Add RPM target. Not quite operational. 2012-03-05 22:35:59 -05:00
Michael DeHaan
0935506d6f Templating as non-root should not require passing in the metadata= parameter. 2012-03-05 22:23:56 -05:00
Michael DeHaan
4ee4ddcd7c Parameterized include statements can see top level variables and also be passed specific variables!
Code needs cleanup, but works
2012-03-05 22:00:22 -05:00
Michael DeHaan
fb3bfa1c51 Tweak the matrix 2012-03-05 21:38:12 -05:00
Michael DeHaan
9c5341116b Update to comparison matrix 2012-03-05 21:35:00 -05:00
Michael DeHaan
ee6db0531b Attempt at adding more comparison info 2012-03-05 21:16:55 -05:00
Michael DeHaan
937de08794 HTML test 2012-03-05 21:09:13 -05:00
Michael DeHaan
06d3cc930d This was supposed to be markdown with embedded HTML 2012-03-05 21:08:25 -05:00
Michael DeHaan
077e4f2381 Added start of comparison table so it's easy to explain at a glance what this project is. 2012-03-05 21:07:36 -05:00
Michael DeHaan
8d57ceecf1 Factoids and push variables via setup are now available to be templated in command args
as well as template files.  PLUS, variables are now expressed in playbooks without having
to know about the setup task, which means playbooks are simpler to read now.
2012-03-05 20:09:03 -05:00
Michael DeHaan
e0b1ad790c Merge pull request #80 from tbielawa/ReallyClean
Fix the py[co] part of the clean target in the make file
2012-03-05 13:24:58 -08:00
Tim Bielawa
2b22f546a2 Fix the py[co] part of the clean target in the make file 2012-03-05 16:21:39 -05:00
Tim Bielawa
c5f8bc9d79 Don't set ANSIBLE_HOSTS inside the env-setup script 2012-03-05 16:12:05 -05:00
Tim Bielawa
f2c2786a14 Update constants.py to pull module path and the hosts file from the
environment (ANSIBLE_{LIBRARY,HOSTS}) if defined.

Update manpages to represent this.

Also update the env-setup script to set ANSIBLE_{LIBRARY,HOSTS}.
2012-03-05 16:08:36 -05:00
Michael DeHaan
3c20f4000f Merge pull request #74 from tbielawa/ungrouped
Fix parse_hosts to not blow up on ungrouped hosts.
2012-03-05 11:16:55 -08:00
Michael DeHaan
95555ecc14 Merge pull request #76 from tbielawa/hacking
Add environment updating script 'env-setup' to facilitate running ansibl...
2012-03-05 11:15:27 -08:00
Tim Bielawa
2d052fcefb Freshen up Makefile clean target 2012-03-05 14:12:11 -05:00
Tim Bielawa
b190ea4b62 Fix parse_hosts to not blow up on ungrouped hosts. 2012-03-05 14:09:01 -05:00
Tim Bielawa
6343aa6214 Add environment updating script 'env-setup' to facilitate running ansible from a git checkout. 2012-03-05 13:47:01 -05:00
Seth Vidal
78566946c0 correct license 2012-03-05 12:24:01 -05:00
Seth Vidal
11bf2a5e03 add python-paramiko dependency 2012-03-05 12:16:08 -05:00
Seth Vidal
47aa018a84 add MANIFEST.in, ansible.spec, modify setup.py for rpm pkg creation 2012-03-05 12:15:24 -05:00
Tim Bielawa
e9ae5eb9d5 Correct see-also in playbook manpage 2012-03-04 23:08:29 -05:00
Michael DeHaan
cb5929dad7 Setup module tests 2012-04-04 11:55:24 -04:00
Michael DeHaan
c71afe35d6 Async tests complete. Fixed bug in async_wrapper 2012-04-04 11:30:14 -04:00
Michael DeHaan
fae3a71899 WIP on async tests 2012-04-04 11:24:22 -04:00
Michael DeHaan
f8eab8ed7e Here are those tests I talked about previously :) 2012-04-04 11:11:31 -04:00
Michael DeHaan
369b9cde1c Add test for template module and make 'dark' errors clearer if we get output back and the JSON
is not parseable
2012-04-04 10:57:54 -04:00
Michael DeHaan
c86b388812 Strip trailing newlines from command module, which happens in some shell commands 2012-04-04 10:30:22 -04:00
Michael DeHaan
8d06c074b1 * Added uptime.py as an example of somewhat minimal API usage & reporting
* Pattern in API now has a default
* Fixed bug in template module operation detected from running playbook (tests for that pending)
* Workaround for multiprocessing lib being harmlessly squeaky (feeder thread got sentinel)
2012-04-04 10:27:24 -04:00
Michael DeHaan
05c5c85276 Added tests for the guts of the program (Runner()) and modules. Idea is to run
everything as the logged in user using local checkout and write to a tempdir.
To run tests, be sure user is in SSH authorized_keys for themselves, this DOES
run through paramiko because mocking it out would defeat the point of having tests.
2012-04-04 09:16:11 -04:00
Michael DeHaan
db57933614 Allow ":" to be used to split patterns as well as ";" so if you are just using group names or fully explicit names you do not need to use shell quoting at all. Obviously if you use wildcards like "*" you wouldstill. 2012-03-03 14:26:59 -05:00
Michael DeHaan
c839229f54 Fix code formatting in README.md 2012-03-03 14:20:58 -05:00
Michael DeHaan
269a6d46d6 attempt to explain import syntax in ansible-playbook manpage. Can't include
examples inline because github won't display them well, want to move this
file to markdown soon.
2012-03-03 14:13:31 -05:00
Michael DeHaan
defb91ae4d README updates 2012-03-03 14:06:15 -05:00
Michael DeHaan
6a0b793578 Remove debug comments 2012-03-03 13:42:37 -05:00
Michael DeHaan
8e07d83ad1 Async module, mostly operational, daemonizing/watch code may have bugs 2012-03-03 13:19:33 -05:00
Michael DeHaan
718e2930b2 async module now forks 2012-03-03 13:06:43 -05:00
Michael DeHaan
45c40524ef Time limit needs to be passed to async_wrapper. 2012-03-03 12:47:31 -05:00
Michael DeHaan
a06d8859fa Added start of async_status script.
Parameters:
  jid=X
  mode=status|cleanup (default status)

status = returns results from the job
cleanup = deletes the job file, should also kill the job if still running (TODO)
2012-03-03 12:41:22 -05:00
Michael DeHaan
eaa7714ff8 Laying the groundwork for async mode, async status script still needs to be done, and async_wrapper
still needs to daemonize.  Then, once done, playbook can be taught how to poll async within the
timing window.
2012-03-03 12:25:56 -05:00
Michael DeHaan
1ed212513c Add user to playbook example so it's clear that this is available 2012-03-03 11:02:14 -05:00
Michael DeHaan
ab408b0000 Ability to import task lists and handler lists from a top level playbook file. It is possible
to use multiple import statements to implement 'class' like behavior, and also to share
a common list of handlers between multiple patterns.
2012-03-03 10:53:15 -05:00
Michael DeHaan
32c32abb4a Update AUTHORS 2012-03-02 23:12:43 -05:00
Michael DeHaan
1c2d31ef85 add info about the 'all' group to README.md 2012-03-02 23:02:17 -05:00
Michael DeHaan
cbfabcd0fb Add -i, -k, and -M to ansible-playbook CLI to match options in /usr/bin/ansible 2012-03-02 22:54:25 -05:00
Michael DeHaan
e4304a0ac5 Make sure tempdirs are cleaned up after execution steps, fix notifiers, make sure
service module is installed by setup.py
2012-03-02 22:38:55 -05:00
Michael DeHaan
6541f338df add pyflakes target & associated fixes. Also decided to save JSON to --tree file so it can
be better used programatically.  May have to come up with another system of tree logging for
playbook if playbook decides to have tree logging.  Presumably not the highest priority.
2012-03-02 22:10:51 -05:00
Michael DeHaan
3ad9db4966 Some minor from 'pep8', and silencing the PEP8 messages I don't care about.
Also make pep8 show all messages rather than just 1 per code.
2012-03-02 22:03:03 -05:00
Michael DeHaan
0d7a84d591 Some minor refactoring of playbook code, more to go. 2012-03-02 21:43:46 -05:00
Michael DeHaan
c57df6220b Add pydoc to playbook binary, fix default types for playbook '.get()' call 2012-03-02 21:20:37 -05:00
Michael DeHaan
34cbbfbfe1 Added pydoc for utils.py 2012-03-02 21:16:29 -05:00
Michael DeHaan
bf967adf83 Added pydoc for functions in Cli() 2012-03-02 21:11:43 -05:00
Michael DeHaan
e9a24cdad4 Extensive refactoring of bin/ansible, moving most output functions into lib/ansible/utils to
encourage readability and make things more maintainable.
2012-03-02 21:08:48 -05:00
Michael DeHaan
b33ef0de60 Add a newline in output here, possibly considering printing top level keys flat 2012-03-02 19:52:43 -05:00
Michael DeHaan
1420c49277 Still seeing some weirdness from ohai but we can probably simplify
this until we figure out what that is.
2012-03-02 19:48:37 -05:00
Michael DeHaan
e6a1acf756 Let "all" be an alias for "*" in patterns, fix output bug on non-command execution, make clean now removes the build dir 2012-03-02 19:44:50 -05:00
Michael DeHaan
c8b1bbc7ea make command module error when no -a more obvious as command is the default module and someone
may forget about -a.  The CLI already warns about no host pattern by pulling up usage.
2012-03-01 22:25:01 -05:00
Michael DeHaan
146cb3ff7e update README.md on playbook field names 2012-03-01 22:24:12 -05:00
Michael DeHaan
5040c01640 rename 'pattern' to 'hosts' in playbook format. 2012-03-01 22:20:45 -05:00
Michael DeHaan
687a315a80 Increasing default --forks to 5 2012-03-01 22:19:41 -05:00
Michael DeHaan
847846af0e -p has been replaced by a required option. Various docs changes. 2012-03-01 22:10:47 -05:00
Michael DeHaan
4ce1f1dd5e README/doc/example updates to go with group support and CLI option changes.
Minimizing manpage until CLI options stabilize.
2012-03-01 21:18:32 -05:00
Michael DeHaan
bed29b7e11 Allow the /etc/ansible/hosts file to contain groups and those group names to be used in place
of pattern names.
2012-03-01 20:41:17 -05:00
Michael DeHaan
24d854e0bc Merge pull request #63 from chjohnst/master
add -T option for ssh timeout
2012-03-01 17:06:40 -08:00
Christopher Johnston
d15172abdc add a -T option for setting ssh timeout in seconds 2012-03-01 16:54:17 -08:00
Michael DeHaan
a191af6af4 Update README.md 2012-02-29 13:58:46 -05:00
Christopher Johnston
2773234c3f python 2.5 does not include json so lets try to use simplejson 2012-02-29 09:30:02 -08:00
Michael DeHaan
ab266472be Trim errors on connection refused messages 2012-02-28 04:23:34 -05:00
Michael DeHaan
a40ac93716 Plan to merge things back into ansible means we can simplify our code tree
by eliminating the lib/ansible/scripts file.  Ansible-playbook
doesn't have enough options to need it's own thing, and we're going to try
to work most things back into bin/ansible
2012-02-28 04:20:25 -05:00
Michael DeHaan
55d256d82a Added solution to avoid checking in manpages. Just run "make" and we'll build
docs before python setup.py.   Seems reasonable to let Makefile drive
2012-02-28 04:15:52 -05:00
Michael DeHaan
19fdb7305d have command module raise an error if no arguments are supplied 2012-02-28 04:02:29 -05:00
Michael DeHaan
1427ade3af Have ansible yell if no module name is supplied 2012-02-28 04:00:31 -05:00
Michael DeHaan
edf6da5c38 Rename opts so --help looks cleaner 2012-02-28 03:57:43 -05:00
Michael DeHaan
281f96b8dd merge Seth's ansible-command script with ansible proper, so we can do nice output, one line output,
and treeish saving everywhere.

there are probably some quirks here we'll want to refine further later, for instance, we should
be able to do nicer things with "can't contact host tracebacks".
2012-02-28 03:54:41 -05:00
Michael DeHaan
d8b5e667d8 Doc rebuild 2012-02-28 03:05:29 -05:00
Michael DeHaan
442c2488ba Minor playbook doc updates 2012-02-28 22:10:58 -05:00
Michael DeHaan
0356925639 Rename ans-command to ansible-command and ans-playbook to ansible-playbook so my brain
can tab complete better
2012-02-28 22:08:31 -05:00
Michael DeHaan
d0906e187f Correct file location error in example 2012-02-28 02:52:14 -05:00
Michael DeHaan
058fa5bd15 Manpage and doc updates 2012-02-28 02:51:19 -05:00
Michael DeHaan
430f38d54c minor option consistency 2012-02-28 02:41:32 -05:00
Michael DeHaan
ab17f6f44e Because I can't remember which options are supposed to be uppercase and which are not,
rename all of them so we can use non-conflicting lowercase.  Manpage updates pending
2012-02-28 02:38:36 -05:00
Michael DeHaan
de1d0011bc Take darkened hosts out of the playbook rotation, fix error handling in template
module so that if a directory path is specified we get valid output
2012-02-28 02:32:14 -05:00
Michael DeHaan
79d91e024b Updates to ansible-playbook helper program 2012-02-28 02:25:34 -05:00
Michael DeHaan
42767b30fe Fix output on failed hosts 2012-02-28 02:11:51 -05:00
Michael DeHaan
b9b0240543 Continued ans-command output upgrades, fixed output_dest back again 2012-02-28 02:03:07 -05:00
Michael DeHaan
d6dcaefa9f Some code refactoring + output upgrades 2012-02-28 01:59:21 -05:00
Michael DeHaan
859c572de8 always show return codes (seems like a reasonable thing to do), make one line output slightly more
obvious
2012-02-28 01:46:02 -05:00
Michael DeHaan
cc2d3e0f1a Fix my error from not removing this parameter 2012-02-28 01:40:56 -05:00
Michael DeHaan
7553981ca2 ok I see output_dest was actually used but IMHO this should be something we use the shell for, i.e. output to stdout and redirect, using tee if neccessary 2012-02-28 01:39:47 -05:00
Michael DeHaan
f72bded2e5 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-28 20:44:24 -05:00
Michael DeHaan
34b72d02ea remove unused option 2012-02-28 20:44:12 -05:00
Michael DeHaan
4ba366c2d1 Require that ansible managed hosts be in the list of hosts to manage to avoid
option overload.
2012-02-28 01:34:28 -05:00
Michael DeHaan
01e5da6d0b Make /bin/ansible use the common options from lib/ansible/scripts
DRY!
2012-02-28 01:33:22 -05:00
Michael DeHaan
6fcce9a97e rebuild manpage due to license change 2012-02-28 01:25:00 -05:00
Michael DeHaan
fb531a8dfa Minor option string relabelling, move one option from common into helper script 2012-02-28 01:01:44 -05:00
Michael DeHaan
c6eb3f1006 remove debug statement 2012-02-28 00:49:49 -05:00
Michael DeHaan
7de661dd2c Add ansible command, fix import error in runner 2012-02-28 00:45:37 -05:00
Michael DeHaan
0321afb1e3 Minor error handling tweaks (yell if no args) for ansible-command and some minor
style bits (underscores between compound words, use dest always in optparse)
2012-02-28 00:28:43 -05:00
Michael DeHaan
a3a426b4c5 Add GPLv3 license headers to new files. Approved by all contributors on mailing list. 2012-02-28 19:09:30 -05:00
Michael DeHaan
5eea593af5 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-28 19:08:37 -05:00
Michael DeHaan
be4cb64c92 Relicensing to GPLv3, all previous committers ok'd on mailing list. 2012-02-28 19:08:09 -05:00
Michael DeHaan
0ed3e87792 Merge pull request #40 from skvidal/master
ans-command
2012-02-28 04:14:15 -08:00
Seth Vidal
95706af074 ans-command and scripts.py for the basic cli parser to be imported elsewhere 2012-02-28 01:12:04 -05:00
Michael DeHaan
f4ffddef15 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-28 00:11:27 -05:00
Michael DeHaan
ca49676ef7 Somehow lost the API docs. Put them back! 2012-02-28 00:10:49 -05:00
Michael DeHaan
928095c623 README.md revisions. 2012-02-27 23:54:56 -05:00
Michael DeHaan
c0b4c80ba1 Docs rebuild 2012-02-27 23:54:32 -05:00
Michael DeHaan
783d3642a8 ok, giving up, github does not render asciidoc well at all.
Is there something we can use to generate manpages from markdown?
2012-02-27 23:48:40 -05:00
Michael DeHaan
28afd7208e Try once more. 2012-02-27 23:47:10 -05:00
Michael DeHaan
03bf465c3a attempt to fix asciidoc so it shows up on github 2012-02-27 23:42:15 -05:00
Michael DeHaan
f3246fb72e Remove 'pending' comment. 2012-02-27 23:39:47 -05:00
Michael DeHaan
c8005e6c60 fix markdown links 2012-02-27 23:38:21 -05:00
Michael DeHaan
d8c0be9ae6 Add links to manpage into README.md 2012-02-27 23:36:22 -05:00
Michael DeHaan
4201865bba Add note about facter/ohai integration into module docs. 2012-02-27 23:18:53 -05:00
Michael DeHaan
b622429738 Add note about facter/ohai integration in the template engine 2012-02-27 23:16:46 -05:00
Michael DeHaan
320ce8f5f1 If ohai is present, do the same with facter and make it available for the templating engine 2012-02-27 23:15:11 -05:00
Michael DeHaan
186dab4dff Include facter variables for free in setup JSON (prefix with 'facter'.
Also sort keys in JSON file and pretty print
2012-02-27 23:06:32 -05:00
Michael DeHaan
e766bb6a6c update manpage output 2012-02-27 22:49:14 -05:00
Michael DeHaan
155c3ca89e update playbook docs with updated syntax / minor edits 2012-02-27 22:48:45 -05:00
Michael DeHaan
302cc37c79 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-27 22:43:21 -05:00
Michael DeHaan
2860c14bc2 module doc updates 2012-02-27 22:43:08 -05:00
Michael DeHaan
4a3a5fb685 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-27 22:28:30 -05:00
Michael DeHaan
1caafb7bd9 Stop evaluating a host in a playbook when it encounters the first failure. 2012-02-27 22:28:01 -05:00
Michael DeHaan
74cf509ea4 More markdown. Might be done for now. Maybe. Grr, hate you markdown. 2012-02-27 21:31:18 -05:00
Michael DeHaan
1ef19af4eb More markdown formatting 2012-02-27 21:27:18 -05:00
Michael DeHaan
f32f5d5ac5 Fix markdown bullets 2012-02-27 21:26:23 -05:00
Michael DeHaan
757574ee03 Make templating example make more sense 2012-02-27 21:13:44 -05:00
Michael DeHaan
ada866be46 Further README tweaks 2012-02-26 23:03:06 -05:00
Michael DeHaan
ff53237893 Some readme cleanup 2012-02-26 22:51:23 -05:00
Michael DeHaan
ba4e36a9a9 Rename 'ensure' to 'state' because I think it's a bit cleaner and doesn't imply
all modules take a common parameter name.  But more or less we still work idempotently
in modules.
2012-02-26 22:31:42 -05:00
Michael DeHaan
228d1a0834 A really basic git module. Improvements welcome. 2012-02-26 22:17:31 -05:00
Seth Vidal
39f42cfd75 when it is an IOError or an OSError - return a normal error message instead of a traceback barf 2012-02-27 17:53:02 -05:00
Seth Vidal
85f751175d - make tmp_path be a dir so we can put more than one command in there securely 2012-02-27 17:52:37 -05:00
Seth Vidal
bd7a71bb29 implement manual multiprocessing pools for the runner.
this fixes the ctrl-c not-working problem.

implemented this solution: http://www.bryceboe.com/2010/08/26/python-multiprocessing-and-keyboardinterrupt/#georges

also add hosts which do not get a chance to return results to the 'dark' results.
2012-02-27 00:43:02 -05:00
Seth Vidal
1a20b00d1f If the error is an authentication exception - just report it that way don't dump out an unappetizing traceback which just says the same 2012-02-26 22:59:45 -05:00
Michael DeHaan
5781e6e02f Merge pull request #32 from tbielawa/DocsFixin
Docs fixin
2012-02-26 18:44:14 -08:00
Tim Bielawa
6612772711 Update man pages. Fix formatting in playbook example. Also, YAML documents by definition start with '---', so I have added this to the example and the manpage 2012-02-26 21:09:56 -05:00
Tim Bielawa
6027c16ddd Update distutils setup script to install the new manual page 2012-02-26 21:04:38 -05:00
Tim Bielawa
afc7f4d246 This is configuration, not command. Rename to section 5 2012-02-26 21:03:55 -05:00
Tim Bielawa
9680de37c9 Manpages formatting 2012-02-26 21:03:18 -05:00
Tim Bielawa
cdbc2168c1 Fix makefile manpage targets 2012-02-26 21:01:29 -05:00
Tim Bielawa
d44e0bbb61 Update the python setup script to install the ansible modules man page. 2012-02-26 21:01:04 -05:00
Tim Bielawa
b4fd0042f6 Fix up some wording/formatting in ansible-modyles.5. Also: Section 5 is for configuration, update the see-also to reflect this with respect to ansible-playbook. 2012-02-26 21:01:04 -05:00
Tim Bielawa
86bf871e07 Fixup the naming of the docs. 2012-02-26 21:01:04 -05:00
Michael DeHaan
f7cff27f3d Drastically simply playbook syntax 2012-02-26 20:54:51 -05:00
Michael DeHaan
136d8fa33a add manpage crossreferences 2012-02-26 20:48:10 -05:00
Michael DeHaan
2262705ea3 Added stub for ansible-playbook (format) docs. Docs on ansible-playbook script TBD once
written.
2012-02-26 20:47:22 -05:00
Michael DeHaan
fc4ba46d1a Add a ton of comments so folks can understand what runner does. More refactoring is
certaintly possible too.
2012-02-26 20:29:27 -05:00
Michael DeHaan
c0ac0e9b62 Added comments to explain the playbook code. 2012-02-26 20:18:42 -05:00
Michael DeHaan
17a6ddb7ee Lining up with the reversion of 70ec508ee0, also
check the ansible-module file back in.  This is basically to make things easier
to build from setup.py.
2012-02-26 20:01:31 -05:00
Michael DeHaan
4e5da11217 Revert "don't check in manpage output file"
This reverts commit 70ec508ee0.
2012-02-26 20:00:46 -05:00
Michael DeHaan
78a254fc52 In playbooks, each pattern stanza can reference it's own user to run as, so you can
run things as multiple sets of users (if you want) in the same playbook.
2012-02-26 19:58:56 -05:00
Michael DeHaan
61d064d011 Fixed up KV munging in runner, misc fixes to copy, setup, and template modules 2012-02-26 19:55:26 -05:00
Michael DeHaan
226da501d3 Take notes about other modules that are in plan. 2012-02-26 19:29:56 -05:00
Michael DeHaan
e5f62f20b1 make copy & template module take key/value parameters so we're consistent. Only the command
module works differently now

starter manpage for modules

allow template file location to be passed into template & setup modules
2012-02-26 19:21:44 -05:00
Michael DeHaan
77a7ddeebc Add start of documentation for modules 2012-02-26 18:52:42 -05:00
Michael DeHaan
deb71da91e trim md5sum string so it does not contain the filename
also fix a bug/typo in the reporting from playbook
2012-02-26 12:10:57 -05:00
Michael DeHaan
bfd93081ae Have to return the return code on failure, it's a rule! 2012-02-25 21:00:51 -05:00
Michael DeHaan
d308254eae A basic service module with 'ensure' idempotence semantics. Playbook updated to use service
module vs command module for restarting.  May be some bugs and requires the service to implement 'status' -- and probably some better error handling (i.e. return JSON with "failed" element if failed).

Improvements welcome.
2012-02-25 20:27:11 -05:00
Michael DeHaan
3c3111c1f3 Add optional hosts parameter to examples to show how we can
override the host file in a playbook to load different groups
of hosts.
2012-02-25 19:56:06 -05:00
Michael DeHaan
cb90df2377 Allow multiple patterns to specified, just like Func did. 2012-02-25 17:22:48 -05:00
Michael DeHaan
70ec508ee0 don't check in manpage output file 2012-02-25 17:19:12 -05:00
Michael DeHaan
af74f53230 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-25 17:16:47 -05:00
Michael DeHaan
6b433239e6 Update README.md 2012-02-25 17:31:23 -05:00
Michael DeHaan
b44ae0af90 applying indentation patch from skvidal 2012-02-25 17:16:23 -05:00
Michael DeHaan
a5039eec62 Update reporting on playbook runs. 2012-02-25 15:21:11 -05:00
Michael DeHaan
79fdc1b6f4 Notifable handlers only run when something is changed. Awesome. 2012-02-25 14:42:41 -05:00
Michael DeHaan
de80166b6d Misc refactoring, updated TODO to reflect new templating features being completed 2012-02-05 13:25:10 -05:00
Michael DeHaan
ba9468266f Can it get an easier? Yes it can! Further simply playbook format. 2012-02-05 13:05:09 -05:00
Michael DeHaan
6d0fd2bfde Compress the playbook format for readability 2012-02-05 12:52:07 -05:00
Michael DeHaan
b053df4182 Some refactoring of runner.py -- more to come to eliminate repeated code 2012-02-05 12:48:52 -05:00
Michael DeHaan
6cceaa5f6a Implment copy with an actual minion-side module such that we can get md5sum's and
onchange events like Puppet's file providers do.
2012-02-24 05:15:28 -05:00
Michael DeHaan
440bac4a95 Added remote templating engine using jinja2, see examples/playbook.yml for usage.
Cleanup is due in runner.py
2012-02-24 04:35:51 -05:00
Michael DeHaan
5d6b0280d5 Added stub for template execution, WIP. 2012-02-24 03:45:36 -05:00
Michael DeHaan
102385e4ad Added a setup module which can be used to place key-value JSON data
on the system for use in a later template module.   These values
could also be used for module-specific config.
2012-02-24 03:25:09 -05:00
Michael DeHaan
2c5d5a328b Merge pull request #9 from skvidal/master
use logger to track all events run via ansible on the remote host.
2012-02-25 06:58:32 -08:00
Michael DeHaan
e61d64307c Grr, markdown. 2012-02-25 09:41:30 -05:00
Michael DeHaan
635cd6f01e Nope, can't use a form in the README file. 2012-02-25 09:40:42 -05:00
Michael DeHaan
9b3d2b97a7 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-25 09:39:18 -05:00
Michael DeHaan
fe02b21a95 Attempt adding google groups signup form to README 2012-02-25 09:39:03 -05:00
Seth Vidal
160470bc49 - add match_hosts() method to runner.Runner()
- add pattern parameter to self._matches() and match_hosts() so you can query
  for matches against the host list
- these are useful when writing scripts and you want to tell the user
  what hosts you will be running on before  actually executing anything.
2012-02-25 01:06:18 -05:00
Seth Vidal
edb9683050 touch up the example API code 2012-02-25 01:00:37 -05:00
Seth Vidal
ee95a5b0a4 use shlex.split() instead of split() to keep quoting sane for commands 2012-02-24 23:35:09 -05:00
Seth Vidal
8d555ff51c Merge remote-tracking branch 'upstream/master'
* upstream/master: (2 commits)
  Added idea about how to do async + timeout in modules
  ...
2012-02-24 23:28:58 -05:00
Seth Vidal
e7bb41ff89 simple logging setup using logger.
/usr/bin/logger should probably be a constant or defined in some sort of config as well as the log priority
2012-02-24 23:25:30 -05:00
Michael DeHaan
0de9f0b28e Added idea about how to do async + timeout in modules 2012-02-24 03:04:46 -05:00
Michael DeHaan
6bfc275204 update TODO with ideas for playbook and latest plans 2012-02-24 02:49:05 -05:00
Michael DeHaan
e25bb2f888 Upgrade output for playbook runs 2012-02-24 02:36:38 -05:00
Michael DeHaan
ee2fa721f1 Kinda have to pass the host list parameter 2012-02-24 02:14:22 -05:00
Michael DeHaan
9e931f323c Update ohai module to run on older python clients. 2012-02-24 02:05:49 -05:00
Michael DeHaan
f17c4ca4b2 Added an 'ohai' module. Some weird JSON hackage to get it to work. 2012-02-24 02:04:50 -05:00
Michael DeHaan
c8fe53c4b9 Update README.md to reflect that this is a tool, not just an API. Though
the API is important.
2012-02-24 01:13:21 -05:00
Michael DeHaan
b0d2739baa Merge pull request #6 from tbielawa/manpage
Because everything should have a man page
2012-02-24 17:30:11 -08:00
Tim Bielawa
f0b0211772 Because everything should have a man page 2012-02-24 20:07:49 -05:00
Tim Bielawa
4caf9d274b Fix tbielawa email in AUTHORS file 2012-02-24 20:07:49 -05:00
Michael DeHaan
43f7dee247 Added rough sketch of what I want for playbook support. Debug heavy at the moment
as I figure out how logging/output might look.  A couple of major TODO features
also listed in the file.
2012-02-24 01:02:24 -05:00
Michael DeHaan
2fc109b47a Credit Tim for last patch. 2012-02-23 23:58:40 -05:00
Michael DeHaan
767517ac65 Force forks to be an integer when read by command line 2012-02-23 23:57:26 -05:00
Michael DeHaan
7730341d24 We don't have modules that list when things change just yet. I plan to handle
this by having a changed=True/False in the JSON for these modules.  Added a note
so folks won't think we can only execute shell :)
2012-02-23 23:54:16 -05:00
Michael DeHaan
0095336a4e Update API docs for runner 2012-02-23 23:29:34 -05:00
Michael DeHaan
d079c8e5f3 Move runner out of __init__.py so it's clear what classes live where. 2012-02-23 23:28:58 -05:00
Michael DeHaan
6eda2cf383 Added initial stub for where playbooks will go, moved to common
constants file so as to not repeat constants between CLI and lib.
2012-02-23 23:26:16 -05:00
Michael DeHaan
be9fdc8ef1 Add Seth to authors file. 2012-02-23 23:03:57 -05:00
Michael DeHaan
b2e8084c50 Merge pull request #4 from skvidal/master
adds an option to ask for and store the ssh password from the cli
2012-02-24 15:27:19 -08:00
Michael DeHaan
a021020967 Merge pull request #3 from katzj/no-shell
Don't use a shell and thus avoid a whole class of problems
2012-02-24 15:26:33 -08:00
Seth Vidal
08b45d6da1 add support to prompt for ssh password on the cli 2012-02-24 18:13:11 -05:00
Jeremy Katz
24e10dc2e8 Don't use a shell and thus avoid a whole class of problems 2012-02-24 16:10:53 -05:00
Jeremy Katz
25df80ff58 Use a mktemp'd path for uploading modules 2012-02-24 15:51:16 -05:00
Michael DeHaan
bd37864242 Comments and fixup on the dark/contacted code 2012-02-23 23:00:37 -05:00
Michael DeHaan
11f7930038 trim unused modules 2012-02-23 22:54:01 -05:00
Michael DeHaan
4a891b4108 Merge branch 'master' of github.com:mpdehaan/ansible 2012-02-23 22:50:45 -05:00
Michael DeHaan
659c0efd72 Add authors file to list contributors 2012-02-23 22:50:25 -05:00
Michael DeHaan
6bebedd7eb Merge pull request #1 from katzj/centos5-simplejson
Fall back to standalone simplejson module
2012-02-23 19:47:51 -08:00
Michael DeHaan
7be8d134c9 Rename 'successful' to 'contacted' ... 2012-02-23 22:47:03 -05:00
Michael DeHaan
530e54b3e4 Fix multiprocessing pool usage and remove stackoverflow hack 2012-02-23 22:38:51 -05:00
Michael DeHaan
4608a93de5 Added docs on split success/failure structures 2012-02-23 22:24:56 -05:00
Michael DeHaan
7ce5db97ed Add explicit calls to close connections 2012-02-23 22:10:34 -05:00
Michael DeHaan
e0e98d10ce use readlines on stdout so we'll block on long running commands 2012-02-23 22:09:23 -05:00
Michael DeHaan
7eb2dd2dee Add remote setting to file, update TODO 2012-02-23 22:04:09 -05:00
Michael DeHaan
03647d64e9 Update docs, added TODO.md 2012-02-23 21:47:31 -05:00
Michael DeHaan
3da6370a65 use defaults better, improve/fix setup.py 2012-02-23 21:37:39 -05:00
Michael DeHaan
2c873a4467 Adding setup.py 2012-02-23 21:07:03 -05:00
Jeremy Katz
ef8ea13495 Fall back to standalone simplejson module
CentOS5 has python 2.4 which doesn't have a built-in json
module
2012-02-23 20:52:53 -05:00
Michael DeHaan
9681e1fa04 Add MIT license headers 2012-02-23 19:42:05 -05:00
Michael DeHaan
cb7fb52736 Added copy to list of modules, though it's not really a true module. Added more idea notes. 2012-02-23 17:38:49 -05:00
Michael DeHaan
a2a8deaeaa Added command module 2012-02-23 17:19:06 -05:00
Michael DeHaan
f4fca1069a doc updates 2012-02-23 16:32:58 -05:00
Michael DeHaan
3807824c6d Added file copy support w/ readme updates 2012-02-23 16:07:10 -05:00
Michael DeHaan
83d15afc6f readme updates 2012-02-23 15:31:35 -05:00
Michael DeHaan
631ac37843 Example facter module. Look how quick that was. 2012-02-23 15:24:24 -05:00
Michael DeHaan
145a024d7b Split CLI into binscript 2012-02-23 14:56:14 -05:00
Michael DeHaan
288ce6b32e Further readme tweaks 2012-02-23 14:40:17 -05:00
Michael DeHaan
5170a9fe2c Readme edits 2012-02-23 14:28:39 -05:00
Michael DeHaan
381b3c971a Example for list of hosts syntax
TODO: add a command to auto-add a host, list hosts, etc
2012-02-23 14:20:28 -05:00
Michael DeHaan
b9426ef99a Add SSH-agent usage instructions 2012-02-23 14:19:28 -05:00
Michael DeHaan
c4f6d493b3 Initial library directory 2012-02-23 14:18:51 -05:00
Michael DeHaan
f31421576b Genesis. 2012-02-23 14:17:24 -05:00