-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows] Add README instructions for Windows hosts #233
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comment. WDYT ?
README.md
Outdated
[servers] | ||
linux1 ansible_host=127.0.0.1 | ||
linux2 ansible_host=127.0.0.2 | ||
windows1 ansible_host=127.0.0.3 ansible_become_method=runas ansible_become_user=System |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ansible_become_user
is optional I think. By default it will use the Winrm
user, no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When setting ansible_become_method
to runas
, you have to set the ansible_become_user
. Otherwise you get this error:
fatal: [windows1]: FAILED! => {"msg": "No setting was provided for required configuration plugin_type: become plugin: runas setting: become_user "}
.
But actually, there's a simpler way to make the role work, without relying on a user: by setting ansible_become=no
for Windows hosts.
README.md
Outdated
```yml | ||
- hosts: servers | ||
roles: | ||
- { role: Datadog.datadog, become: yes, become_method: runas, become_user: System } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here I think, setting only { role: Datadog.datadog}
and letting ansible use the right default works. I don't think we should advice people to use System by default and let them use the default value in there version of ansible.
[windows] Add README instructions for Windows hosts
What does this PR do?
Add instructions on how to make the role work with Windows hosts (
become: yes
does not work by itself on Windows).Motivation
Windows support.
Additional Notes
For now, I put the section next to the playbook examples. Is there a better place?