Commit graph

21 commits

Author SHA1 Message Date
Stephen Fromm
8aec2a4ad0 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.
2012-05-30 08:42:05 -07:00
Wes Johnson
557e4ad3b5 starting fresh, doing it 'right'
Lost commit history, but this way I'm not introducing crappy commit
history in RP
2012-05-14 14:31:53 -07:00
Cosmin Luță
3b6717245c Added a new fact: network address for an interface 2012-05-11 17:17:59 +03:00
Stephen Fromm
67ee30f135 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.
2012-05-09 15:19:20 -07:00
Stephen Fromm
b49b8528bf Change to socket.getfqdn() for fqdn fact 2012-04-26 08:39:47 -07:00
cocoy
73349fba36 Bugfix for issue no. 229 2012-04-25 21:02:44 +08:00
Jeroen Hoekx
08ba4928dc Allow modules to return facts.
If the module result contains "ansible_facts", that will be added to the setup
cache.
2012-04-23 21:28:12 +02:00
Stephen Fromm
cfbd9b282b 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" }
                ]
    }
2012-04-17 16:59:23 -07:00
Michael DeHaan
6f2bedc060 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.
2012-04-10 20:58:40 -04:00
Michael DeHaan
582f83a995 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.
2012-03-21 20:00:48 -04:00
Michael DeHaan
36e86abc24 Correct the setup module 2012-03-14 19:06:35 -04:00
Michael DeHaan
45696d5dcc Split argsfile handling into subfunction, attempt to apply argsfile logic to setup 2012-03-14 19:05:19 -04:00
Michael DeHaan
6bee002074 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
cb46a14a96 Setup module tests 2012-04-04 11:55:24 -04:00
Michael DeHaan
1bd1552b43 Relicensing to GPLv3, all previous committers ok'd on mailing list. 2012-02-28 19:08:09 -05:00
Michael DeHaan
2aa5821eaa 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
0ac8aab83e 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
07d17e4cb4 Fixed up KV munging in runner, misc fixes to copy, setup, and template modules 2012-02-26 19:55:26 -05:00
Michael DeHaan
5e6bf63215 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
3e010b9500 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
445a76dbdc 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