Comments (12)
Great, glad it fixed it.
The update image has been pushed to Docker hub.
from ansiblecm.
I'm not familiar with using Ansible to manage Windows machines but I have reviewed the article and it looks like I just need to add the pywinrm dependency to the image and it should work. I do not have a way to test the change to see if it works for your use case, but I will push the change and build a "latest" image tag. Would you be able to test it and make sure it works for your use case?
from ansiblecm.
I will give it a shot!
from ansiblecm.
Did it work for your use case?
from ansiblecm.
Apologies for the delay - finally got some time to work on this.
I am getting this error when attempting to connect using kerbos
FAILED! => {"msg": "The installed version of WinRM does not support transport(s) [u'kerbos']"}
I wonder if these steps can be added to the docker file, and then the config file could be passed in?
https://docs.ansible.com/ansible/devel/user_guide/windows_winrm.html#installing-the-kerberos-library
it also could be that i just don't know what I am doing. Would it be possible to upgrade this image to use python 3 instead of 2? not sure if that will make a difference.
from ansiblecm.
Thank you for the link. I have pushed an update to use kerberos deps.
As for the config, I believe you should be able to provide it via a mount (i.e. -v). For example, something like this should work:
docker run -it --rm -v $PWD:/tmp/playbook:Z -v $PWD/krb5.conf:/etc/krb5.conf:Z jmal98/ansiblecm site.yml -i inventory/hosts
from ansiblecm.
thanks! I will give it another shot!
from ansiblecm.
@jmal98 this worked successfully for me - thank you so much!
Edit: Apparently I am a liar. I got my playbook to work but not inside of the docker container. Here is the error I received.
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 138, in run
res = self._execute()
File "/usr/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 554, in _execute
result = self._handler.run(task_vars=variables)
File "/usr/lib/python2.7/site-packages/ansible/plugins/action/normal.py", line 46, in run
result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
File "/usr/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 795, in _execute_module
res = self._low_level_execute_command(cmd, sudoable=sudoable, in_data=in_data)
File "/usr/lib/python2.7/site-packages/ansible/plugins/action/__init__.py", line 902, in _low_level_execute_command
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 472, in exec_command
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/__init__.py", line 38, in wrapped
self._connect()
File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 441, in _connect
self.protocol = self._winrm_connect()
File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 334, in _winrm_connect
self._kerb_auth(self._winrm_user, self._winrm_pass)
File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 299, in _kerb_auth
env=krb5env)
File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
fatal: [wwa00923.deluxe.com]: FAILED! => {
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
from ansiblecm.
I pushed an update to include more of the kerberos dependencies. Can you give it another try?
Also, does the playbook you're using delegate any tasks to the machine running the playbook?
from ansiblecm.
I will as soon as I can. As for the playbook It is using the windows modules to connect to a remote windows server 2016 to perform the tasks. Does that answer your question?
from ansiblecm.
Yes, it does. Thanks
from ansiblecm.
@jmal98 using the build of the latest image my playbook is working and managing my windows nodes! You should publish this to the docker registry!
from ansiblecm.
Related Issues (9)
- Add sshpass dependency HOT 1
- How to use it without running playbooks directly HOT 3
- Error: unsatisfiable constraints HOT 2
- SSL or TLS error HOT 3
- Add support for managing docker containers HOT 4
- Request: EntryPoint permission-script
- Last docker image doesn't have ansible 3.1.0 HOT 1
- ansible host ignoring ansible.cfg source at /tmp/playbook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansiblecm.