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