update windows stuff

This commit is contained in:
willtome
2022-09-09 13:03:31 -04:00
parent 2b613bcac8
commit 240774c2c3
4 changed files with 22 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
---
- name: Arbitrary PowerShell
- name: Run PowerShell
hosts: "{{ HOSTS | default('windows') }}"
gather_facts: false
vars:

View File

@@ -3,11 +3,11 @@
hosts: "{{ HOSTS | default('windows') }}"
gather_facts: false
vars:
remote_dest: "C:\\sample_script.ps1"
remote_dest: "C:\\query_services.ps1"
tasks:
- name: Copy script to remote
ansible.windows.win_copy:
src: "{{playbook_dir}}/sample_script.ps1"
src: "{{playbook_dir}}/query_services.ps1"
dest: "{{ remote_dest }}"
- name: Run Script

View File

@@ -64,7 +64,18 @@ controller_templates:
type: multiselect
variable: win_update_categories
required: false
default: SecurityUpdates
default:
- Application
- Connectors
- CriticalUpdates
- DefinitionUpdates
- DeveloperKits
- FeaturePacks Guidance
- SecurityUpdates
- ServicePacks
- Tools
- UpdateRollups
- Updates
choices:
- Application
- Connectors
@@ -131,11 +142,12 @@ controller_templates:
type: text
variable: package_name
required: true
- name: "WINDOWS / Arbitrary PowerShell"
- name: "WINDOWS / Run PowerShell"
job_type: run
inventory: "Workshop Inventory"
project: "Ansible official demo project"
playbook: "windows/arbitrary_powershell.yml"
playbook: "windows/powershell.yml"
execution_environment: Default execution environment
notification_templates_started: Telemetry
notification_templates_success: Telemetry
@@ -151,13 +163,13 @@ controller_templates:
type: text
variable: HOSTS
required: false
- question_name: PowerShell Script (Default returns random cat fact)
- question_name: PowerShell Script
type: textarea
variable: ps_script
default: "(Invoke-RestMethod -Method 'GET' -Uri 'https://catfact.ninja/fact').fact"
default: "Get-Service | Where-Object -FilterScript running | Select-Object -Property 'Name'"
required: true
- name: "WINDOWS / PowerShell Script"
- name: "WINDOWS / Query Services"
job_type: run
inventory: "Workshop Inventory"
project: "Ansible official demo project"
@@ -186,7 +198,7 @@ controller_templates:
- 'Running'
- 'Stopped'
- name: "WINDOWS / PowerShell DSC configuring password requirements"
- name: "WINDOWS / Configuring Password Requirements"
job_type: run
inventory: "Workshop Inventory"
project: "Ansible official demo project"