Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - name: Toolchain for every windows image
- hosts: target
- vars:
- logman_python_dir: "C:\\logman\\logman-python"
- pre_tasks:
- - name: Remove Drive D
- win_shell: >
- Get-Volume;
- If (Get-Partition -DriveLetter D) {
- "Removing Drive D:";
- Remove-Partition -DriveLetter d -Confirm:$false;
- }
- - name: Extend Drive C
- win_shell: >
- $MaxSize = (Get-PartitionSupportedSize -DriveLetter c).SizeMax;
- $CurrentSize = (Get-Partition -DriveLetter c).Size;
- if ($CurrentSize -lt $MaxSize) {
- "Assigning full size of volume to drive C: $MaxSize";
- Resize-Partition -DriveLetter c -Size $MaxSize -Confirm:$false;
- }
- - name: Get Final Volume Size
- win_shell: Get-Volume;
- - name: Uninstall Symantec Endpoint Protection
- win_shell: >
- $sep = (Get-WmiObject -Class Win32_Product -Filter
- "Name='Symantec Endpoint Protection'" -ComputerName . );
- if($sep)
- {
- $sep.Uninstall();
- }
- - name: Reboot for clean uninstall
- win_reboot:
- roles:
- # - ensure-dot-net-framework
- - ensure-wmi-exporter
- - ensure-chocolatey
- - ensure-openssh
- - role: ensure-python
- python_set_pip_index_url: true
- python_version: 3.7.2
- python_executable: "{{ logman_python_dir }}\\python-{{ python_version }}.amd64\\python"
- # Set the product_id empty (as we don't have one) and provide a creates_path instead
- python_product_id:
- python_creates_path: "{{ python_executable }}"
- python_installer: "portable/python-{{ python_version }}/WinPython64-{{ python_version }}.0Zero.exe"
- python_installer_arguments: "/VERYSILENT /DIR={{ logman_python_dir }}"
- python_additional_packages:
- - matplotlib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement