-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #554 from nvgoldin/jinja_template_sysprep
Move sysprep to Jinja2 templates
- Loading branch information
Showing
16 changed files
with
244 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ git | |
grubby | ||
libffi-devel | ||
libvirt-devel | ||
libguestfs-devel | ||
libxslt-devel | ||
openssl-devel | ||
pandoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ bats | |
git | ||
libffi-devel | ||
libvirt-devel | ||
libguestfs-devel | ||
libxslt-devel | ||
openssl-devel | ||
pandoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
selinux-relabel | ||
hostname {{ hostname }} | ||
root-password password:{{ root_password }} | ||
{% if guestfs_ver['major'] >= 1 and guestfs_ver['minor'] >= 34 %} | ||
ssh-inject root:file:{{public_key}} | ||
{% else %} | ||
mkdir /root/.ssh | ||
chmod 0700:/root/.ssh | ||
upload {{ public_key }}:/root/.ssh/authorized_keys | ||
chmod 0600:/root/.ssh/authorized_keys | ||
run-command chown root:root /root/.ssh/authorized_keys | ||
{% endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% import 'sysprep-macros.j2' as macros %} | ||
{% include 'sysprep-base.j2' %} | ||
|
||
{{ macros.network_devices_debian(mappings=mappings) }} | ||
|
||
edit /boot/grub/grub.cfg:s/set timeout=5/set timeout=0/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_el(mappings=mappings) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% import 'sysprep-macros.j2' as macros %} | ||
{% include 'sysprep-base.j2' %} | ||
|
||
{{ macros.iscsi(name=iscsi_name, hostname=hostname) }} | ||
{{ macros.network_devices_el(mappings=mappings) }} | ||
|
||
edit /boot/grub2/grub.cfg:s/set timeout=5/set timeout=0/g | ||
|
||
delete /etc/systemd/system/multi-user.target.wants/kdump.service | ||
delete /etc/systemd/system/multi-user.target.wants/postfix.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% import 'sysprep-macros.j2' as macros %} | ||
{% include 'sysprep-base.j2' %} | ||
|
||
{{ macros.iscsi(name=iscsi_name, hostname=hostname) }} | ||
|
||
edit /boot/grub2/grub.cfg:s/set timeout=5/set timeout=0/g | ||
|
||
delete /etc/systemd/system/multi-user.target.wants/kdump.service | ||
delete /etc/systemd/system/multi-user.target.wants/postfix.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include 'sysprep-fc24.j2' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% include 'sysprep-fc24.j2' %} |
Oops, something went wrong.