Ansible i Cisco UCS B

Wszystko o automatyzacji w sieciach i DC
Wiadomość
Autor
qbeusz
rookie
rookie
Posty: 10
Rejestracja: 03 gru 2008, 16:55

Ansible i Cisco UCS B

#1

#1 Post autor: qbeusz »

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ź.

martino76
CCIE
CCIE
Posty: 883
Rejestracja: 17 gru 2010, 15:23
Lokalizacja: Barczewo

Re: Ansible i Cisco UCS B

#2

#2 Post autor: martino76 »

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,

Awatar użytkownika
konradrz
CCIE
CCIE
Posty: 400
Rejestracja: 23 sty 2008, 14:21
Lokalizacja: Singapore, SG
Kontakt:

Re: Ansible i Cisco UCS B

#3

#3 Post autor: konradrz »

Musisz jedną zaznaczyć jako 'native'.
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']

ODPOWIEDZ