ansible-runner use of /etc/ansible

23 views
Skip to first unread message

Weatherby,Gerard

unread,
Nov 12, 2020, 8:37:56 AM11/12/20
to ansible...@googlegroups.com
If I’m understanding the ansible-runner documentation correctly, it does not use /etc/ansible but requires a directory structure set up in a particular way.

If that is correct, is there a tool that converts /etc/ansible into the required directory structure?
-- 
Gerard Weatherby | Application Architect
NMRbox | Department of Molecular Biology and Biophysics | UConn Health
263 Farmington Avenue, Farmington, CT 06030-6406
uchc.edu

Stefan Hornburg (Racke)

unread,
Nov 12, 2020, 8:57:22 AM11/12/20
to ansible...@googlegroups.com
On 11/12/20 2:37 PM, Weatherby,Gerard wrote:
> If I’m understanding the ansible-runner documentation correctly, it does not use /etc/ansible but requires a directory
> structure set up in a particular way.
>
> If that is correct, is there a tool that converts /etc/ansible into the required directory structure?

I never use /etc/ansible, but an inventory local to my playbook and a custom ansible.cfg.

Regards
Racke

> -- 
> *Gerard Weatherby* | Application Architect
> NMRbox | Department of Molecular Biology and Biophysics | UConn Health
> 263 Farmington Avenue, Farmington, CT 06030-6406
> uchc.edu <http://uchc.edu>
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/70003EFB-EE2F-424D-A8C5-4FD258C54D87%40uchc.edu
> <https://groups.google.com/d/msgid/ansible-project/70003EFB-EE2F-424D-A8C5-4FD258C54D87%40uchc.edu?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
OpenPGP_0x5B93015BFA2720F8.asc
OpenPGP_signature

Lars Liedtke

unread,
Nov 13, 2020, 3:28:32 AM11/13/20
to ansible...@googlegroups.com
Same here

Am 12.11.20 um 14:56 schrieb Stefan Hornburg (Racke):
---
punkt.de GmbH
Lars Liedtke
.infrastructure

Kaiserallee 13a
76133 Karlsruhe

Tel. +49 721 9109 500
https://infrastructure.punkt.de
in...@punkt.de

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein

Vladimir Botka

unread,
Nov 13, 2020, 4:57:43 AM11/13/20
to Weatherby,Gerard, ansible...@googlegroups.com
On Thu, 12 Nov 2020 13:37:37 +0000
"Weatherby,Gerard" <gweat...@uchc.edu> wrote:

> If I’m understanding the ansible-runner documentation correctly, it does not use /etc/ansible but requires a directory structure set up in a particular way.

Not exactly. ansible-runner is a wrapper of *ansible* and
*ansible-playbook*
https://github.com/ansible/ansible-runner/blob/devel/ansible_runner/runner_config.py#L61
https://github.com/ansible/ansible-runner/blob/devel/ansible_runner/runner_config.py#L170
"""
Performs basic checks and then properly invokes
- prepare_inventory
- prepare_env
- prepare_command
It's also responsible for wrapping the command with the
proper ssh agent invocation and setting early ANSIBLE_
environment variables. """

This means, /etc/ansible is used by *ansible* and *ansible-playbook*
in the context of additional configuration by ansible-wrapper.

For example, ANSIBLE_STDOUT_CALLBACK is limited to *minimal* and
*awx_display* only.
https://github.com/ansible/ansible-runner/blob/devel/ansible_runner/runner_config.py#L227

if 'AD_HOC_COMMAND_ID' in self.env:
self.env['ANSIBLE_STDOUT_CALLBACK'] = 'minimal'
else:
self.env['ANSIBLE_STDOUT_CALLBACK'] = 'awx_display'

IMHO, the source runner_config.py is the only relevant reference to
resolve issues.

--
Vladimir Botka
Reply all
Reply to author
Forward
0 new messages