윈도우 시스템에 zip파일을 배포 후 압축 해제 함
---
- hosts: all
vars:
ansible_port: 5985
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
ansible_winrm_scheme: http
ansible_winrm_transport: basic
tasks:
- name: deploy disk mount file
win_copy:
src: '/data/ansible/file/Disk_Part.ps1'
dest: 'c:\Disk_Part.ps1'
- name: run powershell
win_shell: 'powershell.exe -ExecutionPolicy Bypass -File c:\Disk_Part.ps1'
args:
executable: cmd
- name: deploy msssql install file
win_copy:
src: '/data/ansible/file/mssql.zip'
dest: 'c:\mssql.zip'
- name: unzip file
win_unzip:
src: 'c:\mssql.zip'
dest: 'c:\install_mssql'
ansible windows unzip
ansible windows 파일배포
반응형
'인프라 > 앤서블(Ansible)' 카테고리의 다른 글
[Ansible] 앤서블 와일드카드 find 아스테리크 (0) | 2022.07.30 |
---|---|
[Ansible] ansible fetch 앤서블 파일 끌어오기 (0) | 2022.07.29 |
[Ansible] ansible apt update playbook (0) | 2022.07.20 |
[Ansible] windows powershell 파일 실행하기 (0) | 2022.07.19 |
[Ansible] Windows 계정 생성 playbook (0) | 2022.07.15 |
댓글