Skip to content

Commit

Permalink
Backport 'ansible.cfg' option from modern dir
Browse files Browse the repository at this point in the history
New 'ansible.cfg' options added in the modern project directory have
been backported to the one generated in the legacy project directory.

(cherry picked from commit 1c2b923)
  • Loading branch information
drybjed committed Apr 21, 2023
1 parent 74f99d2 commit 79b9de1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[defaults]

# List of directories that contain Ansible Collections.
collections_paths = {{ collections[::-1] | join(':') }}
collections_path = {{ collections[::-1] | join(':') }}

# List of directories that contain Ansible roles.
roles_path = {{ roles[::-1] | join(':') }}
Expand Down
27 changes: 15 additions & 12 deletions src/debops/_data/templates/projectdir/legacy/debops.cfg.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{# Copyright (C) 2020-2021 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2020-2021 DebOps <https://debops.org/>
{# Copyright (C) 2020-2023 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2020-2023 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-3.0-or-later
#}
# -*- conf -*-
Expand All @@ -19,7 +19,7 @@ inventory = {{ env['ANSIBLE_INVENTORY'] | d('ansible/inventory') }}

# String which will be set as the "ansible_managed" variable in templates
# generated by Ansible.
ansible_managed = {{ env['DEBOPS_MANAGED'] | d('This file is managed remotely, all changes will be lost') }}
ansible_managed = {{ env['ANSIBLE_MANAGED'] | d('This file is managed remotely, all changes will be lost') }}

# Don't show tasks that were skipped during Ansible execution.
display_skipped_hosts = {{ env['ANSIBLE_DISPLAY_SKIPPED_HOSTS'] | d('false') }}
Expand All @@ -34,20 +34,23 @@ retry_files_enabled = {{ env['ANSIBLE_RETRY_FILES_ENABLED'] | d('false') }}
stdout_callback = {{ env['ANSIBLE_STDOUT_CALLBACK'] | d('yaml') }}

# Define the list of the built-in callback plugins enabled by default.
callback_whitelist = {{ env['ANSIBLE_CALLBACK_WHITELIST'] | d('timer') }}
callbacks_enabled = {{ env['ANSIBLE_CALLBACKS_ENABLED'] | d('timer') }}

;callback_plugins = /my/plugins/callback
;roles_path = /my/roles
# Enable or disable support for for connection pipelining. This has
# implications for 'become' operations - the 'requiretty' option in
# /etc/suders must be disabled for pipelining to work correctly.
pipelining = {{ env["ANSIBLE_PIPELINING"] | d('false') }}

[ansible diff]

# If enabled, Ansible modules will always show differences when their
# state has changed. Equivalent to adding '--diff' option on the
# command line on each execution.
always = {{ env["ANSIBLE_DIFF_ALWAYS"] | d("false") }}

[ansible inventory]

# This option disables the warnings about missing Ansible inventory groups
# defined in a playbook. This warning message is very common in DebOps
# playbooks and disabling it is recommended.
host_pattern_mismatch = {{ env['ANSIBLE_HOST_PATTERN_MISMATCH'] | d('ignore') }}

[ansible paramiko]
;record_host_keys=True

[ansible ssh_connection]
;ssh_args = -o ControlMaster=auto -o ControlPersist=60s

0 comments on commit 79b9de1

Please sign in to comment.