Brian Coca
e971a63c33
avoid processing bad mtab entries ( #16206 )
...
fixes #16174
(cherry picked from commit c376954ecf )
10 years ago
Michael Scherer
e0112a3db3
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.
10 years ago
Toshio Kuratomi
e9406bcfd3
Backport some python3 fixes for facts
10 years ago
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
10 years ago
Adam Hamsik
2424d57868
Add sas_address and sas_device_handle to ansible disk device facts ( #15201 )
10 years ago
Toshio Kuratomi
d7189a442e
ziploader currently needs absolute imports to know whether to include another module
10 years ago
Yannig Perre
72f17f3ff3
New get_all_subclasses function in basic modules and use it in fact modules.
10 years ago
Yannig Perre
eb18767f91
Visit all network class not just direct sub classes.
...
Fix for https://github.com/ansible/ansible/issues/15446
10 years ago
Robin Roth
37188ea336
cleanup tests
...
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
10 years ago
Robin Roth
2b104fe6ad
fix tests for SLES and CoreOS
...
* include #15230
10 years ago
Brian Coca
a5a6bcfbbf
updated capabilities to new way of module ref
10 years ago
Michael Scherer
74c83a91ed
Add caps facts, fix #10360 ( #15292 )
10 years ago
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
10 years ago
Brian Coca
b4b44b2708
Merge pull request #15086 from robinro/patch-2
...
remove double read of "path" (/etc/SuSE-release) in facts.py
10 years ago
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
10 years ago
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
10 years ago
Brian Coca
d43fc631dd
mount facts now include network mounts (nfs)
10 years ago
Brian Coca
0cb804f0c2
fix lsb fact gathering
...
was erroring out when rc !=0 also fixed redundant paths
fixes #14965
10 years ago
Toshio Kuratomi
66328e5200
Merge pull request #14967 from ansible/facts-subset-and-cleanup
...
Facts subset and cleanup
10 years ago
Brian Coca
f3b9449e07
don't raise exceptoins on bad hosts files
...
fixes #14969
10 years ago
Toshio Kuratomi
512825455e
Make ohai and facter work via module_utils Fact classes rather than in the setup module
10 years ago
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
10 years ago
Yannig Perré
88772b6003
Add a way to restrict gathered facts in Ansible:
...
- Using gather_subset options
- By ignoring ohai/chef or facter/puppet facts
10 years ago
Matt Martz
2f90a4f4e2
Strip proc_1 before testing it. Fixes #14858
10 years ago
Brian Coca
5aab158987
removed unused imports
10 years ago
Brian Coca
27a33a6f18
dont erase previous nameservers in fact gathering
...
fixes #14806
10 years ago
James Cammarata
2c7a33f71d
Fixing bug in setup related to StringIO fixes
10 years ago
Matt Martz
e27eb73cba
sys.subversion unavailable in py24. Fixes #14704
10 years ago
Toshio Kuratomi
b70bf3b056
Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3
10 years ago
Matt Martz
d9a207f24f
Add has_sslcontext fact as well
10 years ago
Matt Martz
7158eb489f
Add python info to facts
10 years ago
Brian Coca
d9246aacd0
fixed mount sizes for linux
10 years ago
Brian Coca
f1d2b9ea9e
added size to mount facts on all non linux OSs
...
fixes #14528
10 years ago
Brian Coca
547afda8d4
Merge pull request #14546 from furlongm/devel
...
fix ansible_os_family fact on openSUSE Leap
10 years ago
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
10 years ago
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.
10 years ago
Brian Coca
46ce9a0016
Merge pull request #13883 from shaba/devel
...
Add support ssh configs from /etc/openssh.
10 years ago
Brian Coca
a584ab3420
Merge pull request #11113 from sysadmin75/11104_osx_facts_bridge
...
Fixes OSX fact gathering for the bridge interface.
10 years ago
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.
10 years ago
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
10 years ago
Brian Coca
a773486432
fixed exception handling to be 2.4 compatible
...
previous 'fix' broke on 2.4
10 years ago
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
10 years ago
Brian Coca
83069a38d5
better init detection
10 years ago
Alexey Shabalin
9be8ecda06
Add support ssh configs from /etc/openssh.
...
In Altlinux system config dir for openssh is /etc/openssh.
10 years ago
Alexey Shabalin
0b32e1586d
add detect Altlinux distributive
10 years ago
Brian Coca
bb2935549f
corrected service detection in docker versions
...
now if 1 == bash it falls back into tool detection
10 years ago
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.
10 years ago
Brian Coca
37ae243587
made get_file_lines rely on get_file_content which deals with many error
...
conditions that the former did not.
10 years ago
ghislainbourgeois
eb850d7e5b
Fix get_dns_facts on inexistent resolv.conf
10 years ago
Alexander Gubin
215fc12234
Add SLES_SAP as a Suse family
10 years ago