On 06/20, Pradeep Antil wrote:
> Hi Folks,
>
> I am trying to integrate Ansible with foreman Server. I have installed
> Foreman 1.15 and Ansible  2.3 on the same server. I have followed the steps
> mentioned in following URL
>
> https://theforeman.org/plugins/foreman_ansible/1.x/index.html
>
> When i run ansible command then my remote sever should be registered on my
> foreman dashboard along with the facts. But i don't see any new hosts in
> dashboard though the command was executed successfully.
>
> Can anybody suggest what things i am missing here...

I see the callback seems to be pointing to "foreman.example.com:3000",
which is the default. I suppose your Foreman URL is different.

You should set some environment variables FOREMAN_URL, etc.. in order to
point to the right Foreman. Also running ansible with '-vvv' might give
you more hints if anything goes wrong.

Check out which environment variables to use on section 2.1 here
https://theforeman.org/plugins/foreman_ansible/1.x/index.html#2.1Ansiblecallback


>
>
>
> *[root@foreman ~]# ansible 169.144.106.188 -m shell -a 'yum remove
> net-tools -y'*
> plugin foreman_callback.pyc: SSL verification of
> http://foreman.example.com:3000 disabled
>  [WARNING]: Consider using yum module rather than running yum
>
> 169.144.106.188 | SUCCESS | rc=0 >>
> Loaded plugins: fastestmirror
> Resolving Dependencies
> --> Running transaction check
> ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be erased
> --> Finished Dependency Resolution
>
> Dependencies Resolved
>
> ================================================================================
>  Package         Arch         Version                         Repository
> Size
> ================================================================================
> Removing:
>  net-tools       x86_64       2.0-0.17.20131004git.el7        @base
> 917 k
>
> Transaction Summary
> ================================================================================
> Remove  1 Package
>
> Installed size: 917 k
> Downloading packages:
> Running transaction check
> Running transaction test
> Transaction test succeeded
> Running transaction
>   Erasing    : net-tools-2.0-0.17.20131004git.el7.x86_64
> 1/1
>   Verifying  : net-tools-2.0-0.17.20131004git.el7.x86_64
> 1/1
>
> Removed:
>   net-tools.x86_64 0:2.0-0.17.20131004git.el7
>
> Complete!
>
> [root@foreman ~]#
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.


--
Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Reply via email to