윈도우 dns주소를 ansible로 설정할 수 있다.
---
- 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: set dns
win_dns_client:
adapter_nates: Ethernet
ipv4_addresses: "{{ vardns }}"
- name: result
win_shell: "powershell ipconfig /all | findstr 'DNS'"
register: result
- name: print
debug:
msg: "{{ result.stdout_lines }}"
anisble dns 등록
ansible 윈도우 dns 등록
ansible windows dns 설정
앤서블 윈도우 dns 설정
앤서블 windows dns 설정
반응형
'인프라 > 앤서블(Ansible)' 카테고리의 다른 글
[ansible] Failed to connect to the host via ssh: ssh_exchange_identification: read: Connection reset by peer (0) | 2023.02.08 |
---|---|
[ANSIBLE] POSSIBLE DNS SPOOFING DETECTED (0) | 2022.09.02 |
[Ansible] 앤서블 와일드카드 find 아스테리크 (0) | 2022.07.30 |
[Ansible] ansible fetch 앤서블 파일 끌어오기 (0) | 2022.07.29 |
[Ansible] windows 파일배포 & 압축 해제 (0) | 2022.07.27 |
댓글