Setting up Windows without interaction

52 views
Skip to first unread message

Fabiano Sidler

unread,
Oct 21, 2019, 3:50:41 PM10/21/19
to Ansible Project
What's the best way to set up a Windows without any interaction?
With Linux/Unix I'd place my SSH public key onto the installer and be able to connect to the host after first boot.
How can this be done with Windows and WSIM?

J Hawkesworth

unread,
Oct 22, 2019, 6:45:03 AM10/22/19
to Ansible Project
Most modern versions of windows have winrm enabled by default so provided you have a suitable user with sufficient privileges, you can often connect once the OS has finished booting up.

That said, there are a lot of factors that need to be considered depending on how things are set up in the environment you are working in.

I recommend reading up on winrm here so you understand the options and can pick most appropriate for your organisation.

Https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html

I know this sounds like a faff but once you have sorted this stuff out, you probably won't need to touch it again for ages and can get on with getting your playbooks to do what you need.
Cheers,

Jon

Fabiano Sidler

unread,
Oct 22, 2019, 12:05:21 PM10/22/19
to Ansible Project
I'm sorry I was terribly unclear. I mean, is there a way to connect to Windows with public key authentication (instead of passwords or, beware, X509 crap)? I'd happily use SSH for Windows as well, but according to the docs, that's not supported. Or will it be a supported way in the future?

alicia

unread,
Oct 22, 2019, 12:42:17 PM10/22/19
to ansible...@googlegroups.com
Hi Fabiano,

Ansible supports authentication using .pem certificates with WinRM to Windows machines - see https://docs.ansible.com/ansible/devel/user_guide/windows_winrm.html#authentication-options

Is that what you had in mind?

Alicia


On Oct 22, 2019, at 11:05 AM, Fabiano Sidler <fabian...@gmail.com> wrote:

I'm sorry I was terribly unclear. I mean, is there a way to connect to Windows with public key authentication (instead of passwords or, beware, X509 crap)? I'd happily use SSH for Windows as well, but according to the docs, that's not supported. Or will it be a supported way in the future?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7b5ddc93-920f-4a58-894f-36d465e119bb%40googlegroups.com.

J Hawkesworth

unread,
Oct 22, 2019, 5:59:32 PM10/22/19
to Ansible Project
Ssh support for Windows was merged a little while back so as long as you are running a recent ansible and can get the ssh server support on to your Windows targets, you can give it a whirl.

https://github.com/ansible/ansible/pull/47732

Hope this helps

Jon

Reply all
Reply to author
Forward
0 new messages