Skip to content

Commit

Permalink
Merge pull request #14139 from jhernand/add_ovirt_cloud_init_customiz…
Browse files Browse the repository at this point in the history
…ation_template

Add oVirt cloud-init customization template
(cherry picked from commit 1029890)

https://bugzilla.redhat.com/show_bug.cgi?id=1434428
  • Loading branch information
bdunne authored and simaishi committed Mar 21, 2017
1 parent 40cfb80 commit 3852c83
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions db/fixtures/customization_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,25 @@
:script: "#cloud-config\nusers:\n - name: root\n ssh-authorized-keys:\n - <%= evm[:ws_values][:ssh_public_key] %>"
:type: CustomizationTemplateCloudInit
:system: true

- :name: oVirt cloud-init
:description: This template generates the cloud-init configuration supported by oVirt
:script: |-
# Configure basic host parameeters:
host_name: <%= evm[:hostname] %>
user_name: root
root_password: <%= MiqPassword.decrypt(evm[:root_password]) %>
# Run commands to configure the network using the NetworkManager command
# line tool. Note that this expects the subnet mask in the prefix format,
# for example 24 instead of 255.255.255.0.
runcmd:
- nmcli connection down eth0
- nmcli connection modify eth0
ip4 <%= evm[:ip_addr] %>/<%= evm[:subnet_mask] %>
gw4 <%= evm[:gateway] %>
ipv4.dns "<%= evm[:dns_servers] %>"
ipv4.dns-search "<%= evm[:dns_suffixes] %>"
- nmcli connection up eth0
:type: CustomizationTemplateCloudInit
:system: true

0 comments on commit 3852c83

Please sign in to comment.