So I’ve been working on a way to run Ansible to windows hosts over SSH through Foreman 3.
SSHd on windows is a LOT easier to push out to windows systems than WinRM. Flat use of Ansible works quite well with against Windows running SSH too.
Small status that with CentOS7 running Foreman with Ansible Plugin. Everything works as expected. Roles get installed, playbooks and commands are flawless.
It really excites me that I can use Foreman to admin windows this way
Ubuntu 18/20.04 doesn’t seem to work right though. Flat Ansible is fine, emulated everything I did with CentOS in regards to parameters. I’m thinking it’s something to do with the Dynflow plugin for Debian based OS?
Here’s role attempt backtrace of the errors out.
Playbooks and Ansible Commands (cloned command and switched “shell” to “win_shell”. BackTrace.log (16.0 KB)
Curious why CentOS works, but Ubuntu Doesn’t. Would love find out why.
So you have a Foreman running on CentOS7 and one on Ubuntu, and Ansible works from CentOS but doesn’t from Ubuntu 20.04?
Can you post the contents of your /usr/share/foreman-proxy/.ansible.cfg from both machines, and the outputs from rpm -qa |grep ansible from CentOS and dpkg -l | grep ansible from Ubuntu?
yeah. VM testbed where I’ve got Cent/Alma/Unbuntu instances of foreman going.
Cent and Alma ran ansible right out of the box after installs. Zero issues. Windows and Linux just “work” when installing roles, running playbooks, etc.
$ dpkg -l | grep ansible
ii ansible 2.9.6+dfsg-1 all Configuration management, deployment, and task execution system
ii python3-ansible-runner 1.4.7-1~tfm+1 all library that interfaces with Ansible (Python 3.x)
ii ruby-foreman-ansible 6.4.1-1 all Foreman Ansible plugin
ii ruby-smart-proxy-ansible 3.2.1-1 all Ansible support for Foreman smart proxy