Hi,
I have new foreman installation on Ubuntu 18.
Remote ssh is running ok.
but when I try to use Ansible, for example a simple task as Remote action: Package vim: present with Ansible, it fails and I don’t understand why.
The logs are not clear for me.
In dynflow console I get:
proxy_output:
result:
- output_type: stdout
output: “/var/tmp/foreman-ssh-cmd-ebd263f5-7f50-47eb-af0e-47cffe2b88c1/script:
2: /var/tmp/foreman-ssh-cmd-ebd263f5-7f50-47eb-af0e-47cffe2b88c1/script: —:
not found\r\n/var/tmp/foreman-ssh-cmd-ebd263f5-7f50-47eb-af0e-47cffe2b88c1/script:
3: /var/tmp/foreman-ssh-cmd-ebd263f5-7f50-47eb-af0e-47cffe2b88c1/script: -:
not found\r\n”
in input I have:
ansible_connection: ssh
ansible_ssh_private_key_file: “~/.ssh/id_rsa_foreman_proxy”
ansible_winrm_server_cert_validation: validate
ansible_user: philippe
ansible_become_method: sudo
ansible_port: ‘22’
ansible_host: tin.rtech
ansible_become_user: root
ansible_become: true
ansible_ssh_port: ‘22’
ansible_ssh_user: philippe
remote_execution_ssh_user: philippe
remote_execution_effective_user_method: sudo
Apparently it is trying to execute the playbook as if it was a shell script. Could you make sure you have the ruby-foreman-ansible-core package installed?