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 22, 2017
1 parent daab62b commit 0246f7b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lago/templates/sysprep-cirros0.3.5.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% import 'sysprep-macros.j2' as macros %}
{% include 'sysprep-base.j2' %}

{{ 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 0246f7b

Please sign in to comment.