Ignore empty or missing Ansible inventory groups

parent fe1a3e5a
......@@ -134,6 +134,17 @@ General
.. __: https://reuse.software/spec/
.. __: https://spdx.org/ids
- In new DebOps environments, Ansible will ignore any missing inventory groups
using the ``host_pattern_mismatch`` parameter. This will disable the "Could
not match supplied host pattern" warning message present in most of the
playbooks included in DebOps. To disable this message in an existing
environment, add in the :file:`.debops.cfg` configuration file:
.. code-block:: ini
[ansible inventory]
host_pattern_mismatch = ignore
:ref:`debops.cran` role
'''''''''''''''''''''''
......
......@@ -169,9 +169,10 @@ check-links:
.PHONY: test-playbook-syntax
test-playbook-syntax:
@printf "%s\n" "Testing Ansible playbook syntax..."
@ANSIBLE_ROLES_PATH="ansible/roles" ansible-playbook --syntax-check \
ansible/playbooks/bootstrap.yml \
ansible/playbooks/site.yml
@ANSIBLE_ROLES_PATH="ansible/roles" ANSIBLE_HOST_PATTERN_MISMATCH=ignore \
ansible-playbook --syntax-check ansible/playbooks/bootstrap.yml \
ansible/playbooks/bootstrap-ldap.yml \
ansible/playbooks/site.yml
.PHONY: test-ansible-lint
test-ansible-lint:
......
......@@ -65,6 +65,9 @@ stdout_callback = yaml
;callback_plugins = /my/plugins/callback
;roles_path = /my/roles
[ansible inventory]
host_pattern_mismatch = ignore
[ansible paramiko]
;record_host_keys=True
......
......@@ -11,3 +11,4 @@ allow_world_readable_tmpfiles = true
pipelining = False
stdout_callback = yaml
bin_ansible_callbacks = true
host_pattern_mismatch = ignore
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment