Hmm - interesting. After I got past the issue where the playbook wouldn't
run at all, I immediately ran into another set of issue where the SSH
connection doesn't seem to respect the defined user, password, nor use the
private key.
Still trying to figure this out.
It does work if I setup a .ssh/config but I'm assuming that isn't the
intended architecture ;-)
Regards,
--Tony
On Friday, January 27, 2017 at 1:14:33 PM UTC-5, Tom McKay wrote:
>
> Could there be another cause for this error? I get the same. I am running
> on latest katello master, foreman develop, foreman_ansible master.
>
> I confirmed that I can run ansible-playbook against the host as the
> vagrant user if I specify "remote_user: root" in the playbook that includes
> the role. I don't see the remote_user in the task input below.
>
> The task has this input:
>
> {"inventory"=>
>
> "{\"all\":{\"hosts\":[\"erma-pierini.example.com\"]},\"_meta\":{\"hostvars\":{\"erma-pierini.example.com\":{\"foreman\":{\"ip\":\"192.168.100.204\",\"ip6\":null,\"environment_id\":null,\"environment_name\":null,\"last_report\":\"2017-01-27T18:04:43.000Z\",\"mac\":\"52:54:00:0e:fc:63\",\"realm_id\":null,\"realm_name\":null,\"sp_mac\":null,\"sp_ip\":null,\"sp_name\":null,\"domain_id\":1,\"domain_name\":\"example.com\",\"architecture_id\":1,\"architecture_name\":\"x86_64\",\"operatingsystem_id\":5,\"operatingsystem_name\":\"RedHat
> 7.3\",\"subnet_id\":1,\"subnet_name\":\"Desktop
> Provisioning\",\"subnet6_id\":null,\"subnet6_name\":null,\"sp_subnet_id\":null,\"ptable_id\":80,\"ptable_name\":\"Kickstart
>
> default\",\"medium_id\":null,\"medium_name\":null,\"build\":false,\"comment\":\"\",\"disk\":\"\",\"installed_at\":\"2017-01-12T21:23:06.680Z\",\"model_id\":1,\"hostgroup_id\":1,\"owner_id\":3,\"owner_type\":\"User\",\"enabled\":true,\"managed\":true,\"use_image\":null,\"image_file\":\"\",\"uuid\":\"9127d7a9-7dac-472c-8d9e-d91cd5dc21f8\",\"compute_resource_id\":1,\"compute_resource_name\":\"Desktop
>
> Libvirt\",\"compute_profile_id\":null,\"compute_profile_name\":null,\"capabilities\":[\"build\",\"image\"],\"provision_method\":\"build\",\"certname\":\"erma-pierini.example.com\",\"image_id\":null,\"image_name\":null,\"created_at\":\"2017-01-12T21:09:02.089Z\",\"updated_at\":\"2017-01-27T18:04:45.029Z\",\"last_compile\":\"2017-01-27T18:04:36.000Z\",\"global_status\":1,\"global_status_label\":\"Warning\",\"organization_id\":3,\"organization_name\":\"Example
> Corporation\",\"location_id\":2,\"location_name\":\"Default
> Location\",\"puppet_status\":1,\"model_name\":\"Standard PC (i440FX + PIIX,
> 1996)\",\"configuration_status\":1,\"configuration_status_label\":\"Active\",\"build_status\":0,\"build_status_label\":\"Installed\",\"execution_status\":0,\"execution_status_label\":\"Last
> execution succeeded\",\"errata_status\":1,\"errata_status_label\":\"Could
> not calculate errata status, ensure host is registered and katello-agent is
> installed\",\"subscription_status\":0,\"subscription_status_label\":\"Fully
> entitled\",\"name\":\"erma-pierini.example.com\",\"id\":5,\"puppet_proxy_id\":null,\"puppet_proxy_name\":null,\"puppet_ca_proxy_id\":null,\"puppet_ca_proxy_name\":null,\"puppet_proxy\":null,\"puppet_ca_proxy\":null,\"hostgroup_name\":\"Atomic
> Host\",\"hostgroup_title\":\"Atomic
> Host\",\"content_facet_attributes\":{\"id\":4,\"uuid\":\"f3c0f7a0-96b7-4336-a042-8f4d6882d88c\",\"content_view_id\":3,\"content_view_name\":\"Atomic
>
> Host\",\"lifecycle_environment_id\":2,\"lifecycle_environment_name\":\"Library\",\"content_source_id\":1,\"content_source_name\":\"devel.example.com\",\"content_view\":{\"id\":3,\"name\":\"Atomic
>
> Host\"},\"lifecycle_environment\":{\"id\":2,\"name\":\"Library\"},\"content_source\":{\"id\":1,\"name\":\"devel.example.com\",\"url\":\"https://devel.example.com:9090\"},\"errata_counts\":{\"security\":0,\"bugfix\":0,\"enhancement\":0,\"total\":0},\"applicable_package_count\":0,\"upgradable_package_count\":0},\"subscription_global_status\":0,\"subscription_facet_attributes\":{\"id\":11,\"uuid\":\"f3c0f7a0-96b7-4336-a042-8f4d6882d88c\",\"last_checkin\":\"2017-01-27T17:24:34.470Z\",\"service_level\":null,\"release_version\":null,\"autoheal\":true,\"registered_at\":\"2017-01-20T17:58:22.342Z\",\"registered_through\":\"devel.example.com\",\"user\":{\"id\":3,\"login\":\"admin\"}}},\"foreman_params\":{\"kt_activation_keys\":\"Atomic
>
> Host\"},\"foreman_ansible_roles\":[\"cranesolr\"],\"ansible_port\":22,\"ansible_user\":\"root\",\"ansible_ssh_pass\":\"ansible\",\"ansible_connection\":\"ssh\",\"ansible_winrm_server_cert_validation\":\"validate\",\"ansible_ssh_port\":22,\"ansible_ssh_user\":\"root\"}}}}",
> "playbook"=>"---\n- hosts: all\n roles:\n - cranesolr\n",
> "options"=>{"verbosity_level"=>"0"},
> "task_id"=>"5a604c60-544f-4155-8697-52493dcc7de4",
> "locale"=>"en"}
>
>
>
> On Fri, Jan 27, 2017 at 11:58 AM, Tony Coffman <[email protected]
> <javascript:>> wrote:
>
>> Thank you. Both the workaround and the PR are working great for me.
>>
>> On Friday, January 27, 2017 at 8:02:51 AM UTC-5, Daniel Lobato wrote:
>>>
>>> On 01/26, Tony Coffman wrote:
>>> > I'm testing Katello 3.3 RC1 and attempting to integrate
>>> foreman_ansible,
>>> > dynamic inventory, and the ansible proxy into my test scenario.
>>>
>>>
>>> This looks like http://projects.theforeman.org/issues/18278, try
>>> changing the verbosity level to 1.
>>>
>>> I will release a patch for this ASAP (one that verifies the settings are
>>> correct and allows to disable verbosity)
>>>
>>> >
>>> > I've imported my ansible roles and assigned parameters in Foreman and
>>> from
>>> > the command line all is well.
>>> >
>>> > I've run into a roadblock when I try to run the playbook in the WebUI.
>>> >
>>> > The error is Runner error: TypeError - no implicit conversion of nil
>>> into
>>> > String
>>> >
>>> > Here's the trace from the smart_proxy_dynflow_core.log. Any help
>>> would be
>>> > greatly appreciated it.
>>> >
>>> > [2017-01-26 13:41:23.707 #2830] ERROR -- dynflow: error while
>>> dispatching
>>> > request to runner 285ec4a1-2bc8-4a98-bd96-7fad0a30d3de:TypeError no
>>> > implicit conversion of nil into String:
>>> >
>>>
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.1.1/lib/foreman_tasks_core/runner/command_runner.rb:8:in
>>>
>>>
>>> > `spawn'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.1.1/lib/foreman_tasks_core/runner/command_runner.rb:8:in
>>>
>>>
>>> > `initialize_command'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible_core-1.0.0/lib/foreman_ansible_core/playbook_runner.rb:21:in
>>>
>>>
>>> > `block in start'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible_core-1.0.0/lib/foreman_ansible_core/playbook_runner.rb:20:in
>>>
>>>
>>> > `chdir'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible_core-1.0.0/lib/foreman_ansible_core/playbook_runner.rb:20:in
>>>
>>>
>>> > `start'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.1.1/lib/foreman_tasks_core/runner/dispatcher.rb:29:in
>>>
>>>
>>> > `start_runner'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.17/lib/dynflow/actor.rb:6:in
>>>
>>>
>>> > `on_message'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/context.rb:46:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.1.1/lib/foreman_tasks_core/runner/dispatcher.rb:22:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/executes_context.rb:7:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.17/lib/dynflow/actor.rb:26:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/awaits.rb:15:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/sets_results.rb:14:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/buffer.rb:38:in
>>>
>>>
>>> > `process_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/buffer.rb:31:in
>>>
>>>
>>> > `process_envelopes?'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/buffer.rb:20:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/termination.rb:55:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/removes_child.rb:10:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/abstract.rb:25:in
>>>
>>>
>>> > `pass'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/behaviour/sets_results.rb:14:in
>>>
>>>
>>> > `on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/core.rb:161:in
>>>
>>>
>>> > `process_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/core.rb:95:in
>>>
>>>
>>> > `block in on_envelope'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/core.rb:118:in
>>>
>>>
>>> > `block (2 levels) in schedule_execution'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/synchronization/mri_lockable_object.rb:38:in
>>>
>>>
>>> > `block in synchronize'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/synchronization/mri_lockable_object.rb:38:in
>>>
>>>
>>> > `synchronize'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/synchronization/mri_lockable_object.rb:38:in
>>>
>>>
>>> > `synchronize'
>>> >
>>> /opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.2.0/lib/concurrent/actor/core.rb:115:in
>>>
>>>
>>> > `block in schedule_execution'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/serialized_execution.rb:18:in
>>>
>>>
>>> > `call'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/serialized_execution.rb:18:in
>>>
>>>
>>> > `call'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/serialized_execution.rb:96:in
>>>
>>>
>>> > `work'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/serialized_execution.rb:77:in
>>>
>>>
>>> > `block in call_job'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in
>>>
>>>
>>> > `call'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:333:in
>>>
>>>
>>> > `run_task'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:322:in
>>>
>>>
>>> > `block (3 levels) in create_worker'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in
>>>
>>>
>>> > `loop'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:305:in
>>>
>>>
>>> > `block (2 levels) in create_worker'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in
>>>
>>>
>>> > `catch'
>>> >
>>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/concurrent-ruby-1.0.0/lib/concurrent/executor/ruby_thread_pool_executor.rb:304:in
>>>
>>>
>>> > `block in create_worker'
>>> > [2017-01-26 13:41:30.071 #2830] ERROR -- action: Script execution
>>> failed
>>> >
>>> > --
>>> > 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/foreman-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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.