windows updates can be parsed

Figured out how to get the returned values back.  Getting into choco now.
This commit is contained in:
James Tombleson 2019-04-08 08:21:28 -07:00
parent 42f7a9f79e
commit d43d21157c
7 changed files with 72 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
*.retry
*.swp
.DS_Store
hosts

View File

@ -0,0 +1,11 @@
- name: Install .Net Core Runtime
hosts: windows
tasks:
- name: Download binary
win_get_url:
-
https://dotnet.microsoft.com/download/thank-you/dotnet-

View File

@ -10,11 +10,8 @@
- SecurityUpdates
- CriticalUpdates
- UpdateRollups
#log_path: C:\ansible-Updates.txt
register: updates
register: output
- name: return report
debug:
var: updates
- debug: msg="{{ output }}"

View File

@ -0,0 +1,12 @@
- name: Install Brave Browser from Choco
hosts: windows
tasks:
- name: Install Package
win_chocolatey:
name: brave
state: present
register: output
- debug: msg="{{ output }}"

View File

@ -0,0 +1,17 @@
- name: Install Choco
hosts: windows
tasks:
- name: Install Choco
win_chocolatey:
name: chocolatey
source: internal_repo
# This was added because of breaking changes added to choco that conflicted with ansible
# https://github.com/ansible/ansible/pull/53841
- name: Disable EnhancedExitCodes
win_chocolatey_feature:
name: useEnhancedExitCodes
state: disabled

View File

@ -0,0 +1,11 @@
- name: Get Windows info
hosts: windows
tasks:
- name: get stuff
win_product_facts:
register: output
- debug: msg="{{ output }}"

View File

@ -0,0 +1,16 @@
# This is a testing script to see what box you are connected to.
# We will run a shell command to get our output.
- name: Get SystemInfo
hosts: windows
tasks:
- name: Run SystemInfo
win_shell: systeminfo
register: sysinfo
- debug: msg="{{ sysinfo.stdout_lines }}"