Skip to content

Commit

Permalink
CirrOS 0.3.5 support
Browse files Browse the repository at this point in the history
1. Ensure network scripts are working(on older cirros other
interfaces were just not configured properly).

2. Use same domain template as el6 with the normal serial console.

Signed-off-by: Nadav Goldin <[email protected]>
  • Loading branch information
nvgoldin committed Jun 25, 2017
1 parent daab62b commit ef7a949
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lago/templates/sysprep-cirros0.3.5.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% import 'sysprep-macros.j2' as macros %}
{% include 'sysprep-base.j2' %}

{{ macros.iscsi(name=iscsi_name, hostname=hostname) }}
{{ macros.network_devices_cirros(mappings=mappings) }}
12 changes: 12 additions & 0 deletions lago/templates/sysprep-macros.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ source /etc/network/interfaces.d/*.cfg \
{% endfor %}
{% endfilter %}
{% endmacro %}


{% macro network_devices_cirros(mappings) %}
write /etc/network/interfaces:auto lo \
iface lo inet loopback \
{% filter dedent %}
{%+ for iface, mac in mappings.viewitems() %}
auto {{ iface }} \
iface {{ iface }} inet dhcp \
{% endfor %}
{% endfilter %}
{% endmacro %}

0 comments on commit ef7a949

Please sign in to comment.