Foreman-Ansible logging message

Hello there :slight_smile:

I'm looking into the Foreman-Ansible plugin as the combo Foreman + Ansible
is a great way to fully provision hosts.
The plugin doesn't suit me entirely and I am looking into how to enhance
it. However I come more from a Python programming and frameworks background
and to be honest I'm struggling with Ruby/Rails/The Foreman so thanks for
your patience :slight_smile:

So far, I'm failing to see the log messages of the Ansible-Foreman plugin.
I'm using Foreman 1.15 and ruby-foreman-ansible 1.4.5-1 on Ubuntu 16.04.
Given the following lines from the plugin:

> ./lib/foreman_ansible_core/playbook_runner.rb:
> logger.debug('[foreman_ansible] - Initializing Ansible Runner')
> ./lib/foreman_ansible_core/playbook_runner.rb:
> logger.debug("[foreman_ansible] - Running command #{command}")
> ./lib/foreman_ansible_core/playbook_runner.rb:
> logger.debug('[foreman_ansible] - Setting Ansible verbosity level to'\

I'm expecting to see messages such as "[foreman_ansible] - Initializing
Ansible Runner" in /var/log/foreman/production.log when I run a playbook.
Unfornately I don't see them.

I did configure the following in /etc/foreman/settings.yml:

Log settings for the current environment can be adjusted by adding them

> # here. For example, if you want to increase the log level.
> :logging:
> :level: debug
> # Individual logging types can be toggled on/off here

:loggers:

>
Questions:

  • Do I need to do anything else to see those debug messages?
  • Is this working for you?

Thanks!

Hi,
sorry for late response, I do not see the log entries either. I suspect
there is some sort of logger misconfiguration. Please feel free to file a
bug at [1].

O.

[1] Issues - Ansible - Foreman

··· On Mon, Oct 30, 2017 at 3:47 PM, Bernard Landon wrote:

Hello there :slight_smile:

I’m looking into the Foreman-Ansible plugin as the combo Foreman + Ansible
is a great way to fully provision hosts.
The plugin doesn’t suit me entirely and I am looking into how to enhance
it. However I come more from a Python programming and frameworks background
and to be honest I’m struggling with Ruby/Rails/The Foreman so thanks for
your patience :slight_smile:

So far, I’m failing to see the log messages of the Ansible-Foreman plugin.
I’m using Foreman 1.15 and ruby-foreman-ansible 1.4.5-1 on Ubuntu 16.04.
Given the following lines from the plugin:

./lib/foreman_ansible_core/playbook_runner.rb:
logger.debug(’[foreman_ansible] - Initializing Ansible Runner’)
./lib/foreman_ansible_core/playbook_runner.rb:
logger.debug("[foreman_ansible] - Running command #{command}")
./lib/foreman_ansible_core/playbook_runner.rb:
logger.debug(’[foreman_ansible] - Setting Ansible verbosity level to’\

I’m expecting to see messages such as “[foreman_ansible] - Initializing
Ansible Runner” in /var/log/foreman/production.log when I run a playbook.
Unfornately I don’t see them.

I did configure the following in /etc/foreman/settings.yml:

Log settings for the current environment can be adjusted by adding them

here. For example, if you want to increase the log level.

:logging:
:level: debug

Individual logging types can be toggled on/off here

:loggers:

Questions:

  • Do I need to do anything else to see those debug messages?
  • Is this working for you?

Thanks!


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 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.