Commit Graph

242 Commits (4b5203c5fb00ede6790bf48fac1d926e9b626bf4)

Author SHA1 Message Date
Lars Fredriksen 4b5203c5fb add holders to partitions (#16446)
* add holders to partitions

* make holder gathering a function
10 years ago
Zempashi af150ea43a Fix linux 'ip' stdout parsing. (#16170)
With network-manager in debian (stretch) and openvpn connection enabled
the output for ipv6 is different and include a 'peer' keyword.

Fixes #15448
10 years ago
Nate Coraor 706778ee7f Fix distro detection for Solaris derivatives 10 years ago
biancalana e143d3a75b Better FreeBSD distribution facts (#15866)
* - Give more usable content to distribution_version and set distribution_major_version

* Make python 2.4 friendly
10 years ago
Brian Coca c376954ecf avoid processing bad mtab entries (#16206)
fixes #16174
10 years ago
Brian Coca 2482c687b7 optimize openbsd pkg_mgr fact discovery 10 years ago
Brian Coca c8f0cdbdfd renamed systemd detection function 10 years ago
Michael Scherer f9f6f24acd Add a alias for 'long' since python3 do not have it (#15952) 10 years ago
jctanner 5bb4ee0c1e Avoid duplicate system related fact calls. (#15716)
* Avoid duplicate system related fact calls.

Addresses #1461
10 years ago
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.
10 years ago
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.
10 years ago
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
10 years ago
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
10 years ago
Pomin Wu 78808fc4cc Fixed `ansible_os_family` variable on OS X (#15768) (#15773)
Fixed `ansible_os_family` variable on OS X
10 years ago
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
10 years ago
James Pic d72a03deae Add get_distribution_Archlinux (#15696) 10 years ago
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
10 years ago
Robin Roth b861083dfb move machine_id back to Facts class 10 years ago
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
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