Commit graph

51649 commits

Author SHA1 Message Date
Sviatoslav Sydorenko
346c7a765d
Use sphinx_ansible_theme Sphinx theme in docs (#74318) 2021-06-08 14:38:23 -05:00
Abhijeet Kasurde
d9001f8fd0
Fix intro docs (#74843) 2021-06-08 09:27:21 +05:30
Brian Coca
6d2398db28
expand doc snippets to lookups and other plugins (#74403)
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
2021-06-07 16:21:25 -04:00
Sam Doran
004c33d9c5
unarchive - do not fail in init when trying to find required binary (#74892)
Test for the required binaries in the can_handle_archive() method and fail there. This
prevents failures for missing binaries unrelated to the archive type.

* Update missing zip binary message to match tar message
* Update unit tests
* Add integration tests
* Define packages based on the system rather than ignoring failures
2021-06-07 12:59:06 -04:00
Felix Fontein
acf09e56a2
Update inventory script references from c.g to ansible-community/contrib-scripts. (#74905) 2021-06-07 11:37:39 -05:00
Brian Coca
5dd8dc8fd0
minor service_mgr facts fixes (#74894)
* minor service_mgr facts fixes

  handle case in which ps command fails or returns empty
  updated tests since it now does keep trying to detect after ps fails
2021-06-04 15:28:41 -04:00
Brian Coca
6840b79e56
bring back async_status module for direct callers
also, deprecate it, they should use action instead
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-04 13:01:26 -04:00
s-hamann
e2658801f6
Add seed parameter to password lookup (#69775) 2021-06-04 12:20:44 -04:00
Matt Martz
ffa548503d
Wrap all results, regardless of register, except for actions with clean facts (#73161)
* Wrap all results, regardless of register, except for actions with clean facts. Fixes #21088

* ci_complete

* Add tests

* Add clog frag
2021-06-04 16:40:53 +02:00
Hideki Saito
e70fc88656
slurp - better error handling for unreadable files and directories (#68608) 2021-06-04 10:38:23 -04:00
Brian Coca
26827f5039
ansible-doc fix displaying 'CLI' options for plugin docs
cli options will now display either use provided info, or automating from the name


Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2021-06-04 10:22:39 -04:00
Brian Coca
6a883f1cd6
better message and timeout warning when timeout (#74885)
* better message and timeout warning when timeout
2021-06-04 10:21:12 -04:00
twalsh-uod
3d8feed2cf
Update playbooks_filters.rst (#74911)
Fix typo: 'sting' -> 'string'
2021-06-04 17:50:19 +05:30
Alicia Cozine
33924d7e8d
gives each banner a unique div ID (#74907)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-06-03 16:51:31 -04:00
Martin Krizek
4f3ee4624e
Add end_batch meta task (#74899)
* Add end_batch meta task

* Add note

* Fix sanity
2021-06-04 05:17:19 +10:00
Matt Martz
ac77911491
Prevent conditional templating errors from masking task output. Fixes #37187 (#74891) 2021-06-04 05:11:01 +10:00
Abhijeet Kasurde
8f82e6327f
ansible-cli: Remove unnessary trailing space (#74880)
Fixes: #74875

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-04 05:07:54 +10:00
Matt Martz
840825b79c
Allow omit to work with include_role from_args (#74879)
* Allow omit to work with include_role from_args. Fixes #66349

* Add clog frag
2021-06-04 05:07:16 +10:00
Alicia Cozine
605b1a1c5c
documents community 'extra docs' option in collections (#74886)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-03 14:22:21 -04:00
Alicia Cozine
f88e81a62c
updates links in comments to point to current docs (#74834)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2021-06-03 14:00:24 -04:00
Alicia Cozine
62fc4ad8da
adds banner for GalaxyNG survey (#74889) 2021-06-03 11:22:49 -04:00
Johannes Heimansberg
b023f34f4a
service_mgr: Detect using symlink if proc/1 and ps fail
* runit and other alternative service managers tend to work via symlink so this covers most of em
* Fixes #74866.
2021-06-03 09:59:31 -04:00
Brian Coca
9c718ccc42
Async status rewrite
-  remove need for module (at least for posix side)
  - adds retry with backoff on fetching file, since
    race is bigger since we don't spend time on module
  - now gives more info on fail
  - also made actionfail/skip handle results if given
2021-06-03 09:54:40 -04:00
Martin Krizek
e201b542be
Ensure end_play ends play, not batch (#74332)
* Ensure end_play ends play, not batch

Fixes #73971

ci_complete

* Preserve result

* Move AnsibleEndPlay to TQM

* Add tests

* Add changelog

* Explaining comment

* Fix changelog name

* ci_complete
2021-06-03 09:26:22 +02:00
Ian Wienand
fe20546d36
first_found: clear up the skip option usage (#74816) 2021-06-03 11:41:46 +05:30
Abhijeet Kasurde
be9f8c69d1
unarchive: Fail when zipinfo is not available (#74632)
Fixes: #39029

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-02 10:09:42 +05:30
David Lee Whiteside
805799ac8b
add pkcs11 support to Ansible ssh connection module (#32829)
* rebased with upstream

* removed extra usetty as it wasnt needed, style changes, added var option setable by inventory for pkcs11

* update pkcs11_provider version_added

* Update lib/ansible/plugins/connection/ssh.py

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Update lib/ansible/plugins/connection/ssh.py

Correct logic for a password being required for pkcs11_provider

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* style nit fixes for checking pkcs11_provider is set

* fixed duplication when using password_prompt with pkcs11_provider

* added changelog fragment

* added changelog fragment

Co-authored-by: David Whiteside <david.whiteside@nrel.gov>
Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
2021-06-02 12:32:43 +10:00
Jaroslav Mracek
d9183b8df5
dnf - replace usage of private attribute with supported API (#73529)
base._update_security_filters is a private attribute of DNF used
as performance optimization. Modification or even call from outside
of DNF is against all recommendation including PEP8.

* Improve compatibility with all DNF versions

* Add changelog fragment for dnf security change
2021-06-01 15:32:38 -04:00
Brian Coca
ba2b1a6bf6
fact gathering, ensure we get some linux hardware info even if some fails/times out (#74714)
* Add resiliency to linux hw fact gathering

 Now traps unexpected exceptions on mounts and continues
 gathiering other info.
 Also gives more info on why mount info gathering failed.
 more info if debugging
2021-06-01 14:52:22 -04:00
Abhijeet Kasurde
8d39332c3d
plugins: specify plugin types for get_option (#74799) 2021-06-01 13:46:04 -04:00
Matt Clay
adc9e4a023 Updated ansible-test azure plugin help message. 2021-06-01 10:23:04 -07:00
Martin Krizek
01ab6c6ec7
Apply display_failed_stderr on loop item results (#74865) 2021-06-01 11:31:46 -04:00
Abhijeet Kasurde
70f22c7f32
Remove commented code (#74860)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-06-01 11:26:38 -04:00
pefmeister
41f42d6bf6
Update intro_bsd.rst (#74768)
OpenBSD 6.9 is out and the default version of Python is 3.8, with no more 3.7.
2021-06-01 10:43:15 -04:00
file not found
81c770e44a
Update intro_getting_started.rst (#74786)
Changed confusing wording.  People new to ansible, like myself, have a hard time grocking what is a playbook and what is a task.   I changed the name of the playbook to make it clearer.
2021-06-01 10:38:17 -04:00
Toshio Kuratomi
80e7e1a17c
Due to the takeover of freenode we're moving to a different irc network. (#74775)
* Due to the takeover of freenode we're moving to a different irc network.

* Our channels updated to point at the same channel name on libera.chat
* Some links went to webchat.freenode.net.  At this time, libera.chat
  doesn't point you to an official webchat client so I changed these to
  https://libera.chat. (kiwi irc does work with libera.chat so that
  could be another option).
* In general, I used the name irc.libera.net for link names and
  https://libera.chat for link targets.  This is because the irc service
  is hosted on irc.libera.chat but the project web server is hosted on
  libera.chat.  (This appears to also be true for freenode but we were
  using http://irc.freenode.net which doesn't seem to work.  Oops).
* Removed http://irc.freenode.net from the linkcheck exceptions.
  linkcheck was actually correct to flag that as invalid (should have
  been http://frenode.net instead).

* Looks like hte important people in #yaml are now in libera.chat

* Link to where contributors should get help

Add a link target and then link to where contributors should get support
for developing groups of modules.

* Update docs/docsite/rst/dev_guide/developing_modules_in_groups.rst

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-01 08:48:09 +01:00
Abhijeet Kasurde
b0dcf0d164
collection: match skip message as per role install (#74861) 2021-06-01 09:44:01 +05:30
Therry van Neerven
35a2345809
Fixed typo in yum package (#72964)
* yum: Fixed typo in failure message: nevra --> envra
* Added changelog fragment
2021-05-31 13:34:26 +05:30
Rukmangathan
e0558ac193
yum action plugin: 'use' as an alias of 'use_backend' (#70792)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: rukmangathan <rukmangathan.annadurai@gigamon.com>
2021-05-31 09:48:15 +05:30
Sloane Hertel
5640093f1c
Use the module redirect_list when getting defaults for action plugins (#73864)
* Fix module-specific defaults in the gather_facts, package, and service action plugins.

* Handle ansible.legacy actions better in get_action_args_with_defaults

* Add tests for each action plugin

* Changelog

Fixes #72918
2021-05-27 19:06:45 -04:00
Brian Coca
a5a13246ce
ssh remove unused/unusable cli option ssh_args (#74846) 2021-05-27 17:16:54 -04:00
Boris Korzun
99a983c92c
config: small typo fix (#74845) 2021-05-27 16:41:20 -04:00
Abhijeet Kasurde
148d4f6248
hostname: Add support for RedOS (#74844)
Fixes: #74779

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 21:18:48 +05:30
geliwei
138b3b6851
hostname: add support for Anolis distro (#74829)
project website https://openanolis.org/

Signed-off-by: Liwei Ge <geliwei@openanolis.org>
2021-05-27 18:30:35 +05:30
Alexander Sowitzki
774e563452 Use get_file_lines in hostname module 2021-05-27 13:15:52 +02:00
Alexander Sowitzki
502270c804 hostname: clean up strategies
Apply #74744 and #69929 to #70828
2021-05-27 13:15:52 +02:00
Rick Elrod
2ad10ffe43 hostname: Make strategies consistent, drop py2.4
Change:
- Make strategies behave consistently and return the empty string
  instead of "UNKNOWN" (or "temporarystub") for the "before" value if
  the permanent hostname file does not exist or could not be read.
- Switch to `with open()` instead of annoying exception handling code
  (which was wrong and leaked file handles in several places). This
  drops Python 2.4 support for this module.
- Updated porting guide since users could be relying on these former,
  inconsistent values.

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-27 13:15:52 +02:00
Rick Elrod
8a0abed1ba [hostname] don't write in get_*() methods
Change:
- Hostname strategies' get_*() methods should never write to the
  filesystem. They are used in check_mode by default to determine if
  there is any work to be done.

Test Plan:
- New unit tests to ensure that (at least when in check_mode) the get
  methods don't ever call write.

Tickets:
- Fixes #66432

Signed-off-by: Rick Elrod <rick@elrod.me>
2021-05-27 13:15:52 +02:00
Jill R
16e1172292
Update docs for cloud maintained collections (#74373)
- AWS has moved to Zuul CI
- Kubernetes collection has been renamed
- OpenShift/OKD collection was missing
- ansible.windows is on Zuul and Azure Pipelines
- ansible.posix is on Zuul

Signed-off-by: Jill Rouleau <jill.rouleau@bespokess.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 15:04:16 +05:30
Abhijeet Kasurde
ae50d05182
ini: Add parameter to allow no value (#74806)
ConfigParser allows to read key with no value.

Fixes: #50594

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 11:12:38 +05:30