선 밖에 선 자유인

Ansible Playbook : remote exe patch 본문

IT/Cloud & DevOps

Ansible Playbook : remote exe patch

Hotman 2020. 4. 28. 01:18
---
- name: Defender Pattern Update
  hosts: windows
  gather_facts: no

  tasks:
  - name: create directory
    win_file:
      path: C:\Temp
      state: directory

  - name: file copy
    win_copy:
      src: /home/ansible/lab/mpam-fe.exe
      dest: C:\Temp\mpam-fe.exe

  - name: Install Remote patch
    raw: 'C:\Temp\mpam-fe.exe'

  - name: windows_reboot
    win_reboot:

  - name: file delete
    win_file:
      path: C:\Temp\mpam-fe.exe
      state: absent
Comments