Commit Graph

27 Commits (d0aecf025e23cf26f3df5a253639b0ec425b7223)

Author SHA1 Message Date
Dave Hatton 345499c002 improve error trapping for md5 12 years ago
Michael DeHaan 81adae619a 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
Ludovic Claude 608b6d9f3e Add basic support for Solaris 12 years ago
Fred Alger e6b76a59c5 Make shell outs to md5sum work on FreeBSD and OS X
Tested with OS X local connection and Linux remote. The paths to the
md5sum and md5 commands are hardcoded to the most common location. This
will definitely fail if the commands are elsewhere, or if the md5
command doesn't support the -q 'quiet' option.
12 years ago
Michael DeHaan 08112eca7b Merge pull request #426 from dagwieers/facts
Add BIOS information and fix VMware detection (supports both IDE and SCSI)
13 years ago
Stephen Fromm 493ec14ccb Update get_selinux_facts in setup module
This switches to using selinux library calls instead of parsing the
output of sestatus.  This fixes issue #428 where the output was slightly
different than expected on F17.  Tested against debian (non-selinux),
centos5, centos6, and fedora17.
13 years ago
Dag Wieers cb07728109 Add BIOS information and fix VMware detection (supports both IDE and SCSI disks) 13 years ago
Wes Johnson d67f996f8d starting fresh, doing it 'right'
Lost commit history, but this way I'm not introducing crappy commit
history in RP
13 years ago
Cosmin Luță 2fae38fffb Added a new fact: network address for an interface 13 years ago
Stephen Fromm 1144a21668 Apply logging of arguments to modules (issue #122)
The ohai and facter modules use /usr/bin/logger to log the fact that
they have been invoked.  I added 'import os' to the ping module
so that it could have the same syslog statements as the other modules.
I separated the condensed:
    shlex.split(open(argfile, 'r').read())
into two separate statements similar to the other modules.
13 years ago
Stephen Fromm 7b41e22e56 Change to socket.getfqdn() for fqdn fact 13 years ago
cocoy 7a19a46e24 Bugfix for issue no. 229 13 years ago
Jeroen Hoekx 2dc9a563ef Allow modules to return facts.
If the module result contains "ansible_facts", that will be added to the setup
cache.
13 years ago
Stephen Fromm 0c38bb2fd0 Add native facts to library/setup
This collects various facts from the host so that it isn't necessary to
have facter or ohai installed.  It gets various platform/distribution
facts, information about the type of hardware, whether a virtual
environment and what type, assorted interface facts, and ssh host public
keys.  Most facts are flat.  The two exceptions are 'processor' and all
interface facts.  Interface facts are presented as:
    ansible_lo : {
        "macaddress": "00:00:00:00:00:00",
        "ipv4": { "address": "127.0.0.1", "netmask": "255.0.0.0" },
        "ipv6": [
                    { "address": "::1", "prefix": "128", "scope": "host" }
                ]
    }
13 years ago
Michael DeHaan 1d75a29ec9 Allow variables coming in from the playbook and the API to be expressed as dictionaries throughout their full life cycle
such that nested data can be made available in templates and playbooks.
13 years ago
Michael DeHaan e6406fa5a7 Allow variable expressions to be stored as variables themselves, do some things to allow setup strings
to more easily contain spaces without being mangled, which is neccessary because of the above.
13 years ago
Michael DeHaan 6b152c94b9 Correct the setup module 13 years ago
Michael DeHaan 3ea9174ed7 Split argsfile handling into subfunction, attempt to apply argsfile logic to setup 13 years ago
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.
13 years ago
Michael DeHaan cb5929dad7 Setup module tests 13 years ago
Michael DeHaan be4cb64c92 Relicensing to GPLv3, all previous committers ok'd on mailing list. 13 years ago
Michael DeHaan 320ce8f5f1 If ohai is present, do the same with facter and make it available for the templating engine 13 years ago
Michael DeHaan 186dab4dff Include facter variables for free in setup JSON (prefix with 'facter'.
Also sort keys in JSON file and pretty print
13 years ago
Michael DeHaan 61d064d011 Fixed up KV munging in runner, misc fixes to copy, setup, and template modules 13 years ago
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
13 years ago
Michael DeHaan 440bac4a95 Added remote templating engine using jinja2, see examples/playbook.yml for usage.
Cleanup is due in runner.py
13 years ago
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.
13 years ago