ansible/docs/docsite
Rick Elrod 707458cc8c
Make netbsd virtualization facts more specific (#70467)
Change:
Our handling of NetBSD virtualization facts led to facts that were just
plain incorrect. One example is reporting Xen even when the system is
running on something completely different (like KVM).

As stated by the reporter of #69352, NetBSD has a better sysctl setting
to use for this information, machdep.hypervisor.

This PR does the following:

- Try to use machdep.hypervisor sysctl value if the other sysctl values
  we check don't end up with enough information to be useful
- Only look for /dev/xencons and assume Xen if nothing else works
  (Really this should probably return 'unknown' since the file exists on
  non-Xen systems and is not very useful).
- Add a few more patterns (Xen matches and also Hyper-V) to
  VirtualSysctlDetectionMixin#detect_virt_product.

This change is slightly breaking:
- If the first two attempts at using sysctl worked before,
  (machdep.dmi.system-product and machdep.dmi.system-vendor), they will
  continue to work.
- For cases when those values didn't work, previously the existence of
  /dev/xencons was checked, and if found, we reported 'xen' (even on
  non-Xen systems when the file existed). After this PR, we try the
  machdep.hypervisor sysctl key before still falling back to
  /dev/xencons. This means that in some cases, we might go from
  (wrongly) saying "xen" to giving a more accurate value such as "kvm"
  or "Hyper-V".

Test Plan:
- Tested with local NetBSD VM and got 'kvm' instead of 'xen' back.

Tickets:
- Fixes #69352

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-07-07 17:28:13 -05:00
..
_extensions More boilerplate fixes. (#70224) 2020-06-22 19:05:30 -07:00
_static Docs: improve anchors vs. header bar (#67244) 2020-02-11 13:16:26 -05:00
_themes/sphinx_rtd_theme More boilerplate fixes. (#70224) 2020-06-22 19:05:30 -07:00
js/ansible
rst Make netbsd virtualization facts more specific (#70467) 2020-07-07 17:28:13 -05:00
.gitignore
.nojekyll
ansible_2_5.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
ansible_2_6.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
ansible_2_7.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
ansible_2_8.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
ansible_2_9.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
jinja2.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
keyword_desc.yml Add description of collections and become_exe keywords (#68055) 2020-06-25 18:49:57 -05:00
Makefile Turn on linkchecker in sphinx for documentation (#69590) 2020-05-29 11:48:53 -05:00
Makefile.sphinx Adds the ability to override the doc build output directory from the command line. (#36604) 2018-02-28 16:01:18 -08:00
modules.js
python2.inv Add a script to update the intersphinx inventory (#66646) 2020-01-22 17:20:02 -05:00
python3.inv Intersphinx (#68090) 2020-03-06 14:16:35 -08:00
README.md
requirements.txt updated requirements file for docs build (#70020) 2020-06-11 14:47:17 -04:00
variables.dot

Ansible documentation

This project hosts the source behind docs.ansible.com.

To create clear, concise, and consistent contributions to Ansible documentation, please refer to the following information.

Contributions

Contributions to the documentation are welcome.

The Ansible community produces guidance on contributions, building documentation, and submitting pull requests, which you can find in Contributing to the Ansible Documentation.

You can also join the Docs Working Group.

Ansible style guide

Ansible documentation is written in ReStructuredText(RST). The Ansible style guide provides linguistic direction and technical guidelines for working with reStructuredText, in addition to other resources.

Tools

The Ansible community uses a range of tools and programs for working with Ansible documentation. Learn more about Other Tools and Programs in the Ansible Community Guide.

GitHub

Ansible documentation is hosted on the Ansible GitHub project. For GitHub workflows and other information, see the GitHub Guides.