cloud-config

cloud-config / cloud-init

Network
https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v1.html

user.network-config: |
version: 1
config:
    - type: physical
    name: dev-mgmt
    subnets:
        - type: static
        address: 10.33.20.40/20
        gateway: 10.33.16.1
        dns_nameservers:
            - 10.8.3.74
            - 10.8.3.174
        dns_search:
            - dev.i.example.com
        routes:
            - gateway: 10.33.16.1
            network: 10.33.0.0/16
    - type: physical
    name: dev-ipmi
    subnets:
        - type: static
        address: 10.32.20.40/20
        gateway: 10.32.16.1
network:
  version: 1
  config:
  - type: physical
    name: eth0
    subnets:
      - type: dhcp

Links
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
https://wiki.archlinux.org/index.php/Cloud-init
https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup
https://learn.hashicorp.com/tutorials/terraform/cloud-init