From 240774c2c33f3b32b2edb3b123b42a495ca2b757 Mon Sep 17 00:00:00 2001 From: willtome Date: Fri, 9 Sep 2022 13:03:31 -0400 Subject: [PATCH] update windows stuff --- ...rbitrary_powershell.yml => powershell.yml} | 2 +- windows/powershell_script.yml | 4 +-- .../{sample_script.ps1 => query_services.ps1} | 0 windows/setup.yml | 26 ++++++++++++++----- 4 files changed, 22 insertions(+), 10 deletions(-) rename windows/{arbitrary_powershell.yml => powershell.yml} (90%) rename windows/{sample_script.ps1 => query_services.ps1} (100%) diff --git a/windows/arbitrary_powershell.yml b/windows/powershell.yml similarity index 90% rename from windows/arbitrary_powershell.yml rename to windows/powershell.yml index 90d608d..ccba36f 100644 --- a/windows/arbitrary_powershell.yml +++ b/windows/powershell.yml @@ -1,5 +1,5 @@ --- -- name: Arbitrary PowerShell +- name: Run PowerShell hosts: "{{ HOSTS | default('windows') }}" gather_facts: false vars: diff --git a/windows/powershell_script.yml b/windows/powershell_script.yml index 122e5ff..48ca142 100644 --- a/windows/powershell_script.yml +++ b/windows/powershell_script.yml @@ -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 diff --git a/windows/sample_script.ps1 b/windows/query_services.ps1 similarity index 100% rename from windows/sample_script.ps1 rename to windows/query_services.ps1 diff --git a/windows/setup.yml b/windows/setup.yml index 09ca311..63385ac 100644 --- a/windows/setup.yml +++ b/windows/setup.yml @@ -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"