Commit graph

143 commits

Author SHA1 Message Date
mavimo
e5fe7f1afc Double quoted version_added in documentation 2013-03-30 20:44:34 +01:00
Jimmy Tang
fdeccd2d7b Added osrelease and osversion as well as changed the way sysctl is called on OSX 2013-03-15 15:58:45 +00:00
Michael DeHaan
610043a2be Merge pull request #2396 from johanwiren/obsd_facts
Added OpenBSD facts
2013-03-14 08:26:05 -07:00
Johan Wirén
fc46a58e8e Added OpenBSD facts 2013-03-14 13:04:49 +01:00
Michael DeHaan
319c38deac Merge branch 'alpine' of git://github.com/fabaff/ansible into devel
Conflicts:
	library/setup
2013-03-17 23:39:33 -04:00
Michael DeHaan
dc2906f2d7 Merge pull request #2274 from jcftang/setup-osx-facts
Start of more OSX facts for setup
2013-03-10 15:26:41 -07:00
Fabian Affolter
0f3284a7e3 Support for detecting Alpine Linux 2013-03-07 20:06:05 +01:00
Patrik Lundin
239a056c20 Teach setup about OpenBSD package manager.
* We cannot depend on the path because FreeBSD for example uses the same path.
2013-03-03 00:02:50 +01:00
Jimmy Tang
9f48cb0729 Start of more OSX facts for setup
Added a Darwin family, commit acc1c004 had added some network facts
but weren't being shown as the Darwin family wasn't in use. This commit
reveals these facts.

A Darwin(Hardware) class has also been created ready to be populated with
hardware facts.
2013-03-02 08:13:38 +00:00
Michael DeHaan
ae83ebf365 Merge branch 'setup_network2' of git://github.com/nigelm/ansible into devel 2013-03-01 16:25:25 -05:00
Michael DeHaan
950ad99b21 Merge pull request #2226 from skinp/openwrt_support
Adding support for OpenWrt
2013-03-01 07:50:54 -08:00
Jan-Piet Mens
7a48b171f2 Add ISO8601 date/time format to setup
Zulu time and one with microseconds, useful for timestamping
  Add TZ
2013-03-01 09:40:40 +01:00
Josh Mandel
efe45aca53 Add remote user_id to ansible facts 2013-02-28 15:55:31 -08:00
Ton Kersten
f503916485 Squashed commit of the following:
commit 076501459322cf6c14de742e504339d80ffdeed5
Author: Ton Kersten <tonk@tonkersten.com>
Date:   Thu Feb 28 21:32:57 2013 +0100

    Added date and time facts to setup
2013-02-28 21:33:56 +01:00
Nigel Metheringham
ab7d1ec25d Broke BSD ifconfig parser into chunks for subclassing
This allows minor changes to be handled by adding a new
parse line function to the subclass
2013-02-28 09:58:29 +00:00
Nigel Metheringham
bda64afc3b Restructured inheritance of BSD network classes
Now all BSD network classes directly inherit from Network as well as from the generic BSD network class.  This removes the need for itersubclasses().
2013-02-28 09:07:54 +00:00
Patrick Pelletier
e22bd3ca67 Adding support for OpenWrt 2013-02-27 22:16:12 -05:00
Michael DeHaan
6a7d30d2c2 Remove some tab/space issues in previous commits. 2013-02-26 20:30:33 -05:00
Michael DeHaan
362d91004f Fix module docs formatting 2013-02-23 15:11:15 -05:00
Michael DeHaan
114c4f1a2e Docs tweak to setup module. 2013-02-23 12:36:01 -05:00
Michael DeHaan
6997f84e53 Merge branch 'setup_filter_argument' of git://github.com/leucos/ansible into devel 2013-02-23 12:33:00 -05:00
Michael DeHaan
5fa0a01b9b Clean up OS family code 2013-02-23 12:32:51 -05:00
Ton Kersten
268b09f075 Conflicts:
library/setup
2013-02-23 12:32:51 -05:00
Ton Kersten
d6315c0c03 Squashed commit of the following:
commit 1c9b2a6035913969b515862e37e7e1aca24529e0
Author: Ton Kersten <tonk@master.tonkersten.com>
Date:   Tue Feb 19 15:54:36 2013 +0100

    Added osfamily fact
2013-02-23 12:32:51 -05:00
Michel Blanc
981add2561 Optimizes using fnmatch only if needed
Skips fnmatch'ing if there is only a '*' in filter.
2013-02-22 17:41:18 +01:00
Michel Blanc
d80e78a9ae Moved key filtering
Key filtering moved before returning results
2013-02-21 01:10:25 +01:00
Maykel Moya
f93543978e Check presence of files under /proc before opening them 2013-02-20 20:52:45 +01:00
Maykel Moya
a78ee43852 Prevent traceback when /etc/mtab is not available
* get_file_contents returns None when file is not available.
  When /etc/mtab is pointing to /proc/mounts and /proc is not
  mounted, mtab.split will traceback.
2013-02-20 20:52:45 +01:00
Michel Blanc
e7ff689fda Fixes unused var and avoid reassigning keys
Changed code so key doesn't get reassigned in loop
Made use of filtr variable
2013-02-20 19:12:01 +01:00
Michel Blanc
d7385263e3 Added more examples for the filter option in setup
Added examples covering all available globs
Added a use case of filtering only facts returned by facter
2013-02-20 18:13:05 +01:00
Michel Blanc
c5e618ed93 Adds example for filter option in setup module
Added an example on how to filter keys returned by the module.
2013-02-20 17:57:59 +01:00
Michel Blanc
f79f201b1d Adds filter option to setup module
Adds facts filtering using fnmatch, via the 'filter' option.

Usage:
ansible -m setup -a 'filter=ansible_*_mb'
2013-02-20 17:53:14 +01:00
Michael DeHaan
97128ac956 Merge pull request #2138 from bcoca/2137_fix_setup_bsdjails
fixes freebsd setup issues with jails
2013-02-20 05:29:45 -08:00
Brian Coca
8f4cda2d24 fixes freebsd setup issues with jails
Signed-off-by: Brian Coca <bcoca@tablethotels.com>
2013-02-19 18:36:25 -05:00
Michael DeHaan
65b826a8a8 'make pep8' is now clean 2013-02-17 19:48:02 -05:00
Michael DeHaan
455f4b3ba6 Merge branch 'aix-fixes' of git://github.com/dagwieers/ansible into devel
Conflicts:
	library/setup

Tweak formatting.
2013-02-16 13:35:37 -05:00
James Martin
b99beba5e7 Using "OtherLinux" in module_commons, cleander detection in setup. 2013-02-16 13:32:48 -05:00
James Martin
458c50e7a3 Support for amazon linux distribution facts. 2013-02-16 13:32:48 -05:00
Mark Maas
f3c619784e Added support for AIX 5.3 and 6.1
A collegue of mine has added basix AIX support to the setup, user and group modules.

We have tested this on AIX 5.3 and 6.1 and it works "as advertised"
2013-02-14 12:45:08 +01:00
Nigel Metheringham
36e989b201 Mac/FreeBSD Network Facts implementation
Uses a generic BSD Network class, which uses ifconfig and
parses crap out of it.  Modifies the Network __new__
implementation to search further down the subclass
tree
2013-02-13 17:37:17 +00:00
Daniel Hokka Zakrisson
2402bae9ea Clean up device fact gathering
Remove lots of re use that really shouldn't have been re in the first
place. Initialize pcidata even if lspci is unavailable, and check for
its usability before trying to use it.

Fixes #2060.
2013-02-12 18:48:14 +01:00
Kavin Kankeshwar
4f0f946211 Fixing logical error in detecting virtual device.
So In my Centos 5.9 machine, if there is RAID mount ansible will crash, as it cannot find scheduler file. The reason being, this should be a virtual device as there is no "device" folder under e.g. /sys/block/md0/

Here is the crash:

[kk@u1 ansible]$ ansible q3 -m setup -k -u root --tree=/tmp/facts
SSH password:
q3 | FAILED => failed to parse: /sys/block/md0
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-1360629441.14-171498703486275/setup", line 1797, in ?
    main()
  File "/root/.ansible/tmp/ansible-1360629441.14-171498703486275/setup", line 1050, in main
    data = run_setup(module)
  File "/root/.ansible/tmp/ansible-1360629441.14-171498703486275/setup", line 1000, in run_setup
    facts = ansible_facts()
  File "/root/.ansible/tmp/ansible-1360629441.14-171498703486275/setup", line 990, in ansible_facts
    facts.update(Hardware().populate())
  File "/root/.ansible/tmp/ansible-1360629441.14-171498703486275/setup", line 312, in populate
    self.get_device_facts()
  File "/root/.ansible/tmp/ansible-1360629441.14-171498703486275/setup", line 439, in get_device_facts
    m = re.match(".*?(\[(.*)\])", scheduler)
  File "/usr/lib64/python2.4/sre.py", line 129, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer
2013-02-11 18:23:58 -08:00
Daniel Hokka Zakrisson
e8279f0513 Fix setup when /sys/block is inaccessible 2013-02-11 23:24:47 +01:00
Daniel Hokka Zakrisson
75651da37c Fixes for Python 2.4 2013-02-11 23:23:14 +01:00
Brian Coca
775b8a9643 added block device info gathering, full for linux, partial for freebsd added prettyfing byte function Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
moved moutns out of devices Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-02-09 11:15:22 -05:00
Michael DeHaan
1bbe06f92e This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list
shortly.
2013-02-03 20:34:13 -05:00
Shaun Zinck
6a879562b6 add pkgin to list of package managers in setup 2013-01-23 22:12:13 -06:00
John Gosset
a858d1a816 add pacman to list of package managers in setup module 2013-01-23 11:03:05 -05:00
Stephen Fromm
e4964f42e0 Update modules to use run_command in module_common.py
This updates apt, apt_repository, command, cron, easy_install, facter,
fireball, git, group, mount, ohai, pip, service, setup, subversion,
supervisorctl, svr4pkg, user, and yum to take advantage of run_command
in module_common.py.
2013-01-13 08:37:19 -08:00
Daniel Hokka Zakrisson
360701ea43 Handle unreadable /proc/xen/capabilities
Fixes #1854.
2013-01-10 18:22:01 +01:00