ansible / ansible-documentation

Ansible community documentation
https://docs.ansible.com/
GNU General Public License v3.0
83 stars 495 forks source link

Specify that .ini files in inventories defined as directories do not work by default #1899

Open peci1 opened 1 month ago

peci1 commented 1 month ago

Summary

Reading https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#organizing-inventory-in-a-directory , I defined a directory with my .ini inventory files. However, ansible-playbook -i dir doesn't work by default (https://github.com/ansible/ansible/issues/74695). This should be mentioned in the docs.

Issue Type

Documentation Report

Component Name

https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#organizing-inventory-in-a-directory

Ansible Version

nsible [core 2.12.10]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/peci1/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/peci1/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Jul 29 2024, 17:02:10) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True

Configuration

ANSIBLE_NOCOWS(/media/data/cras/vras-deploy/ansible/ansible.cfg) = True
CACHE_PLUGIN(/media/data/cras/vras-deploy/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/media/data/cras/vras-deploy/ansible/ansible.cfg) = /tmp/ansible_cache.json
CACHE_PLUGIN_TIMEOUT(/media/data/cras/vras-deploy/ansible/ansible.cfg) = 86400
CALLBACKS_ENABLED(/media/data/cras/vras-deploy/ansible/ansible.cfg) = ['profile_tasks', 'timer']
DEFAULT_BECOME_FLAGS(/media/data/cras/vras-deploy/ansible/ansible.cfg) = --preserve-env=PARENT_PID -H -S -n
DEFAULT_CONNECTION_PLUGIN_PATH(env: ANSIBLE_CONNECTION_PLUGINS) = ['/media/data/ansible_interactive/plugins/connection']
DEFAULT_GATHERING(/media/data/cras/vras-deploy/ansible/ansible.cfg) = smart
DEFAULT_LOG_PATH(/media/data/cras/vras-deploy/ansible/ansible.cfg) = /tmp/ansible.log
DEFAULT_MODULE_UTILS_PATH(env: ANSIBLE_MODULE_UTILS) = ['/media/data/ansible_interactive/plugins/module_utils']
DEFAULT_STDOUT_CALLBACK(/media/data/cras/vras-deploy/ansible/ansible.cfg) = ansible.posix.debug
INVENTORY_ENABLED(/media/data/cras/vras-deploy/ansible/ansible.cfg) = ['yaml', 'ini']
TRANSFORM_INVALID_GROUP_CHARS(/media/data/cras/vras-deploy/ansible/ansible.cfg) = ignore

BECOME:
======

runas:
_____
become_flags(/media/data/cras/vras-deploy/ansible/ansible.cfg) = --preserve-env=PARENT_PID -H -S -n

su:
__
become_flags(/media/data/cras/vras-deploy/ansible/ansible.cfg) = --preserve-env=PARENT_PID -H -S -n

sudo:
____
become_flags(/media/data/cras/vras-deploy/ansible/ansible.cfg) = --preserve-env=PARENT_PID -H -S -n

CACHE:
=====

jsonfile:
________
_timeout(/media/data/cras/vras-deploy/ansible/ansible.cfg) = 86400
_uri(/media/data/cras/vras-deploy/ansible/ansible.cfg) = /tmp/ansible_cache.json

CALLBACK:
========

CLICONF:
=======

CONNECTION:
==========

ssh:
___
pipelining(/media/data/cras/vras-deploy/ansible/ansible.cfg) = True

HTTPAPI:
=======

INVENTORY:
=========

LOOKUP:
======

NETCONF:
=======

SHELL:
=====

VARS:
====

OS / Environment

Ubuntu Focal with ansible from PPA

Additional Information

People do not lose time trying to figure out why the code from docs doesn't work for them.

Code of Conduct

ansibot commented 1 month ago

Files identified in the description:

None

If these files are incorrect, please update the component name section of the description or use the component bot command.

sivel commented 1 month ago

We may decide to remove this restriction in the future, but I'm going to move this over to the ansible-documentation repo so we can add this to current documentation.

ansible-documentation-bot[bot] commented 1 month ago

Thanks for your Ansible docs contribution! We talk about Ansible documentation on matrix at #docs:ansible.im and on libera IRC at #ansible-docs if you ever want to join us and chat about the docs! We meet there on Tuesdays (see the Ansible calendar) and welcome additions to our weekly agenda items - scroll down to find the upcoming agenda and add a comment to put something new on that agenda.