Commit Graph

339 Commits (0bbfd3d4e0c5f2876fd0bfe0a035287466f7891a)

Author SHA1 Message Date
biancalana e143d3a75b Better FreeBSD distribution facts (#15866)
* - Give more usable content to distribution_version and set distribution_major_version

* Make python 2.4 friendly
2016-06-14 17:58:23 -04:00
Brian Coca c376954ecf avoid processing bad mtab entries (#16206)
fixes #16174
2016-06-09 15:05:06 -04:00
Brian Coca 2482c687b7 optimize openbsd pkg_mgr fact discovery 2016-06-03 09:54:59 -04:00
Brian Coca c8f0cdbdfd renamed systemd detection function 2016-05-23 15:09:09 -04:00
Michael Scherer f9f6f24acd Add a alias for 'long' since python3 do not have it (#15952) 2016-05-23 10:30:06 -04:00
jctanner 5bb4ee0c1e Avoid duplicate system related fact calls. (#15716)
* Avoid duplicate system related fact calls.

Addresses #1461
2016-05-19 22:34:19 -04:00
Michael Scherer 8680cc7156 Fix pkgin detection on NetBSD 6 and 7 (#15834)
Since this is now the default package manager, it got moved
to another location on Netbsd :

  netbsd# type pkgin
  pkgin is a tracked alias for /usr/pkg/bin/pkgin
  netbsd# uname -a
  NetBSD netbsd.example.org 6.1.4 NetBSD 6.1.4 (GENERIC) amd64

But since the package manager is also used outside of NetBSD, we
have to keep the /opt/local path too.
2016-05-16 10:13:49 -04:00
Michael Scherer e539b2003d Make the facts module run on netbsd (#15833)
It currently fail with

 ansible/module_utils/facts.py\", line 357, in get_service_mgr_facts\r\nKeyError: 'distribution'\r\n"

Since self.facts['distribution'] is used after, we need to make sure
this is set by default and if needed, corrected somewhere for Linux.
2016-05-16 08:02:38 -04:00
Thomas Quinot a2c905c32e Fix uninitialized distribution fact on FreeBSD (#15842)
Initialize facts['distribution'] with self.system so that this fact does
not remain uninitialized on systems_platform_working platforms (FreeBSD,
OpenBSD).

Fixes #15841
2016-05-13 16:57:17 -04:00
Robin Roth 30e5999812 Fix distribution_facts missing on BSD (#15780)
The previous fix in #15773 only solved MacOSX, but left other BSDs broken

fixes #15768
2016-05-09 10:55:28 -04:00
Pomin Wu 78808fc4cc Fixed `ansible_os_family` variable on OS X (#15768) (#15773)
Fixed `ansible_os_family` variable on OS X
2016-05-09 09:59:26 -04:00
Robin Roth 56ba10365c better fix for arch version detection (#15705)
* better fix for arch version detection

fixes  #15696

* be extra safe about tracebacks in facts.py

* add comments to explain the setup
* make allowempty more conservative, ignore file content
* wrap function call in try/except
  * should never happen, but if it happens the bug should be distribtion=N/A and not a traceback
2016-05-04 12:32:08 -07:00
James Pic d72a03deae Add get_distribution_Archlinux (#15696) 2016-05-03 08:20:08 -07:00
Robin Roth 1d6608e84f Dist version fix for Red Hat and more tests (#15663)
* add tests for centos6, rhel6 and rhel7

* gen_distribution_version_testcase with python2.6

* remove unused imports

* fix redhat/vmware/... parsing

* add centos7 test case
2016-04-29 13:18:50 -07:00
Robin Roth b861083dfb move machine_id back to Facts class 2016-04-27 09:29:39 +02:00
Robin Roth 5626c540ce refactor distribution version parsing
* split code as separate class
* split different distributions as individual functions
* keep program logic mostly identical (for now)
* increase readability, reduce complexity/indentation
* make future testing/refactoring easier
* step towards making distribution parsing independent of the Facts class
* add some changes to make facts.py python3 parsable
2016-04-27 09:15:01 +02:00
Robin Roth f7c589b049 get ssh_keys without using distribution info (#15301)
* use list of possible directories directly instead of checking distribution info
* this could fail if someone has keys in one of the other directories, but there could also be custom ssh key directories, which
  are not checked at all
* this is work towards separating Facts from Distribution in facts.py
2016-04-25 12:15:35 -04:00
Adam Hamsik 2424d57868 Add sas_address and sas_device_handle to ansible disk device facts (#15201) 2016-04-25 11:22:46 -04:00
Toshio Kuratomi d7189a442e ziploader currently needs absolute imports to know whether to include another module 2016-04-23 07:25:21 -07:00
Yannig Perre 72f17f3ff3 New get_all_subclasses function in basic modules and use it in fact modules. 2016-04-23 07:24:26 -07:00
Yannig Perre eb18767f91 Visit all network class not just direct sub classes.
Fix for https://github.com/ansible/ansible/issues/15446
2016-04-23 07:24:26 -07:00
Robin Roth 37188ea336 cleanup tests
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
2016-04-15 17:14:14 +02:00
Robin Roth 2b104fe6ad fix tests for SLES and CoreOS
* include #15230
2016-04-15 17:13:59 +02:00
Brian Coca a5a6bcfbbf updated capabilities to new way of module ref 2016-04-13 14:54:34 -04:00
Michael Scherer 74c83a91ed Add caps facts, fix #10360 (#15292) 2016-04-13 14:13:45 -04:00
Wolfgang Karall 7a9b8e43da get_mount_facts -- find bind mounts and add info to options field (#12036)
* get_mount_facts -- find bind mounts and add info to options field

* get_mount_facts -- only run findmnt if get_bin_path() finds the binary
2016-04-13 14:05:50 -04:00
Brian Coca b4b44b2708 Merge pull request #15086 from robinro/patch-2
remove double read of "path" (/etc/SuSE-release) in facts.py
2016-03-22 16:14:51 -07:00
Robin Roth 2c28dcc5cb break after parsing SuSE-release in facts.py
All sections that lead to succesful parsing of the version break afterwards, for SuSE-release this break was missing, potentiall causing #14837
2016-03-22 08:12:17 +01:00
Robin Roth fea5500605 remove double read of "path"
path is already read in line 444, don't reread the file here, but use the existing content
2016-03-22 07:50:04 +01:00
Brian Coca d43fc631dd mount facts now include network mounts (nfs) 2016-03-18 07:28:53 -07:00
Brian Coca 0cb804f0c2 fix lsb fact gathering
was erroring out when rc !=0 also fixed redundant paths
fixes #14965
2016-03-16 17:00:17 -07:00
Toshio Kuratomi 66328e5200 Merge pull request #14967 from ansible/facts-subset-and-cleanup
Facts subset and cleanup
2016-03-15 07:17:58 -07:00
Brian Coca f3b9449e07 don't raise exceptoins on bad hosts files
fixes #14969
2016-03-14 20:13:23 -07:00
Toshio Kuratomi 512825455e Make ohai and facter work via module_utils Fact classes rather than in the setup module 2016-03-14 14:53:29 -07:00
Toshio Kuratomi 5a1e35224b Make changes proposed during review of restrict fact gathering feature:
* Make documentation examples into code blocks
* Make code to call the subsets more general.
* Made min subset always execute (cannot disable it).
* Use a passed in modules parameter rather than global modules.  This is needed for ziploader
* Remove unneeded __init__()
* Remove uneeded multiple inheritance from a base class
* gather_facts is now a list type
2016-03-14 14:53:29 -07:00
Yannig Perré 88772b6003 Add a way to restrict gathered facts in Ansible:
- Using gather_subset options
- By ignoring ohai/chef or facter/puppet facts
2016-03-14 14:53:28 -07:00
Matt Martz 2f90a4f4e2 Strip proc_1 before testing it. Fixes #14858 2016-03-08 07:42:42 -06:00
Brian Coca 5aab158987 removed unused imports 2016-03-06 09:14:25 -05:00
Brian Coca 27a33a6f18 dont erase previous nameservers in fact gathering
fixes #14806
2016-03-04 11:34:44 -05:00
James Cammarata 2c7a33f71d Fixing bug in setup related to StringIO fixes 2016-03-02 08:05:43 -05:00
Matt Martz e27eb73cba sys.subversion unavailable in py24. Fixes #14704 2016-02-29 09:05:48 -06:00
Toshio Kuratomi b70bf3b056 Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3 2016-02-26 16:43:05 -08:00
Matt Martz d9a207f24f Add has_sslcontext fact as well 2016-02-23 11:28:04 -06:00
Matt Martz 7158eb489f Add python info to facts 2016-02-23 10:38:41 -06:00
Brian Coca d9246aacd0 fixed mount sizes for linux 2016-02-20 14:46:18 -05:00
Brian Coca f1d2b9ea9e added size to mount facts on all non linux OSs
fixes #14528
2016-02-20 14:40:42 -05:00
Brian Coca 547afda8d4 Merge pull request #14546 from furlongm/devel
fix ansible_os_family fact on openSUSE Leap
2016-02-20 12:46:27 -05:00
Marc Pujol 6779f91b88 Avoid duplicate /bin/lsblk calls in the setup module.
The setup module calls /bin/lsblk once for each device appearing in the /etc/mtab file. However, the same device appears there mutliple times when the system uses bind-mounts. As a result, /bin/lsblk is being called repeatedly to get the uuid of the same device.

On a system with many mounts, this leads to a TimeoutError in the get_mount_facts function of the setup module as described in #14551.

Fixes #14551
2016-02-18 09:15:07 +01:00
Marcus Furlong 90fb809f62 fix ansible_os_family fact on openSUSE Leap
ansible_os_family on openSUSE Leap has the wrong value:

        "ansible_os_family": "openSUSE Leap",

It should be:

        "ansible_os_family": "Suse",

This change fixes that by adding the relevant key and ensuring that dict
lookups replace ' ' with '_' so the key does not contain a space.
2016-02-18 14:36:52 +11:00
Brian Coca 46ce9a0016 Merge pull request #13883 from shaba/devel
Add support ssh configs from /etc/openssh.
2016-02-08 10:27:44 -05:00
Brian Coca a584ab3420 Merge pull request #11113 from sysadmin75/11104_osx_facts_bridge
Fixes OSX fact gathering for the bridge interface.
2016-02-02 00:46:21 -05:00
Toshio Kuratomi 315fd15f69 Merge pull request #12909 from photoninger/sles11.4-fix_2nd_try
Fix for SLES 11.4, which has now also an /etc/os-release file.
2016-01-29 09:11:51 -08:00
Matt Martz d49b11e996 Only use os.path.basename if get_file_content returned a value, and ensure that service_mgr has line endings stripped. Fixes #14026 2016-01-20 13:08:16 -06:00
Brian Coca a773486432 fixed exception handling to be 2.4 compatible
previous 'fix' broke on 2.4
2016-01-19 08:31:53 -05:00
Brian Coca 5dd2aad535 ignore exceptions in get_file_contents
it should be common enough to not be able to read files in some jailed/container environments
even though permissions tell us otherwise
2016-01-18 21:55:56 -05:00
Brian Coca 83069a38d5 better init detection 2016-01-18 15:17:43 -05:00
Alexey Shabalin 9be8ecda06 Add support ssh configs from /etc/openssh.
In Altlinux system config dir for openssh is /etc/openssh.
2016-01-14 13:01:49 +03:00
Alexey Shabalin 0b32e1586d add detect Altlinux distributive 2016-01-13 19:20:59 +03:00
Brian Coca bb2935549f corrected service detection in docker versions
now if 1 == bash it falls back into tool detection
2015-12-19 16:16:10 -05:00
David L Ballenger 970d7cadb7 Add ssh_host support for MacOSX El Capitan.
OS X El Capitan moved the /etc/ssh_* files into /etc/ssh/. This fix
adds a distribution version check for Darwin to set the keydir
appropriately on El Capitan and later.
2015-12-08 07:11:02 -08:00
Brian Coca 37ae243587 made get_file_lines rely on get_file_content which deals with many error
conditions that the former did not.
2015-11-10 13:22:45 -08:00
ghislainbourgeois eb850d7e5b Fix get_dns_facts on inexistent resolv.conf 2015-11-09 15:02:03 -05:00
Alexander Gubin 215fc12234 Add SLES_SAP as a Suse family 2015-11-06 09:42:39 +01:00
Toshio Kuratomi 9ce3adbeb1 remove assigned but unused variables in module_utils.
These were mostly saving exceptions but not using them.  Getting rid of
those will help with eventually running modules via either python2.4 or
python3.x.
2015-11-03 09:53:18 -08:00
Brian Coca 8d3da20302 fixed bsd service_mgr_facts using removed check_init fucntion 2015-11-03 11:43:50 -05:00
Brian Coca a1a5dadef6 remove uneeded module 2015-11-02 15:36:11 -05:00
Brian Coca d194e2c788 check_systemd is not inline but a private fact function now 2015-11-02 15:23:47 -05:00
Brian Coca e9efd008ed moved distutils import to mac, darn solaris would complain in certain cases 2015-11-02 15:23:47 -05:00
Brian Coca 99d775a0c1 fact gathering service_mgr info
also added dragonfly facts support
2015-11-02 15:23:47 -05:00
Toshio Kuratomi 1bc75374dc Add imports for stdlib modules that are used.
This is cleanup that will aid us when we get ziploader implemented for 2.1
2015-11-02 12:02:26 -08:00
Brian Coca f528ad1848 added xbps pkg mgr to facts 2015-10-31 22:03:12 -04:00
Bernhard Lichtinger 00ccd2ee6e Fix for SLES 11.4, which has now also an /etc/os-release file. 2015-10-26 14:22:21 +01:00
Brian Coca 7b64126c9d pushed up openvz detection for cases of 'stacked' virtualization 2015-09-30 11:27:50 -04:00
Linus Unnebäck 45f9800754 facts: correctly detect docker inside a xen host 2015-09-30 17:08:21 +02:00
Toshio Kuratomi 056a020357 Do not fail if /proc/uptime is not present
This can happen in chroot environments that don't have all of /proc
available
2015-09-26 10:00:28 -07:00
Gerben Geijteman 4c20964475 Add Weekday (0-6) as a number and add weeknumber (00-52) 2015-09-24 15:05:44 +02:00
Brian Coca 11707576a3 fix for AIX network facts
fixes #12434
2015-09-18 10:43:53 -04:00
Toshaan Bharvani 4702d2be09 added Manjaro as an Archlinux family 2015-09-05 12:49:20 +02:00
maty0609 6f24e6f994 Adding support for Archlinux and Slackware in fallback
In some cases Archlinux and Slackware is not detected by
platform.dist(). This should solve the issue.
2015-08-27 10:22:02 +01:00
Brian Coca c6733cc1a7 Merge pull request #9225 from qvicksilver/aix_unprivileged
AIX unprivileged facts collection
2015-08-12 23:48:44 -04:00
Brian Coca 6bceee9a93 now lvs/vg facts are only attempted if binary found 2015-08-12 10:53:13 -04:00
Alexander Gubin 1ea1b9fb13 bugfix: missing path for lvm facts 2015-08-12 16:35:31 +02:00
Brian Coca ae9d264b86 Merge pull request #11762 from amenonsen/9795-rebase
Add LVM facts to setup module
2015-08-12 08:55:08 -04:00
Brian Coca 08e6c1d82b avoid possible errors with new broadcast handling in linux 2015-08-06 09:00:52 -04:00
Brian Coca 262c75c253 Merge pull request #10971 from mightydok/debbraoadcastfix
Add missed broadcast address to linux network facts.
2015-08-06 08:52:55 -04:00
Brian Coca 2b9b3a08a1 make sure you only update pci data if there is a match 2015-08-05 09:44:37 -04:00
Jonathan Süssemilch Poulain 02294c52ce Typo 2015-07-31 13:25:42 +02:00
Jonathan Süssemilch Poulain 4614a574ea Allows network network interface facts collection as an unprivileged user and adds more facts 2015-07-31 10:39:02 +02:00
Jonathan Süssemilch Poulain e181bcf62b Allows to fetch machine architecture as an unprivileged user 2015-07-31 10:35:10 +02:00
Brian Coca b37be236d9 Merge pull request #11475 from nibalizer/cfacter_support
Use cfacter instead of facter if possible
2015-07-29 22:46:21 -04:00
Brian Coca 527ae360b0 Merge pull request #10652 from vodik/nspawn
Support querying systemd container information
2015-07-29 21:51:58 -04:00
Brian Coca 80ecab5317 Merge pull request #11761 from amenonsen/9843-rebase
Add pciid to LinuxNetwork interface fact
2015-07-27 22:20:04 -04:00
Hugh Saunders f344ec463f Add LVM facts to setup module
This commit adds LinuxHardware.get_device_facts() and calls that from
.populate().

LVM facts are only gathered if the setup module is running as root and
the lvm utilities are available (tested by searching for 'vgs').

If the conditions are met, facts are set for each volume group and
logical volume.

Example:

Test LVM Data:
$ sudo vgs
  VG   #PV #LV #SN Attr   VSize VFree
  test   1   2   0 wz--n- 5.00g 2.00g
$ sudo lvs
  LV      VG   Attr      LSize Pool Origin Data%  Move Log Copy%  Convert
  testlv  test -wi-a---- 1.00g
  testlv2 test -wi-a---- 2.00g

Facts Returned:
$ ansible localhost -i /tmp/inv -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {
        "ansible_lvm": {
            "lvs": {
                "testlv": {
                    "size_g": "1.00",
                    "vg": "test"
                },
                "testlv2": {
                    "size_g": "2.00",
                    "vg": "test"
                }
            },
            "vgs": {
                "test": {
                    "free_g": "2.00",
                    "num_lvs": "2",
                    "num_pvs": "1",
                    "size_g": "5.00"
                }
            }
        }
    },
    "changed": false
}

Test as non-root:
$ ansible localhost -i /tmp/inv-user -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {},
    "changed": false
}

Test without lvm utilities available
$ sudo mv /sbin/vgs{,.bk}
$ ansible localhost -i /tmp/inv -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {},
    "changed": false
}
2015-07-28 07:46:01 +05:30
Brian Coca 5f8db9cd4b changed verbose_override to the new _ansible_verbose_override to keep in line with previous changes
output now defaults back to having indent=4
2015-07-27 22:15:44 -04:00
Trapier Marshall 250620f2ab Add pciid to LinuxNetwork interface fact
This commit adds pciid to the LinuxNetwork fact object.

pciid is gathered if the symlink /sys/class/net/*/device exists.

Example [>>>> emphasis <<<<]:

$ readlink /sys/class/net/eth0/device
../../../0000:01:00.0

$ ansible localhost --ask-pass -i /tmp/hosts -m setup -a "filter=ansible_eth0"
SSH password:
localhost | success >> {
    "ansible_facts": {
        "ansible_eth0": {
            "active": false,
            "device": "eth0",
            "macaddress": "0c:d2:92:5d:6e:8e",
            "module": "alx",
            "mtu": 1500,
       >>>> "pciid": "0000:01:00.0", <<<<
            "promisc": true,
            "type": "ether"
        }
    },
    "changed": false
}
2015-07-28 07:30:03 +05:30
Brian Coca 8746e692c1 changed check to allow for powerpc
fixes #11528
2015-07-27 21:44:17 -04:00
Reed Loden eb1fb41576 Add several DNS-related facts by parsing /etc/resolv.conf
Facts include nameservers, domain, search path, sortlist, and options.
2015-07-26 10:46:59 -07:00
Toshio Kuratomi ddec06ccfe Detect the old python-json library
Fixes #11654
2015-07-20 12:35:26 -07:00
Brian Coca 03d7c8d7ca fixed new HPUX networking facts 2015-07-20 10:27:04 -04:00
Brian Coca 91f2acb029 Merge pull request #10203 from pdelared/devel
Add HP-UX network facts
2015-07-20 10:16:31 -04:00
Indrajit Raychaudhuri 4553a41ab5 Add homebrew to package managers' list 2015-07-18 19:46:26 -05:00
Jon Hadfield 82e00b1022 add facts for datetime 8601 basic and basic short. 2015-07-05 17:23:22 +01:00
Spencer Krum 3887173c2c Use cfacter instead of facter if possible
CFacter is the facter replacement written in C++. It is available from
the puppetlabs repo.
2015-07-04 09:13:20 -07:00
verm666 d91947ee96 facts: add aliases to ansible_all_ipv4_addresses on OpenBSD 2015-07-02 15:36:56 +03:00
James Cammarata 7fa37870c8 Merge pull request #9683 from justinwyer/logical-block-size-and-sectors-9549
Disk size for advanced drives over 2 TB is incorrect
2015-07-01 14:14:04 -04:00
Brian Coca d7fcd9456a Merge pull request #11288 from kstrauser/aixfixes
Don't panic if AIX's uname doesn't support -W
2015-06-16 19:02:50 -04:00
Kirk Strauser eb820837ac Don't panic if AIX's uname doesn't support -W
The current code expects "uname -W" on AIX to always succeed. The AIX 5
instance I have doesn't support the -W flag and facts gathering always
crashes on it.

This skips some WPAR handling code if "uname -W" doesn't work.
2015-06-16 15:26:02 -07:00
Kirk Strauser 935da01068 Fixes for FreeBSD get_memory_facts
- swapinfo on FreeBSD 6 (maybe 7 too?) doesn't support the "-m" flag for
  fetching amounts in megabytes. This patch fetches amounts in kilobytes
  and divides by 1024 (and also returns the result as an int instead of
  a string).

- When no swap is configured, swapinfo prints a header line and nothing
  else:

    $ swapinfo
    Device         1K-blocks     Used    Avail Capacity

  The old version unexpectedly parsed that header line and emitted
  nonsense values like:

    "ansible_swapfree_mb": "Avail"
    "ansible_swaptotal_mb": "1K-blocks"

  This version emits those items altogether.
2015-06-16 14:35:36 -07:00
Brian Coca f174682e19 facts should now not be overriten with NA option unless they are NA
this way we don't need a break per distro that matched already with
the python default functions
2015-06-11 00:48:40 -04:00
James Cammarata e547e1f9ba Merge branch 'devel' into devel_switch_v2 2015-06-01 16:53:15 -05:00
sysadmin75 d2db7bad1b Fixes OSX fact gathering for the bridge interface. Issue #11104 2015-06-01 13:23:28 -04:00
sysadmin75 816b20af0b Fixes #11046 2015-06-01 10:24:20 -04:00
sysadmin75 908d6c0ef2 Fixes #11046 2015-05-31 20:05:02 -04:00
Brian Coca 7e020d21de correctly identify ubuntu now in all cases
made NA the last resort
2015-05-29 16:19:09 -04:00
Brian Coca a8c290cc3b fixed ubuntu facts for all versions
made sure NA is option of last resort
2015-05-29 16:14:30 -04:00
Stefan Midjich e5190327f2 this fixes ansible on openbsd and freebsd systems. only tested on openbsd. 2015-05-28 19:17:31 -04:00
Stefan Midjich 540c23dfce this fixes ansible on openbsd and freebsd systems. only tested on openbsd. 2015-05-26 12:04:35 -04:00
Till Maas 02d784598f facts: Simplify ssh key fetching 2015-05-15 22:36:13 +02:00
Till Maas e7846343e5 facts: Add ed25519 ssh pubkey 2015-05-15 22:25:20 +02:00
Vitaliy Okulov 0c305b72cd Fix align again, strange vim error. ansible/ansible#10917 2015-05-11 14:33:50 +00:00
Vitaliy Okulov 31b0ffafa8 Align fix for ansible/ansible#10917 2015-05-10 14:43:36 +00:00
Vitaliy Okulov ad9981f565 Fix for ansible/ansible#10917
Add missing broadcast addr for network facts for Linux
2015-05-10 14:37:46 +00:00
Brian Coca 4e85419257 Merge pull request #10853 from cgar/spelling
just a few spelling error changes

I swear only 95% of those are mine!
2015-04-30 09:02:09 -04:00
Brian Coca 6a8062baad accidentally 'fixes' ubuntu distribution parsing, this order should not matter, need followup to figure out why this is the case 2015-04-28 10:16:14 -04:00
Carlos E. Garcia cfbfd38723 just a few spelling error changes 2015-04-28 09:36:42 -04:00
Peter Oliver d8be6fec65 Consistently use "OracleLinux" in OS detection.
Previously, a mixture of "OracleLinux" and "Oracle Linux" was used,
causing the `ansible_os_family` fact not to be set to `RedHat`.

Fixes #10742.
2015-04-19 17:00:35 +01:00
Brian Coca 65be14e8b4 Merge pull request #10757 from jeffrizzo/netbsd_facts
Set distribution, release, and version for NetBSD.
2015-04-17 13:51:45 -04:00
Brian Coca 2e9c028c6c Merge pull request #10747 from bcoca/fix_lsblk_missing
adjusted for the posibolity of lsblk not existing for fact gathering
2015-04-17 11:12:29 -04:00
Jeff Rizzo 5c64956a7e Set distribution, release, and version for NetBSD. 2015-04-16 16:43:38 -07:00
Simon Gomizelj a0c34da779 Support querying systemd container information
systemd writes a /run/systemd/container file in any container it starts
to make it really easy to detect the container type. This adds support
for detecting systemd-nspawn containers (and any other container format
that will write data there for compatibility).
2015-04-16 14:27:50 -04:00
Michael Scherer b4f02625cd Add CoreOS facts detection, fix https://github.com/ansible/ansible-modules-core/issues/1000 2015-04-16 13:04:23 -04:00
Brian Coca ec01e071d8 adjusted for the posibolity of lsblk not existing for fact gathering 2015-04-16 11:57:51 -04:00
Michael Scherer f624ec4cb8 Prefer dnf to yum.
On Fedora 22 and later, yum is deprecated and dnf is installed by
default. However, the detection do not seems to take this in account,
and always use yum, even when yum cli is just a wrapper to tell "use
dnf", as this is the case on F22 and later ( see package dnf-yum ).

As dnf is not installed by default, except on F22, this shouldn't
break anything.
2015-04-15 16:11:08 -04:00
Brian Coca 62c08d96e5 fixed another typo 2015-04-13 10:58:17 -04:00
Brian Coca 89cc54cc16 typo fix 2015-04-13 10:50:24 -04:00
Brian Coca 1c796543c9 fix for when calling bootinfo throws permmission errors (AIX)
fixes https://github.com/ansible/ansible-modules-core/issues/1108
2015-04-08 03:30:21 -04:00
Jason DeTiberus 43775daa4b Fix indentation 2015-04-06 16:47:52 -04:00
Eri Bastos d4eddabb2a Patch for bug #10485 - ansible_distribution fact populates as 'RedHat' on Oracle Linux systems 2015-03-20 14:40:44 -03:00
Brian Coca 5eae435357 removed Darwin get_uptime_facts as it seems to crash on OS X, will waiy for a
patch tested by someone that has access to the platform
2015-03-16 13:41:36 -04:00
Chris Blumentritt 7813ffd719 Adding uptime_seconds fact for linux and darwin platforms
Adds ansible_uptime_seconds facts for linux and darwin platforms.  BSD
platforms may also work.
2015-03-13 15:52:16 -05:00
Toshio Kuratomi 8c3b5690e5 Merge pull request #10357 from htgoebel/devel
Fix detect of docker as virtualization_type.
2015-03-13 11:40:15 -07:00
Brian Coca 17c710e713 Merge pull request #10420 from bmanojlovic/devel
add missing AIX network facts discovery
2015-03-10 15:59:34 -04:00
Boris Manojlovic a59784a581 don't use full path to command instead use module.get_bin_path 2015-03-10 19:44:39 +01:00
Boris Manojlovic 0f4cf8cb43 add missing AIX network facts discovery 2015-03-10 15:19:29 +01:00
pyroscope d0197195ed Handle /etc/os-release files with 'Raspbian' in them 2015-03-10 08:41:21 +01:00
riedel 29cca0191b Adding oVirt recognition for oVirt guests. oVirt uses KVM. 2015-03-07 10:17:41 -05:00
Brian Coca 761540e9fd Merge pull request #10392 from sgordon46/devel
facts.py throws exception when run on RHEV hypervisor #10383
2015-03-05 12:09:49 -05:00
Brian Coca aed493158c Merge pull request #9428 from landryb/openbsd_add_mount_facts
parse /etc/fstab on OpenBSD to get mount facts
2015-03-05 12:07:27 -05:00
Stephen Gordon b44bf0379b facts.py throws exception when run on RHEV hypervisor #10383 2015-03-05 10:28:26 -06:00
Hartmut Goebel 8758ae201d Fix detect of docker as virtualization_type.
Not only match`/docker/`, but also `docker-` followed by a hex-id.

Example (shortened):
```
$ cat /proc/1/cgroup
8:blkio:/system.slice/docker-de73f4d207861cf8757b69213ee67bb234b897a18bea7385964b6ed2d515da94.scope
7:net_cls:/
```
2015-02-28 14:13:58 +01:00