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') }}" hosts: "{{ HOSTS | default('windows') }}"
gather_facts: false gather_facts: false
vars: vars:

View File

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

View File

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