# Ansible Configuration # Copy to project root as ansible.cfg # See: https://docs.ansible.com/ansible/latest/reference_appendices/config.html # # Comments MUST be on their own line. Ansible's INI parser keeps an inline # "# ..." as part of the value: on an integer it aborts startup, and on a # boolean it silently evaluates to False. [defaults] # Inventory inventory = inventories/production/hosts.yml # Roles path (search local roles first, then Galaxy) roles_path = roles:~/.ansible/roles # SSH host key checking (enable for security) host_key_checking = True # Disable retry files (.retry files on failure) retry_files_enabled = False # Performance: Increase parallelism (default is 5) forks = 20 # Fact gathering strategy gathering = smart fact_caching = jsonfile fact_caching_connection = .ansible_cache # 24 hours, in seconds fact_caching_timeout = 86400 # Output format: the built-in default callback renders results as YAML. # Do not use the community.general "yaml" stdout callback; it was removed. stdout_callback = ansible.builtin.default callback_result_format = yaml callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer # Connection timeout timeout = 30 # There is no supported "gather_timeout" ansible.cfg setting; it is a # parameter of the setup module. Set it per play instead: # module_defaults: # ansible.builtin.setup: # gather_timeout: 30 # Enable vars plugins vars_plugins_enabled = host_group_vars,community.sops.sops [privilege_escalation] # Privilege escalation (disabled by default - use become: true in tasks) become = False become_method = sudo become_user = root become_ask_pass = False [ssh_connection] # SSH pipelining for performance (2-5x faster) pipelining = True # SSH multiplexing for connection reuse ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=yes # Transfer method (smart, sftp, scp, piped) transfer_method = smart [inventory] # Enable dynamic inventory plugins enable_plugins = yaml, host_list, amazon.aws.aws_ec2, azure.azcollection.azure_rm # Ignore inventory patterns ignore_patterns = .git, .github, vault [diff] # Always show diffs always = False # Context lines for diffs context = 3