Cześć,
mam pytanie odnośnie Ansible i Cisco UCS B.
Udało mi się bez problemu stworzyć VLAN, dodać go do vNIC Template, ale nie mogę nigdzie odnaleźć informacji, w jaki sposób "zaznaczyć select" w templatce.
Skrypt jest prosty, ale robi to co ma robić.
- name: Configure VLAN
ucs_vlans:
hostname: '{{ inventory_hostname }}'
username: ucspe
password: ucspe
name: '{{ item.name}}'
id: '{{ item.vlan_id }}'
native: 'no'
with_items: "{{ vlans_l2vni }}"
- name: Add VLAN to vNIC templates
ucs_vnic_template:
hostname: '{{ inventory_hostname }}'
username: ucspe
password: ucspe
name: vNIC_1
fabric: A
mtu: 9000
target: adapter
template_type: updating-template
# redundancy_type:
vlans_list:
- name: "{{ item.vlan_id }}"
state: present
with_items: "{{ vlans_l2vni }}"
z góry dzięki za podpowiedź.
Ansible i Cisco UCS B
Re: Ansible i Cisco UCS B
Nie urzywam Ansible od jakiegos czasu bo jest strasznie toporne i jesli chcesz manipulowac wieksza iloscia informacji lub zaimplementowac bardziej skomplikowane warunki logiczne, to poprosty Ansible z tym sobie nie radzi. Proponowalbym poczytac o Nornir + Python
Pozdro,
Pozdro,
Re: Ansible i Cisco UCS B
Musisz jedną zaznaczyć jako 'native'.
Z dokumentacji ;)
Z dokumentacji ;)
Kod: Zaznacz cały
- vlans_list
List of VLANs used by the vNIC template.
Each list element has the following suboptions:
= name
The name of the VLAN (required).
- native
Designates the VLAN as a native VLAN. Only one VLAN in the list can be a native VLAN.
[choices: 'no', 'yes']
[Default: 'no']