diff --git a/.gitignore b/.gitignore index 0602192d7f4de162670c8c9c5f3d6c958702ca5e..5cf66a8e1563403bdd0d18cb51eaaa2a1ee43df5 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,4 @@ iso/ # time new systems should be installed. Hence, it's not suitable for version # control. vars/network.yml +fstab diff --git a/site.yml b/site.yml index 28622caa6cd28063fe2be265de40570a1271c76a..491934bcdcce29998a106a09e192ab67455ca2ca 100644 --- a/site.yml +++ b/site.yml @@ -29,4 +29,4 @@ strategy: linear roles: - - { role: ansible_lza_create_rhel_iso } + - { role: ansible_lza_create_rhel_iso, become: true } diff --git a/tasks/main.yml b/tasks/main.yml index 35aa554b2039c5fab686e809b9f8929855d1b03f..859cf810bb5b02b35fc878cb8c57cf12c374a00b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,10 @@ --- ### PREPARATION +# install prerequisites +- name: install xorriso + apt: + name: "xorriso" + state: latest # Create a separate build directory so the role directory is not overly polluted - name: create build directory file: @@ -14,7 +19,7 @@ opts: "loop" path: "{{ playbook_dir }}/iso/" src: "{{ playbook_dir }}/rhel-server-{{ rhel_version_long }}-x86_64-dvd.iso" - fstab: "/tmp/fstab" + fstab: "{{ playbook_dir }}/fstab" state: mounted # Copy contents of ISO image to the build directory, because they will need to # be included in the new image. diff --git a/templates/kickstart.cfg.j2 b/templates/kickstart.cfg.j2 index c73c7b69786b3f0fcfc58b95a7b1cd6c99f0e05a..7b5f896c26845c6cb9f3a70f3c91e70397df601e 100644 --- a/templates/kickstart.cfg.j2 +++ b/templates/kickstart.cfg.j2 @@ -14,7 +14,7 @@ keyboard --vckeymap=de-nodeadkeys --xlayouts='de (nodeadkeys)' lang de_DE.UTF-8 # Network information -network --bootproto=static --device=ens192 --ethtool="autoneg on" --gateway=212.201.61.1 --ip={{ item.ip_address }} --nameserver=194.95.142.157,194.95.142.203,194.95.142.200 --netmask=255.255.255.192 --ipv6=auto --activate +network --bootproto=static --device=ens192 --ethtool="autoneg on" --gateway={{ item.gateway }} --ip={{ item.ip_address }} --nameserver=194.95.142.157,194.95.142.203,194.95.142.200 --netmask={{ item.netmask }} --ipv6=auto --activate network --hostname={{ item.hostname }}.slub-dresden.de repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/HighAvailability