Commit Graph

142 Commits (c3f122fb6afa8ac339765b18fa99d7255fb42418)

Author SHA1 Message Date
Jimmy Tang fdeccd2d7b Added osrelease and osversion as well as changed the way sysctl is called on OSX 12 years ago
Michael DeHaan 610043a2be Merge pull request #2396 from johanwiren/obsd_facts
Added OpenBSD facts
12 years ago
Johan Wirén fc46a58e8e Added OpenBSD facts 12 years ago
Michael DeHaan 319c38deac Merge branch 'alpine' of git://github.com/fabaff/ansible into devel
Conflicts:
	library/setup
12 years ago
Michael DeHaan dc2906f2d7 Merge pull request #2274 from jcftang/setup-osx-facts
Start of more OSX facts for setup
12 years ago
Fabian Affolter 0f3284a7e3 Support for detecting Alpine Linux 12 years ago
Patrik Lundin 239a056c20 Teach setup about OpenBSD package manager.
* We cannot depend on the path because FreeBSD for example uses the same path.
12 years ago
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.
12 years ago
Michael DeHaan ae83ebf365 Merge branch 'setup_network2' of git://github.com/nigelm/ansible into devel 12 years ago
Michael DeHaan 950ad99b21 Merge pull request #2226 from skinp/openwrt_support
Adding support for OpenWrt
12 years ago
Jan-Piet Mens 7a48b171f2 Add ISO8601 date/time format to setup
Zulu time and one with microseconds, useful for timestamping
  Add TZ
12 years ago
Josh Mandel efe45aca53 Add remote user_id to ansible facts 12 years ago
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
12 years ago
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
12 years ago
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().
12 years ago
Patrick Pelletier e22bd3ca67 Adding support for OpenWrt 12 years ago
Michael DeHaan 6a7d30d2c2 Remove some tab/space issues in previous commits. 12 years ago
Michael DeHaan 362d91004f Fix module docs formatting 12 years ago
Michael DeHaan 114c4f1a2e Docs tweak to setup module. 12 years ago
Michael DeHaan 6997f84e53 Merge branch 'setup_filter_argument' of git://github.com/leucos/ansible into devel 12 years ago
Michael DeHaan 5fa0a01b9b Clean up OS family code 12 years ago
Ton Kersten 268b09f075 Conflicts:
library/setup
12 years ago
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
12 years ago
Michel Blanc 981add2561 Optimizes using fnmatch only if needed
Skips fnmatch'ing if there is only a '*' in filter.
12 years ago
Michel Blanc d80e78a9ae Moved key filtering
Key filtering moved before returning results
12 years ago
Maykel Moya f93543978e Check presence of files under /proc before opening them 12 years ago
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.
12 years ago
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
12 years ago
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
12 years ago
Michel Blanc c5e618ed93 Adds example for filter option in setup module
Added an example on how to filter keys returned by the module.
12 years ago
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'
12 years ago
Michael DeHaan 97128ac956 Merge pull request #2138 from bcoca/2137_fix_setup_bsdjails
fixes freebsd setup issues with jails
12 years ago
Brian Coca 8f4cda2d24 fixes freebsd setup issues with jails
Signed-off-by: Brian Coca <bcoca@tablethotels.com>
12 years ago
Michael DeHaan 65b826a8a8 'make pep8' is now clean 12 years ago
Michael DeHaan 455f4b3ba6 Merge branch 'aix-fixes' of git://github.com/dagwieers/ansible into devel
Conflicts:
	library/setup

Tweak formatting.
12 years ago
James Martin b99beba5e7 Using "OtherLinux" in module_commons, cleander detection in setup. 12 years ago
James Martin 458c50e7a3 Support for amazon linux distribution facts. 12 years ago
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"
12 years ago
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
12 years ago
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.
12 years ago
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
12 years ago
Daniel Hokka Zakrisson e8279f0513 Fix setup when /sys/block is inaccessible 12 years ago
Daniel Hokka Zakrisson 75651da37c Fixes for Python 2.4 12 years ago
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>
12 years ago
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.
12 years ago
Shaun Zinck 6a879562b6 add pkgin to list of package managers in setup 12 years ago
John Gosset a858d1a816 add pacman to list of package managers in setup module 12 years ago
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.
12 years ago
Daniel Hokka Zakrisson 360701ea43 Handle unreadable /proc/xen/capabilities
Fixes #1854.
12 years ago
Michael DeHaan 4301a33b97 Streamline code 12 years ago