Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. - name: Toolchain for every windows image
  2. hosts: target
  3. vars:
  4. logman_python_dir: "C:\\logman\\logman-python"
  5. pre_tasks:
  6. - name: Remove Drive D
  7. win_shell: >
  8. Get-Volume;
  9. If (Get-Partition -DriveLetter D) {
  10. "Removing Drive D:";
  11. Remove-Partition -DriveLetter d -Confirm:$false;
  12. }
  13. - name: Extend Drive C
  14. win_shell: >
  15. $MaxSize = (Get-PartitionSupportedSize -DriveLetter c).SizeMax;
  16. $CurrentSize = (Get-Partition -DriveLetter c).Size;
  17. if ($CurrentSize -lt $MaxSize) {
  18. "Assigning full size of volume to drive C: $MaxSize";
  19. Resize-Partition -DriveLetter c -Size $MaxSize -Confirm:$false;
  20. }
  21. - name: Get Final Volume Size
  22. win_shell: Get-Volume;
  23. - name: Uninstall Symantec Endpoint Protection
  24. win_shell: >
  25. $sep = (Get-WmiObject -Class Win32_Product -Filter
  26. "Name='Symantec Endpoint Protection'" -ComputerName . );
  27. if($sep)
  28. {
  29. $sep.Uninstall();
  30. }
  31. - name: Reboot for clean uninstall
  32. win_reboot:
  33.  
  34. roles:
  35. # - ensure-dot-net-framework
  36. - ensure-wmi-exporter
  37. - ensure-chocolatey
  38. - ensure-openssh
  39. - role: ensure-python
  40. python_set_pip_index_url: true
  41. python_version: 3.7.2
  42. python_executable: "{{ logman_python_dir }}\\python-{{ python_version }}.amd64\\python"
  43. # Set the product_id empty (as we don't have one) and provide a creates_path instead
  44. python_product_id:
  45. python_creates_path: "{{ python_executable }}"
  46. python_installer: "portable/python-{{ python_version }}/WinPython64-{{ python_version }}.0Zero.exe"
  47. python_installer_arguments: "/VERYSILENT /DIR={{ logman_python_dir }}"
  48. python_additional_packages:
  49. - matplotlib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement