Ansible playbook

Hi all,

I have some question about running an ansible playbook from the Foreman Web
UI.

  • Is the playbook run from the smart-proxy?
  • As which user is the playbook executed ? as foreman-proxy? root?

Thanks for any feedback…
rgds,
Arsene

Hi,
when you have a proxy with ansible feature, it runs through the proxy and
the user is foreman-proxy.

Ondrej Prazak

··· On Sunday, August 13, 2017 at 11:06:10 AM UTC+2, Arsène Gschwind wrote: > > Hi all, > > I have some question about running an ansible playbook from the Foreman > Web UI. > - Is the playbook run from the smart-proxy? > - As which user is the playbook executed ? as foreman-proxy? root? > > Thanks for any feedback.. > rgds, > Arsene >

Hi,

I have all the ansible feature installed but it seems that the playbook
are running as foreman user and not foreman-proxy.

Is there a way to debug this?

Thanks,
Arsène

··· On 08/16/2017 04:04 PM, oprazak@redhat.com wrote: > Hi, > when you have a proxy with ansible feature, it runs through the proxy > and the user is foreman-proxy. > > Ondrej Prazak > > On Sunday, August 13, 2017 at 11:06:10 AM UTC+2, Arsène Gschwind wrote: > > Hi all, > > I have some question about running an ansible playbook from the > Foreman Web UI. > - Is the playbook run from the smart-proxy? > - As which user is the playbook executed ? as foreman-proxy? root? > > Thanks for any feedback.. > rgds, > Arsene > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Foreman users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/foreman-users/noHiOGRfDF0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > foreman-users+unsubscribe@googlegroups.com > . > To post to this group, send email to foreman-users@googlegroups.com > . > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.

Arsene, what version of the Foreman and plugins you use?
Looks like you didn’t use foreman-proxy-plugin-ansible only foreman-plugin-ansible

If you go to Infrastructure > Smart Proxies, do you see any proxy with the Ansible feature?
If you have installed the foreman proxy Ansible plugin (rubygem-foreman-proxy-plugin-ansible), and you don’t see it, you may have to “Refresh” the features of your proxies.
If you see the proxy with the Ansible feature, is it possible that you’re trying to run it on a host unreachable (network-wise) by that proxy?

I can see the Ansible Feature and the plugins seems correctly installed.
By doing further investigation I could figure out that the problem was due to the IPA client. When installing FreeIPA client it configures an ssh proxy command in ssh_config, something like :
ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h
By removing that config it work much better.
I will try to find out why it doesn’t work with that proxy command since it works when calling ansible by hand using that proxy cmd.

rgds,
Arsene

1 Like