I have to parse variable in static PowerShell script which will copy through win_copy module on target machine.
Means when file copy on target machine after running playbook it should have values of those variable.
I’ve keep variable in default like:
user_name: ******
password: ******
I have to parse variable in static PowerShell script which will copy through win_copy module on target machine.
Means when file copy on target machine after running playbook it should have values of those variable.
I've keep variable in default like:
user_name: ******
password: ******
and tasks/main.yml file:
---
# tasks file for trust
- name: Copy a single file, but keep a backup
win_copy:
src: templates/fixtrust.ps1.j2
dest: C:\fixtrust.ps1
backup: yes
- name: Run powershell script to resolve break trust
win_shell: C:\fixtrust.ps1
and powershell file kept in files or template directory: