Ansible - Windows 원격 관리(기본 방식) > Ansible 자료실

본문 바로가기
사이트 내 전체검색

Ansible 자료실

운영 Ansible - Windows 원격 관리(기본 방식)

페이지 정보

profile_image
작성자 snow
댓글 1건 조회 8,041회 작성일 21-12-13 16:08

본문

1. WIndows 구성(WIndows 7, 2008 버전 초과만 가능)

1.1. 환경 구성

## Powershell 실행

$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1

$file = "$env:temp\ConfigureRemotingForAnsible.ps1" 

(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file) 

powershell.exe -ExecutionPolicy ByPass -File $file 


1.2. Windows 환경 구성 확인

winrm enumerate winrm/config/Listener

Set-Item -Path WSMan:\localhost\Service\Auth\Basic -Value


2. Ansible 서버

2.1. Inventory 구성

# cd /root

# vi inventory

[windows]

10.10.10.2 ## windows server IP

[windows:vars}

ansible_user=ansible ## Windows User Name

ansible_password=password ## Windows User Password

ansible_connection=winrm

ansible_winrm_server_cert_validation=ignore


2.2. Ping Test

 # ansible windows -m win_ping -i ./inventory

10.10.10.2 | SUCCESS => {

    "changed": false, 

    "ping": "pong"

}


댓글목록

profile_image

최고관리자님의 댓글

최고관리자 작성일

좋은글 감사합니다. ^^

회원로그인

회원가입

사이트 정보

회사명 : (주)리눅스데이타시스템 / 대표 : 정정모
서울본사 : 서울특별시 강남구 봉은사로 114길 40 홍선빌딩 2층 / tel : 02-6207-1160
대전지사 : 대전광역시 유성구 노은로174 도원프라자 5층 / tel : 042-331-1161

접속자집계

오늘
1,196
어제
1,434
최대
3,935
전체
802,345
Copyright © www.linuxdata.org All rights reserved.