Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make metal-core hostname configurable #155

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions partition/roles/metal-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ This role uses variables from [partition-defaults](/partition). So, make sure yo
You can look up all the default values of this role [here](defaults/main/main.yaml).

| Name | Mandatory | Description |
| ----------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|-------------------------------------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| metal_core_image_name | yes | Image name of metal-core |
| metal_core_image_tag | yes | Image tag of metal-core |
| metal_core_cidr | | |
| metal_core_hostname | | If given use this value instead of os.Hostname because the later takes a while after the switch was installed |
| metal_core_cidr | yes | |
| metal_core_dhcp_servers | | List of dhcp relay server ip addresses |
| metal_core_log_level | | The metal-core log level |
| metal_core_rack_id | yes | The rack id describing the rack in which the leaf switches are contained. Can be a logical rack name and is used by the metal-api to identify the switch pair |
Expand Down
3 changes: 3 additions & 0 deletions partition/roles/metal-core/templates/metal-core-env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ METAL_CORE_LOOPBACK_IP: "{{ lo }}"
METAL_CORE_ASN: "{{ asn }}"

METAL_CORE_CIDR: "{{ metal_core_cidr }}"
{% metal_core_hostname is defined %}
METAL_CORE_HOSTNAME: "{{ metal_core_hostname }}"
{% endif %}
{% if metal_core_dhcp_servers is defined %}
METAL_CORE_DHCP_SERVERS: "{{ metal_core_dhcp_servers | join(',') }}"
{% endif %}
Expand Down