install and start sshd
This commit is contained in:
parent
c9ce2c8906
commit
1e7faa6700
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
|||
---
|
||||
- name: Configure Windows Firewall
|
||||
ansible.builtin.include_tasks: firwall.yml
|
||||
|
||||
- Name: Install OpenSSH via Powershell
|
||||
ansible.builtin.include_tasks: powershell.yml
|
||||
|
|
12
tasks/powershell.yml
Normal file
12
tasks/powershell.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
# See https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell
|
||||
- name: Install the OpenSSH Server
|
||||
ansible.windows.win_powershell:
|
||||
script: "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0"
|
||||
|
||||
- name: Set service startup mode to auto and ensure sshd is started
|
||||
ansible.windows.win_service:
|
||||
name: sshd
|
||||
start_mode: auto
|
||||
state: started
|
||||
|
Loading…
Reference in a new issue