summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cisco/intersight/playbooks/pxe_boot.yml
blob: 1303f91a2c9dec4e13fc6c8ea1dfaf4b61a54c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
# Example Playbook: cisco.intersight.intersight_boot_order_policy
# Runs on localhost since policies are only configured once
# Author: Tse Kai "Kevin" Chan (@BrightScale)
- name: Example PXE boot policy
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    # Create an anchor for api_info that can be used throughout the file
    api_info: &api_info
      # if api_key vars are omitted, INTERSIGHT_API_KEY_ID, INTERSIGHT_API_PRIVATE_KEY,
      # and INTERSIGHT_API_URI environment variables used for API key data
      api_private_key: "{{ api_private_key | default(omit) }}"
      api_key_id: "{{ api_key_id | default(omit) }}"
      api_uri: "{{ api_uri | default(omit) }}"
      validate_certs: "{{ validate_certs | default(omit) }}"
      state: "{{ state | default('present') }}"
    # Organization name
    org_name: dsoper-DevNet
  tasks:
    - name: Configure Boot Order Policy with PXE
      cisco.intersight.intersight_boot_order_policy:
        <<: *api_info
        organization: "{{ org_name }}"
        name: PXE-Boot
        description: Boot Order policy with PXE for lab use
        tags:
          - Key: Site
            Value: RCDN
        configured_boot_mode: Legacy
        boot_devices:
          - device_type: PXE
            device_name: LAN1
            enabled: true
            port: -1
            network_slot: 1
            interface_source: port
            ip_type: IPv4