Ansible

Ansible Openshift on vSphere VM (BareMetal) - 2. Openshift 프로젝트를 위한 스위치 만들기

KHB95 2023. 11. 21. 12:51
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