728x90
728x90
# vi switch.yml
---
- hosts: localhost
vars:
ansible_python_interpreter: /bin/python3
gather_facts: no
esxi_hostname: "172.16.10.14"
esxi_username: "root"
esxi_password: "VMware1!"
project_id: "khb-00"
tasks:
- name: 02. Create Project Standard vSwitch
community.vmware.vmware_vswitch:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
validate_certs: false
switch: '{{ project_id }}'
delegate_to: localhost
- name: waiting vswitch creating
wait_for:
timeout: 10
delegate_to: localhost
# ansible-playbook switch.yml
728x90
'Ansible' 카테고리의 다른 글
Ansible Openshift on vSphere VM (BareMetal) - 5. Router 설정하기 (0) | 2023.11.21 |
---|---|
Ansible Openshift on vSphere VM (BareMetal) - 4. Router VM 만들기 (0) | 2023.11.21 |
Ansible Openshift on vSphere VM (BareMetal) - 3. 스위치에 포트 그룹 생성하기 (0) | 2023.11.21 |
Ansible Openshift on vSphere VM (BareMetal) - 1. VM 폴더 생성 (0) | 2023.11.21 |
Ansible Inventory설정, add-hoc, play북 (0) | 2023.09.19 |