Automation with Ansible Part 2 - nicolas-tullio/Tech-Journal GitHub Wiki

Prepare MGMT01 for ansible

  • Ensure OpenSSH SSH Server is running om mgmt01-nicolas
  • ssh from the controller to mgmt
  • update inventory.txt file to include mgmt01-nicolas under [windows]
  • under [windows:vars] add:

ansible_shell_type=powershell

  • test using:

ansible windows -i inventory.txt -m win_ping -u [email protected] --ask-pass

  • Do the same on wks01 but you will get a fail message
  • To fix this, ssh into wks01-nicolas separately

Chocolatey

  • Create this playbook in roles/windows_software.yml
  • Run the playbook:

    ansible-playbook -i inventory.txt roles/windows_software.yml -u [email protected] --ask-pass