Skip to content

Sapphire-Health/ansible-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manage Windows OS with Ansible

Set environment variables

N/A

Create an inventory

cat << EOF > hosts.yml
all:
    hosts:
        ansibletest01.fqdn.tld:
vars:
    ansible_user: "[email protected]"
    ansible_connection: winrm
    ansible_winrm_transport: kerberos
    ansible_winrm_server_cert_validation: ignore
EOF

Create a variable file

cat << EOF > vars.yml
match_host: ansibletest01.fqdn.tld
category_names:
  - Security Updates
  - Critical Updates
  - Update Rollups
  - Updates
  - Drivers
  - Definition Updates
server_selection: windows_update
reboot: false
EOF

Install require collection

ansible-galaxy collection install -r collections/requirements.yml

Get a kerberos ticket

Run a playbook

ansible-playbook -i hosts.yml -e @vars.yml updates/search.yml

Request a Citrix Authentication Certificate

export AZURE_SUBSCRIPTION_ID=
export AZURE_CLIENT_ID=
export AZURE_SECRET=
export AZURE_TENANT=

ansible-playbook -i hosts.yml --limit=epic-dc1-ica03.lcmchealth.org -e username=lyas.spiehler -e computername=vm-lspiehler -e ca=EPIC-DC1-ICA03.lcmchealth.org\\DC1-ICA03-FAS-CA -e template=CCExamRoom -e resource_group=LCMC-Shared -e storage_account_name=lcmcsharedgeneraleast01 -e container=certs certificate/citrix-auth-cert-request.yml

See fix for Azure issues

ansible/ansible#38894

  1. su -
  2. cd /var/lib/awx/venv/awx/bin
  3. source activate
  4. pip install ansible[azure] --upgrade --force
  5. deactivate

About

Windows management Ansible playbooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published