Project

General

Profile

Actions

Support #11981

closed

Impove my cloud-init for vmware

Added by Nikita Stupin about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

My cloud-init:

---
globalIPSettings:
  dnsServerList:
    - <%= @host.subnet.dns_primary %>
  dnsSuffixList:
    - <%= @host.domain %>
identity:
  LinuxPrep:
    domain: <%= @host.domain %>
    hostName: <%= @host.shortname %>
    hwClockUTC: true
    timeZone: "Europe/Moscow" 
nicSettingMap:
  - adapter:
      dnsDomain: <%= @host.domain %>
      dnsServerList:
        - <%= @host.subnet.dns_primary %>
      gateway:
        - <%= @host.subnet.gateway %>
      ip: <%= @host.ip %>
      subnetMask: <%= @host.subnet.mask %>
fqdn: <%= @host %>
manage_etc_hosts: true

How i can add multiple interfaces/aliases for using in this template? I suppose need multiple adapter blocks. How i can do foreach for interfaces list?

Actions #1

Updated by Dominic Cleal about 9 years ago

  • Project changed from 38 to Foreman
  • Category set to Compute resources - VMware

I'd suggest discussing this on the foreman-users mailing list, you're more likely to find somebody who's done it before.

https://github.com/theforeman/community-templates/blob/develop/snippets/kickstart_networking_setup.erb#L105-L156 shows a basic loop over network interfaces. http://projects.theforeman.org/projects/foreman/wiki/TemplateWriting lists @host.interfaces too.

Actions #2

Updated by Anonymous over 8 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF