From ea63b7232900143a41ac79a30dbc3fccbdb4339f Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Thu, 29 Sep 2022 20:37:37 -0400 Subject: [PATCH] more things --- bootserver/host_vars/bootserver/network.yml | 12 -- bootserver/inventory | 2 - bootserver/playbook.yml | 24 --- bootserver/roles/mosibi.pxe/README.md | 38 ---- bootserver/roles/mosibi.pxe/defaults/main.yml | 13 -- bootserver/roles/mosibi.pxe/handlers/main.yml | 2 - bootserver/roles/mosibi.pxe/meta/main.yml | 52 ----- bootserver/roles/mosibi.pxe/tasks/apache.yml | 31 --- bootserver/roles/mosibi.pxe/tasks/iso.yml | 76 ------- bootserver/roles/mosibi.pxe/tasks/main.yml | 28 --- bootserver/roles/mosibi.pxe/tasks/tftp.yml | 39 ---- .../templates/01-52-54-00-1e-59-6f.j2 | 6 - .../roles/mosibi.pxe/templates/default.j2 | 20 -- .../roles/mosibi.pxe/templates/ostree.cfg.j2 | 14 -- .../mosibi.pxe/templates/rocky8-base.cfg.j2 | 60 ------ bootserver/roles/mosibi.pxe/tests/inventory | 2 - bootserver/roles/mosibi.pxe/tests/test.yml | 5 - bootserver/roles/mosibi.pxe/vars/main.yml | 11 - .../roles/robertdebock.dhcpd/.ansible-lint | 13 -- .../robertdebock.dhcpd/.github/FUNDING.yml | 2 - .../.github/ISSUE_TEMPLATE/bug_report.md | 32 --- .../.github/ISSUE_TEMPLATE/feature_request.md | 19 -- .../.github/pull_request_template.md | 11 - .../robertdebock.dhcpd/.github/settings.yml | 8 - .../.github/workflows/galaxy.yml | 18 -- .../.github/workflows/molecule.yml | 69 ------ .../.github/workflows/requirements2png.yml | 34 --- .../.github/workflows/todo.yml | 20 -- .../roles/robertdebock.dhcpd/.gitignore | 6 - .../roles/robertdebock.dhcpd/.gitlab-ci.yml | 44 ---- .../roles/robertdebock.dhcpd/.later.yml | 12 -- .../.pre-commit-config.yaml | 24 --- .../roles/robertdebock.dhcpd/.travis.yml | 29 --- bootserver/roles/robertdebock.dhcpd/.yamllint | 16 -- .../robertdebock.dhcpd/CODE_OF_CONDUCT.md | 46 ---- .../roles/robertdebock.dhcpd/CONTRIBUTING.md | 76 ------- bootserver/roles/robertdebock.dhcpd/LICENSE | 202 ------------------ bootserver/roles/robertdebock.dhcpd/README.md | 139 ------------ .../roles/robertdebock.dhcpd/SECURITY.md | 25 --- .../robertdebock.dhcpd/defaults/main.yml | 28 --- .../robertdebock.dhcpd/handlers/main.yml | 9 - .../meta/.galaxy_install_info | 2 - .../robertdebock.dhcpd/meta/exception.yml | 4 - .../roles/robertdebock.dhcpd/meta/main.yml | 39 ---- .../robertdebock.dhcpd/meta/preferences.yml | 2 - .../molecule/default/collections.yml | 4 - .../molecule/default/converge.yml | 13 -- .../molecule/default/molecule.yml | 27 --- .../molecule/default/prepare.yml | 10 - .../molecule/default/verify.yml | 9 - .../roles/robertdebock.dhcpd/requirements.txt | 10 - .../roles/robertdebock.dhcpd/requirements.yml | 7 - .../roles/robertdebock.dhcpd/tasks/assert.yml | 96 --------- .../roles/robertdebock.dhcpd/tasks/main.yml | 59 ----- .../templates/dhcpd.conf.j2 | 20 -- .../robertdebock.dhcpd/templates/dhcpd.j2 | 13 -- .../templates/isc-dhcp-server.j2 | 4 - bootserver/roles/robertdebock.dhcpd/tox.ini | 25 --- .../roles/robertdebock.dhcpd/vars/main.yml | 45 ---- manifests/bootable-rpm-ostree.yaml | 53 +++++ manifests/bootupd.yaml | 13 ++ manifests/fallback-hostname.yaml | 11 + manifests/ignition-and-ostree.yaml | 44 ++++ manifests/rocky-ostree-base.yaml | 117 ++-------- 64 files changed, 134 insertions(+), 1810 deletions(-) delete mode 100644 bootserver/host_vars/bootserver/network.yml delete mode 100644 bootserver/inventory delete mode 100644 bootserver/playbook.yml delete mode 100644 bootserver/roles/mosibi.pxe/README.md delete mode 100644 bootserver/roles/mosibi.pxe/defaults/main.yml delete mode 100644 bootserver/roles/mosibi.pxe/handlers/main.yml delete mode 100644 bootserver/roles/mosibi.pxe/meta/main.yml delete mode 100644 bootserver/roles/mosibi.pxe/tasks/apache.yml delete mode 100644 bootserver/roles/mosibi.pxe/tasks/iso.yml delete mode 100644 bootserver/roles/mosibi.pxe/tasks/main.yml delete mode 100644 bootserver/roles/mosibi.pxe/tasks/tftp.yml delete mode 100644 bootserver/roles/mosibi.pxe/templates/01-52-54-00-1e-59-6f.j2 delete mode 100644 bootserver/roles/mosibi.pxe/templates/default.j2 delete mode 100644 bootserver/roles/mosibi.pxe/templates/ostree.cfg.j2 delete mode 100644 bootserver/roles/mosibi.pxe/templates/rocky8-base.cfg.j2 delete mode 100644 bootserver/roles/mosibi.pxe/tests/inventory delete mode 100644 bootserver/roles/mosibi.pxe/tests/test.yml delete mode 100644 bootserver/roles/mosibi.pxe/vars/main.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.ansible-lint delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/FUNDING.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/pull_request_template.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/settings.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/workflows/galaxy.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/workflows/molecule.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/workflows/requirements2png.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.github/workflows/todo.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.gitignore delete mode 100644 bootserver/roles/robertdebock.dhcpd/.gitlab-ci.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.later.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.pre-commit-config.yaml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.travis.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/.yamllint delete mode 100644 bootserver/roles/robertdebock.dhcpd/CODE_OF_CONDUCT.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/CONTRIBUTING.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/LICENSE delete mode 100644 bootserver/roles/robertdebock.dhcpd/README.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/SECURITY.md delete mode 100644 bootserver/roles/robertdebock.dhcpd/defaults/main.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/handlers/main.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/meta/.galaxy_install_info delete mode 100644 bootserver/roles/robertdebock.dhcpd/meta/exception.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/meta/main.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/meta/preferences.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/molecule/default/collections.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/molecule/default/converge.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/molecule/default/molecule.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/molecule/default/prepare.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/molecule/default/verify.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/requirements.txt delete mode 100644 bootserver/roles/robertdebock.dhcpd/requirements.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/tasks/assert.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/tasks/main.yml delete mode 100644 bootserver/roles/robertdebock.dhcpd/templates/dhcpd.conf.j2 delete mode 100644 bootserver/roles/robertdebock.dhcpd/templates/dhcpd.j2 delete mode 100644 bootserver/roles/robertdebock.dhcpd/templates/isc-dhcp-server.j2 delete mode 100644 bootserver/roles/robertdebock.dhcpd/tox.ini delete mode 100644 bootserver/roles/robertdebock.dhcpd/vars/main.yml create mode 100644 manifests/bootable-rpm-ostree.yaml create mode 100644 manifests/bootupd.yaml create mode 100644 manifests/fallback-hostname.yaml create mode 100644 manifests/ignition-and-ostree.yaml diff --git a/bootserver/host_vars/bootserver/network.yml b/bootserver/host_vars/bootserver/network.yml deleted file mode 100644 index d6a3a6a..0000000 --- a/bootserver/host_vars/bootserver/network.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -network_connections: - - name: eth0 - type: ethernet - ip: - dhcp4: yes - - name: eth1 - type: ethernet - ip: - dhcp4: no - address: - - 192.168.100.254/24 diff --git a/bootserver/inventory b/bootserver/inventory deleted file mode 100644 index df0c528..0000000 --- a/bootserver/inventory +++ /dev/null @@ -1,2 +0,0 @@ -[bootservers] -bootserver ansible_host=192.168.122.89 diff --git a/bootserver/playbook.yml b/bootserver/playbook.yml deleted file mode 100644 index 0865e38..0000000 --- a/bootserver/playbook.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- hosts: bootservers - become: true - vars: - dhcpd_ipv4_interface: eth1 - dhcpd_default_lease_time: 3600 - dhcpd_max_lease_time: 7200 - dhcpd_subnet_mask: 255.255.255.0 - dhcpd_broadcast_address: 192.168.100.255 - dhcpd_routers: 192.168.100.254 - dhcpd_domain_name_servers: - - "192.168.10.1" - dhcpd_domain_search: install - dhcpd_filename: pxelinux.0 - dhcpd_next_server: 192.168.100.254 - dhcpd_subnets: - - network: 192.168.100.0 - netmask: 255.255.255.0 - range_start: 192.168.100.100 - range_end: 192.168.100.200 - roles: - - linux-system-roles.network - - robertdebock.dhcpd - - mosibi.pxe diff --git a/bootserver/roles/mosibi.pxe/README.md b/bootserver/roles/mosibi.pxe/README.md deleted file mode 100644 index 225dd44..0000000 --- a/bootserver/roles/mosibi.pxe/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/bootserver/roles/mosibi.pxe/defaults/main.yml b/bootserver/roles/mosibi.pxe/defaults/main.yml deleted file mode 100644 index c051016..0000000 --- a/bootserver/roles/mosibi.pxe/defaults/main.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# defaults file for mosibi.pxe - -iso_dest_directory: /var/www/html/isos -iso_mount_directory: /var/www/html/repos - -iso_images: - - name: rhel86 - description: "Red Hat Enterprise Linux 8.6" - url: http://192.168.122.89/isos/rhel-8.6-x86_64-dvd.iso - - name: rocky86 - description: "Rocky Linux 8.6" - url: https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.6-x86_64-dvd1.iso \ No newline at end of file diff --git a/bootserver/roles/mosibi.pxe/handlers/main.yml b/bootserver/roles/mosibi.pxe/handlers/main.yml deleted file mode 100644 index 0d2544e..0000000 --- a/bootserver/roles/mosibi.pxe/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for mosibi.pxe diff --git a/bootserver/roles/mosibi.pxe/meta/main.yml b/bootserver/roles/mosibi.pxe/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/bootserver/roles/mosibi.pxe/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/bootserver/roles/mosibi.pxe/tasks/apache.yml b/bootserver/roles/mosibi.pxe/tasks/apache.yml deleted file mode 100644 index 6b8736c..0000000 --- a/bootserver/roles/mosibi.pxe/tasks/apache.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- - -- name: Create directories to store OSTREE images and Kickstart files - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: '0755' - loop: - - "/var/www/html/ostree" - - "/var/www/html/kickstart" - tags: - - apache - - webserver - -- name: Copy kickstart files - ansible.builtin.template: - src: "{{ item }}.j2" - dest: "/var/www/html/kickstart/{{ item }}" - mode: '0644' - loop: - - ostree.cfg - - rocky8-base.cfg - -- name: Start and enable Apache - ansible.builtin.service: - name: "{{ apache_service }}" - state: started - enabled: yes - tags: - - apache - - webserver diff --git a/bootserver/roles/mosibi.pxe/tasks/iso.yml b/bootserver/roles/mosibi.pxe/tasks/iso.yml deleted file mode 100644 index 126b5c4..0000000 --- a/bootserver/roles/mosibi.pxe/tasks/iso.yml +++ /dev/null @@ -1,76 +0,0 @@ ---- -- name: Create directories to store and mount ISO images - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: '0755' - loop: - - "{{ iso_dest_directory }}" - - "{{ iso_mount_directory }}" - tags: - - iso - -- name: Download ISO images - ansible.builtin.get_url: - url: "{{ item['url'] }}" - dest: "{{ iso_dest_directory }}/{{ _filename }}" - mode: 0644 - vars: - _filename: "{{ item['url'] | urlsplit('path') | basename }}" - loop: "{{ iso_images }}" - loop_control: - label: "{{ item['description'] }}" - register: _isos_downloaded - tags: - - iso - -- name: Mount ISO images read-only - ansible.posix.mount: - path: "{{ iso_mount_directory }}/{{ _iso['item']['name'] }}" - src: "{{ _iso['dest'] }}" - fstype: iso9660 - opts: loop,noauto - state: mounted - loop: "{{ _isos_downloaded['results'] }}" - loop_control: - label: "{{ _iso['item']['description'] }}" - loop_var: _iso - tags: - - iso - -- name: Create TFTP directories - file: - path: /var/lib/tftpboot/{{ _iso['item']['name'] }} - state: directory - mode: 0755 - loop: "{{ _isos_downloaded['results'] }}" - loop_control: - label: "{{ _iso['item']['description'] }}" - loop_var: _iso - tags: - - iso - -- name: Copy bootable kernel images for all OSs - synchronize: - src: "{{ iso_mount_directory }}/{{ _iso['item']['name'] }}/images/pxeboot/vmlinuz" - dest: "/var/lib/tftpboot/{{ _iso['item']['name'] }}/vmlinuz" - delegate_to: "{{ inventory_hostname }}" - loop: "{{ _isos_downloaded['results'] }}" - loop_control: - label: "{{ _iso['item']['description'] }}" - loop_var: _iso - tags: - - iso - -- name: Copy initrd images for all OSs - synchronize: - src: "{{ iso_mount_directory }}/{{ _iso['item']['name'] }}/images/pxeboot/initrd.img" - dest: "/var/lib/tftpboot/{{ _iso['item']['name'] }}/initrd.img" - delegate_to: "{{ inventory_hostname }}" - loop: "{{ _isos_downloaded['results'] }}" - loop_control: - label: "{{ _iso['item']['description'] }}" - loop_var: _iso - tags: - - iso - diff --git a/bootserver/roles/mosibi.pxe/tasks/main.yml b/bootserver/roles/mosibi.pxe/tasks/main.yml deleted file mode 100644 index 129f609..0000000 --- a/bootserver/roles/mosibi.pxe/tasks/main.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# tasks file for mosibi.pxe - -- name: Install all required software - ansible.builtin.package: - name: "{{ required_packages }}" - state: present - tags: - - pxe - -- name: TFTP tasks - include_tasks: tftp.yml - tags: - - pxe - - tftp - -- name: Webserver tasks - include_tasks: apache.yml - tags: - - pxe - - apache - - webserver - -- name: ISO tasks - include_tasks: iso.yml - tags: - - pxe - - iso diff --git a/bootserver/roles/mosibi.pxe/tasks/tftp.yml b/bootserver/roles/mosibi.pxe/tasks/tftp.yml deleted file mode 100644 index 7446541..0000000 --- a/bootserver/roles/mosibi.pxe/tasks/tftp.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- name: Copy bootloader files - ansible.builtin.synchronize: - src: /tftpboot/ - dest: /var/lib/tftpboot/ - delegate_to: "{{ inventory_hostname }}" - tags: - - tftp - -- name: Create pxelinux.cfg directory - file: - path: /var/lib/tftpboot/pxelinux.cfg - state: directory - mode: 0755 - owner: root - group: root - tags: - - tftp - -- name: Copy default PXE config file - template: - src: "{{ item }}.j2" - dest: "/var/lib/tftpboot/pxelinux.cfg/{{ item }}" - mode: 0644 - owner: root - group: root - loop: - - default - - 01-52-54-00-1e-59-6f - tags: - - tftp - -- name: Start and enable tftpd - ansible.builtin.service: - name: "{{ tftpd_service }}" - state: started - enabled: yes - tags: - - tftp \ No newline at end of file diff --git a/bootserver/roles/mosibi.pxe/templates/01-52-54-00-1e-59-6f.j2 b/bootserver/roles/mosibi.pxe/templates/01-52-54-00-1e-59-6f.j2 deleted file mode 100644 index bd7debc..0000000 --- a/bootserver/roles/mosibi.pxe/templates/01-52-54-00-1e-59-6f.j2 +++ /dev/null @@ -1,6 +0,0 @@ -DEFAULT linux - -label linux - SAY Now booting the Rock Linux 8.6 OSTree - KERNEL rocky86/vmlinuz - APPEND vga=normal initrd=rocky86/initrd.img inst.stage2=http://{{ dhcpd_next_server }}/repos/rocky86 inst.ks=http://{{ dhcpd_next_server }}/kickstart/ostree.cfg ksdevice=bootif inst.loglevel=debug diff --git a/bootserver/roles/mosibi.pxe/templates/default.j2 b/bootserver/roles/mosibi.pxe/templates/default.j2 deleted file mode 100644 index abe3f57..0000000 --- a/bootserver/roles/mosibi.pxe/templates/default.j2 +++ /dev/null @@ -1,20 +0,0 @@ -# display a menu with a list of installation options -default menu.c32 -# show prompt, 0 - disabled, 1 - enabled -prompt 0 -# timeout, 1 second = 10 -timeout 100 -# pick label on timeout -ONTIMEOUT 1 - -menu title ########## PXE Boot Menu ########## - -label 1 -menu label ^1) Boot from local drive. Do not install anything. -localboot 0 -menu default - -label 2 -menu label ^2) Rocky Linux 8.6 OStree -kernel rocky86/vmlinuz -append vga=normal initrd=rocky86/initrd.img inst.ks=http://{{ dhcpd_next_server }}/kickstart/ostree.cfg ksdevice=bootif diff --git a/bootserver/roles/mosibi.pxe/templates/ostree.cfg.j2 b/bootserver/roles/mosibi.pxe/templates/ostree.cfg.j2 deleted file mode 100644 index b9099b0..0000000 --- a/bootserver/roles/mosibi.pxe/templates/ostree.cfg.j2 +++ /dev/null @@ -1,14 +0,0 @@ -text -lang en_US.UTF-8 -keyboard us -timezone --utc Etc/UTC -rootpw --plaintext rocky -user --name=ansible --password=rocky --plaintext --gecos="Ansible User" -ostreesetup --nogpg --url=http://{{ dhcpd_next_server }}/ostree/repo/ --osname=rocky-ostree --remote=rocky-ostree --ref=rocky/x86_64/ostree - -# Disk -zerombr -clearpart --all --initlabel -autopart --type=plain - -reboot diff --git a/bootserver/roles/mosibi.pxe/templates/rocky8-base.cfg.j2 b/bootserver/roles/mosibi.pxe/templates/rocky8-base.cfg.j2 deleted file mode 100644 index 1f6bf3e..0000000 --- a/bootserver/roles/mosibi.pxe/templates/rocky8-base.cfg.j2 +++ /dev/null @@ -1,60 +0,0 @@ -# Install OS instead of upgrade -install -# Keyboard layouts -keyboard 'us' -# Root password -rootpw --plaintext rocky -user --name=ansible --password=rocky --plaintext --gecos="Ansible User" - -# System language -lang en_US.UTF-8 -# Firewall configuration -firewall --enabled --ssh -# Power off after installation -poweroff -# Network information -#attempting to put it in the included ks file that accepts hostname from the virsh command. -# System timezone -timezone Europe/Amsterdam --isUtc --nontp -# System authorization information -auth --useshadow --passalgo=sha512 -# Use network installation instead of CDROM installation media -url --url="http://mirror.nl.stackscale.com/rocky/8.6/BaseOS/x86_64/os" - -# Use text mode install -text -# SELinux configuration -selinux --enforcing -# Do not configure the X Window System -skipx - -firstboot --disabled - -# System bootloader configuration -bootloader --location=mbr -# Partition clearing information -clearpart --all --initlabel -# Disk partitioning information -autopart --type=lvm - -%packages -@^minimal-environment -@container-management -@system-tools -kexec-tools -vim -python3 -%end - -%post --nochroot -hostnamectl set-hostname myhost.example.com -hostnamectl --pretty set-hostname myhost.example.com -cp /etc/hostname /mnt/sysimage/etc/hostname -cp /etc/machine-info /mnt/sysimage/etc/machine-info -%end - -%post -echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user-ansible -chmod 0440 /etc/sudoers.d/user-ansible - -%end diff --git a/bootserver/roles/mosibi.pxe/tests/inventory b/bootserver/roles/mosibi.pxe/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/bootserver/roles/mosibi.pxe/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/bootserver/roles/mosibi.pxe/tests/test.yml b/bootserver/roles/mosibi.pxe/tests/test.yml deleted file mode 100644 index babf84c..0000000 --- a/bootserver/roles/mosibi.pxe/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - mosibi.pxe diff --git a/bootserver/roles/mosibi.pxe/vars/main.yml b/bootserver/roles/mosibi.pxe/vars/main.yml deleted file mode 100644 index 5fbb2a6..0000000 --- a/bootserver/roles/mosibi.pxe/vars/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# vars file for mosibi.pxe -required_packages: - - rsync - - tftp-server - - syslinux-tftpboot - - syslinux - - httpd - -tftpd_service: tftp.service -apache_service: httpd.service \ No newline at end of file diff --git a/bootserver/roles/robertdebock.dhcpd/.ansible-lint b/bootserver/roles/robertdebock.dhcpd/.ansible-lint deleted file mode 100644 index 22c6c7e..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.ansible-lint +++ /dev/null @@ -1,13 +0,0 @@ ---- -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml - - ./meta/preferences.yml - - ./molecule/default/prepare.yml - - ./molecule/default/converge.yml - - ./molecule/default/verify.yml - - ./molecule/default/collections.yml - - ./.tox - - ./.cache diff --git a/bootserver/roles/robertdebock.dhcpd/.github/FUNDING.yml b/bootserver/roles/robertdebock.dhcpd/.github/FUNDING.yml deleted file mode 100644 index 67320f0..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -github: robertdebock diff --git a/bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/bug_report.md b/bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 4bb9d98..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Create a report to help me improve - ---- - -## Describe the bug - -A clear and concise description of what the bug is. - -## Playbook - -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml ---- -YOUR PLAYBOOK HERE -``` - -## Output - -Show at least the error, possible related output, maybe just all the output. - -## Environment - -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) - -Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/feature_request.md b/bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 55a93c4..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -## Proposed feature - -A clear and concise description of what you want to happen. - -## Rationale - -Why is this feature required? - -## Additional context - -Add any other context about the feature request here. - -Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/bootserver/roles/robertdebock.dhcpd/.github/pull_request_template.md b/bootserver/roles/robertdebock.dhcpd/.github/pull_request_template.md deleted file mode 100644 index b1578c0..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/pull_request_template.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Pull request -about: Describe the proposed change - ---- - -**Describe the change** -A clear and concise description of what the pull request is. - -**Testing** -In case a feature was added, how were tests performed? diff --git a/bootserver/roles/robertdebock.dhcpd/.github/settings.yml b/bootserver/roles/robertdebock.dhcpd/.github/settings.yml deleted file mode 100644 index cefca46..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/settings.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# -# Ansible managed -# -repository: - description: Install and configure dhcpd on your system. - homepage: https://robertdebock.nl/ - topics: dhcp, network, iscdhcpserver, dhcpd, server, networking, ansible, molecule, tox, playbook, hacktoberfest diff --git a/bootserver/roles/robertdebock.dhcpd/.github/workflows/galaxy.yml b/bootserver/roles/robertdebock.dhcpd/.github/workflows/galaxy.yml deleted file mode 100644 index 1d36b74..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/workflows/galaxy.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# -# Ansible managed -# - -name: Release to Ansible Galaxy - -on: - release: - types: [created, edited, published, released] -jobs: - release: - runs-on: ubuntu-20.04 - steps: - - name: galaxy - uses: robertdebock/galaxy-action@1.1.0 - with: - galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/bootserver/roles/robertdebock.dhcpd/.github/workflows/molecule.yml b/bootserver/roles/robertdebock.dhcpd/.github/workflows/molecule.yml deleted file mode 100644 index 4ee3132..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/workflows/molecule.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -# -# Ansible managed -# - -name: Ansible Molecule - -on: - push: - tags_ignore: - - '*' - pull_request: - schedule: - - cron: '7 4 4 * *' - -jobs: - lint: - runs-on: ubuntu-20.04 - steps: - - name: checkout - uses: actions/checkout@v2 - with: - path: "${{ github.repository }}" - - name: molecule - uses: robertdebock/molecule-action@2.7.2 - with: - command: lint - test: - needs: - - lint - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - config: - - image: "alpine" - tag: "latest" - - image: "amazonlinux" - tag: "latest" - - image: "enterpriselinux" - tag: "latest" - - image: "debian" - tag: "latest" - - image: "debian" - tag: "bookworm" - - image: "fedora" - tag: "34" - - image: "fedora" - tag: "latest" - - image: "fedora" - tag: "rawhide" - - image: "ubuntu" - tag: "latest" - - image: "ubuntu" - tag: "bionic" - steps: - - name: checkout - uses: actions/checkout@v2 - with: - path: "${{ github.repository }}" - - name: disable apparmor for mysql - run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - - name: parse apparmor for mysql - run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - - name: molecule - uses: robertdebock/molecule-action@2.7.2 - with: - image: ${{ matrix.config.image }} - tag: ${{ matrix.config.tag }} diff --git a/bootserver/roles/robertdebock.dhcpd/.github/workflows/requirements2png.yml b/bootserver/roles/robertdebock.dhcpd/.github/workflows/requirements2png.yml deleted file mode 100644 index e94938d..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/workflows/requirements2png.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -# -# Ansible managed -# - -on: - - push - -name: Ansible Graphviz - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: checkout - uses: actions/checkout@v2 - with: - path: ${{ github.repository }} - - name: create png - uses: robertdebock/graphviz-action@1.0.7 - - name: Commit files - run: | - cd ${{ github.repository }} - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git add requirements.dot requirements.png - git commit -m "Add generated files" - - name: save to png branch - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - directory: ${{ github.repository }} - force: true - branch: png diff --git a/bootserver/roles/robertdebock.dhcpd/.github/workflows/todo.yml b/bootserver/roles/robertdebock.dhcpd/.github/workflows/todo.yml deleted file mode 100644 index 3e6e417..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.github/workflows/todo.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# -# Ansible managed -# - -name: "TODO 2 Issue" - -on: - push: - -jobs: - build: - runs-on: "ubuntu-20.04" - steps: - - uses: "actions/checkout@master" - - name: "TODO to Issue" - uses: "alstr/todo-to-issue-action@v2.3" - id: "todo" - with: - TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/bootserver/roles/robertdebock.dhcpd/.gitignore b/bootserver/roles/robertdebock.dhcpd/.gitignore deleted file mode 100644 index ad73ff6..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.molecule -*.log -*.swp -.tox -.cache -.DS_Store diff --git a/bootserver/roles/robertdebock.dhcpd/.gitlab-ci.yml b/bootserver/roles/robertdebock.dhcpd/.gitlab-ci.yml deleted file mode 100644 index a6c4755..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.gitlab-ci.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -image: "robertdebock/github-action-molecule:3.3.1" - -services: - - docker:dind - -variables: - DOCKER_HOST: "tcp://docker:2375" - PY_COLORS: 1 - -molecule: - script: - - image=${image} tag=${tag} molecule test - rules: - - if: $CI_COMMIT_REF_NAME == "master" - retry: 1 - parallel: - matrix: - - image: "alpine" - tag: "latest" - - image: "amazonlinux" - tag: "latest" - - image: "enterpriselinux" - tag: "latest" - - image: "debian" - tag: "latest" - - image: "debian" - tag: "bookworm" - - image: "fedora" - tag: "34" - - image: "fedora" - tag: "latest" - - image: "fedora" - tag: "rawhide" - - image: "ubuntu" - tag: "latest" - - image: "ubuntu" - tag: "bionic" - -galaxy: - script: - - ansible-galaxy role import --api-key ${GALAXY_API_KEY} ${CI_PROJECT_NAMESPACE} ${CI_PROJECT_NAME} - rules: - - if: $CI_COMMIT_TAG != null diff --git a/bootserver/roles/robertdebock.dhcpd/.later.yml b/bootserver/roles/robertdebock.dhcpd/.later.yml deleted file mode 100644 index 83b9158..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.later.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -rules: - version: "0.2" - exclude_files: - - meta/argument_specs.yml - - meta/exception.yml - - meta/preferences.yml - - meta/version.yml - - requirements.txt - exclude_filter: - - LINT0009 - - ANSIBLE0007 diff --git a/bootserver/roles/robertdebock.dhcpd/.pre-commit-config.yaml b/bootserver/roles/robertdebock.dhcpd/.pre-commit-config.yaml deleted file mode 100644 index 9adf4a9..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.pre-commit-config.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-added-large-files - - - repo: https://github.com/adrienverge/yamllint - rev: v1.26.3 - hooks: - - id: yamllint - args: [-c=.yamllint] - - - repo: https://github.com/robertdebock/pre-commit - rev: v1.4.4 - hooks: - - id: ansible_role_find_unused_variable - - id: ansible_role_find_empty_files - - id: ansible_role_find_empty_directories - - id: ansible_role_fix_readability - - id: ansible_role_find_undefined_handlers - - id: ansible_role_find_unquoted_values diff --git a/bootserver/roles/robertdebock.dhcpd/.travis.yml b/bootserver/roles/robertdebock.dhcpd/.travis.yml deleted file mode 100644 index 3fcce0a..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -os: linux -dist: xenial - -python: - - "3.9" - -services: - - docker - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install ansible ansible-lint yamllint - -script: - - yamllint . - - ansible-lint - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - email: false diff --git a/bootserver/roles/robertdebock.dhcpd/.yamllint b/bootserver/roles/robertdebock.dhcpd/.yamllint deleted file mode 100644 index a7ff098..0000000 --- a/bootserver/roles/robertdebock.dhcpd/.yamllint +++ /dev/null @@ -1,16 +0,0 @@ ---- -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable - -ignore: | - .tox/ - .cache/ diff --git a/bootserver/roles/robertdebock.dhcpd/CODE_OF_CONDUCT.md b/bootserver/roles/robertdebock.dhcpd/CODE_OF_CONDUCT.md deleted file mode 100644 index 0d97a6f..0000000 --- a/bootserver/roles/robertdebock.dhcpd/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behaviour that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behaviour by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at robert@meinit.nl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/bootserver/roles/robertdebock.dhcpd/CONTRIBUTING.md b/bootserver/roles/robertdebock.dhcpd/CONTRIBUTING.md deleted file mode 100644 index d0c3486..0000000 --- a/bootserver/roles/robertdebock.dhcpd/CONTRIBUTING.md +++ /dev/null @@ -1,76 +0,0 @@ -# [Please contribute](#please-contribute) - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## [Step by step](#step-by-step) - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### [1. Make an issue.](#1-make-an-issue) - -When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-dhcpd/issues). - -Making the issue help me and others to find similar problems in the future. - -### [2. Fork the project.](#2-fork-the-project) - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-dhcpd), click `fork`. This copies everything to your GitHub namespace. - -### [3. Make the changes](#3-make-the-changes) - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/ansible-role-dhcpd.git -``` - -Now you can start to edit on your laptop. - -### [4. Optionally: test your changes](#4-optionally-test-your-changes) - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox ansible-lint docker -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### [6. Make a pull request](#6-make-a-pull-request) - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### [7. Wait](#7-wait) - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. - -Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/bootserver/roles/robertdebock.dhcpd/LICENSE b/bootserver/roles/robertdebock.dhcpd/LICENSE deleted file mode 100644 index e770af8..0000000 --- a/bootserver/roles/robertdebock.dhcpd/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2021 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/bootserver/roles/robertdebock.dhcpd/README.md b/bootserver/roles/robertdebock.dhcpd/README.md deleted file mode 100644 index d50b36f..0000000 --- a/bootserver/roles/robertdebock.dhcpd/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# [dhcpd](#dhcpd) - -Install and configure dhcpd on your system. - -|GitHub|GitLab|Quality|Downloads|Version| -|------|------|-------|---------|-------| -|[![github](https://github.com/robertdebock/ansible-role-dhcpd/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-dhcpd/actions)|[![gitlab](https://gitlab.com/robertdebock/ansible-role-dhcpd/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-dhcpd)|[![quality](https://img.shields.io/ansible/quality/21853)](https://galaxy.ansible.com/robertdebock/dhcpd)|[![downloads](https://img.shields.io/ansible/role/d/21853)](https://galaxy.ansible.com/robertdebock/dhcpd)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-dhcpd.svg)](https://github.com/robertdebock/ansible-role-dhcpd/releases/)| - -## [Example Playbook](#example-playbook) - -This example is taken from `molecule/default/converge.yml` and is tested on each push, pull request and release. -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - vars: - dhcpd_subnets: - - network: "{{ ansible_default_ipv4.network }}" - netmask: "255.255.255.0" - - roles: - - role: robertdebock.dhcpd -``` - -The machine needs to be prepared. In CI this is done using `molecule/default/prepare.yml`: -```yaml ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - role: robertdebock.bootstrap - - role: robertdebock.apt_autostart - - role: robertdebock.core_dependencies -``` - -Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. - -## [Role Variables](#role-variables) - -The default values for the variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for dhcpd - -# Configuration settings for the daemon. -dhcpd_ipv4_interface: "{{ ansible_default_ipv4.interface | default('eth0') }}" - -# Setting applicable for the global scope. -dhcpd_default_lease_time: 600 -dhcpd_max_lease_time: 7200 -dhcpd_subnet_mask: "255.255.255.0" -dhcpd_broadcast_address: "10.0.2.255" -dhcpd_routers: "10.0.2.254" -dhcpd_domain_name_servers: - - "192.168.1.1" - - "192.168.1.2" -dhcpd_domain_search: example.com - -# The image to serve for PXE booting. -dhcpd_filename: "pxelinux.0" -# Where the image can be downloaded from. -dhcpd_next_server: "10.0.2.254" - -# DHCP works with subnets, a list containing properties per subnet. -dhcpd_subnets: - - network: "10.0.2.0" - netmask: "255.255.255.0" - range_start: "10.0.2.200" - range_end: "10.0.2.210" -``` - -## [Requirements](#requirements) - -- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-dhcpd/blob/master/requirements.txt). - -## [Status of used roles](#status-of-requirements) - -The following roles are used to prepare a system. You can prepare your system in another way. - -| Requirement | GitHub | GitLab | -|-------------|--------|--------| -|[robertdebock.apt_autostart](https://galaxy.ansible.com/robertdebock/apt_autostart)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-apt_autostart/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-apt_autostart/actions)|[![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-apt_autostart/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-apt_autostart)| -|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-bootstrap)| -|[robertdebock.core_dependencies](https://galaxy.ansible.com/robertdebock/core_dependencies)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-core_dependencies/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-core_dependencies/actions)|[![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-core_dependencies/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-core_dependencies)| - -## [Context](#context) - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-dhcpd/png/requirements.png "Dependencies") - -## [Compatibility](#compatibility) - -This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): - -|container|tags| -|---------|----| -|alpine|all| -|amazon|Candidate| -|el|8| -|debian|all| -|fedora|all| -|ubuntu|all| - -The minimum version of Ansible required is 2.10, tests have been done to: - -- The previous version. -- The current version. -- The development version. - -## [Exceptions](#exceptions) - -Some roles can't run on a specific distribution or version. Here are some exceptions. - -| variation | reason | -|---------------------------|------------------------| -| Suse | Starting ISC DHCPv4 Server chown: invalid user: 'dhcpd:root -shadow -... | - - -If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-dhcpd/issues) - -## [License](#license) - -Apache-2.0 - -## [Author Information](#author-information) - -[Robert de Bock](https://robertdebock.nl/) - -Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/bootserver/roles/robertdebock.dhcpd/SECURITY.md b/bootserver/roles/robertdebock.dhcpd/SECURITY.md deleted file mode 100644 index ad0cd5c..0000000 --- a/bootserver/roles/robertdebock.dhcpd/SECURITY.md +++ /dev/null @@ -1,25 +0,0 @@ -# [Security Policy](#security-policy) - -This software implements other software, it's not very likely that this software introduces new vulnerabilities. - -## [Supported Versions](#supported-versions) - -The current major version is supported. For example if the current version is 3.4.1: - -| Version | Supported | -| ------- | ------------------ | -| 3.4.1 | :white_check_mark: | -| 3.4.x | :white_check_mark: | -| 3.x.x | :white_check_mark: | -| 2.0.0 | :x: | -| 1.0.0 | :x: | - -## [Reporting a Vulnerability](#reporting-a-vulnarability) - -Please [open an issue](https://github.com/robertdebock/ansible-role-dhcpd/issues) describing the vulnerability. - -Tell them where to go, how often they can expect to get an update on a -reported vulnerability, what to expect if the vulnerability is accepted or -declined, etc. - -Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/bootserver/roles/robertdebock.dhcpd/defaults/main.yml b/bootserver/roles/robertdebock.dhcpd/defaults/main.yml deleted file mode 100644 index 23d5b7c..0000000 --- a/bootserver/roles/robertdebock.dhcpd/defaults/main.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# defaults file for dhcpd - -# Configuration settings for the daemon. -dhcpd_ipv4_interface: "{{ ansible_default_ipv4.interface | default('eth0') }}" - -# Setting applicable for the global scope. -dhcpd_default_lease_time: 600 -dhcpd_max_lease_time: 7200 -dhcpd_subnet_mask: "255.255.255.0" -dhcpd_broadcast_address: "10.0.2.255" -dhcpd_routers: "10.0.2.254" -dhcpd_domain_name_servers: - - "192.168.1.1" - - "192.168.1.2" -dhcpd_domain_search: example.com - -# The image to serve for PXE booting. -dhcpd_filename: "pxelinux.0" -# Where the image can be downloaded from. -dhcpd_next_server: "10.0.2.254" - -# DHCP works with subnets, a list containing properties per subnet. -dhcpd_subnets: - - network: "10.0.2.0" - netmask: "255.255.255.0" - range_start: "10.0.2.200" - range_end: "10.0.2.210" diff --git a/bootserver/roles/robertdebock.dhcpd/handlers/main.yml b/bootserver/roles/robertdebock.dhcpd/handlers/main.yml deleted file mode 100644 index 23f0b52..0000000 --- a/bootserver/roles/robertdebock.dhcpd/handlers/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# handlers file for dhcpd - -- name: restart dhcpd - ansible.builtin.service: - name: "{{ dhcpd_service }}" - state: restarted - when: - - not ansible_check_mode | bool diff --git a/bootserver/roles/robertdebock.dhcpd/meta/.galaxy_install_info b/bootserver/roles/robertdebock.dhcpd/meta/.galaxy_install_info deleted file mode 100644 index 2a8edc6..0000000 --- a/bootserver/roles/robertdebock.dhcpd/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: 'Fri 27 May 2022 09:48:26 AM ' -version: 4.0.0 diff --git a/bootserver/roles/robertdebock.dhcpd/meta/exception.yml b/bootserver/roles/robertdebock.dhcpd/meta/exception.yml deleted file mode 100644 index 96c3cc0..0000000 --- a/bootserver/roles/robertdebock.dhcpd/meta/exception.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -exceptions: - - variation: Suse - reason: "Starting ISC DHCPv4 Server chown: invalid user: 'dhcpd:root\nshadow\n..." diff --git a/bootserver/roles/robertdebock.dhcpd/meta/main.yml b/bootserver/roles/robertdebock.dhcpd/meta/main.yml deleted file mode 100644 index 7d72d3e..0000000 --- a/bootserver/roles/robertdebock.dhcpd/meta/main.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -galaxy_info: - author: Robert de Bock - namespace: robertdebock - role_name: dhcpd - description: Install and configure dhcpd on your system. - license: Apache-2.0 - company: none - min_ansible_version: "2.10" - - platforms: - - name: Alpine - versions: - - all - - name: Amazon - versions: - - Candidate - - name: EL - versions: - - 8 - - name: Debian - versions: - - all - - name: Fedora - versions: - - all - - name: Ubuntu - versions: - - all - - galaxy_tags: - - dhcp - - network - - iscdhcpserver - - dhcpd - - server - - networking - -dependencies: [] diff --git a/bootserver/roles/robertdebock.dhcpd/meta/preferences.yml b/bootserver/roles/robertdebock.dhcpd/meta/preferences.yml deleted file mode 100644 index e7fdebf..0000000 --- a/bootserver/roles/robertdebock.dhcpd/meta/preferences.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -tox_parallel: yes diff --git a/bootserver/roles/robertdebock.dhcpd/molecule/default/collections.yml b/bootserver/roles/robertdebock.dhcpd/molecule/default/collections.yml deleted file mode 100644 index b869f41..0000000 --- a/bootserver/roles/robertdebock.dhcpd/molecule/default/collections.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -collections: - - name: community.docker - - name: community.general diff --git a/bootserver/roles/robertdebock.dhcpd/molecule/default/converge.yml b/bootserver/roles/robertdebock.dhcpd/molecule/default/converge.yml deleted file mode 100644 index c1c36da..0000000 --- a/bootserver/roles/robertdebock.dhcpd/molecule/default/converge.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - vars: - dhcpd_subnets: - - network: "{{ ansible_default_ipv4.network }}" - netmask: "255.255.255.0" - - roles: - - role: ansible-role-dhcpd diff --git a/bootserver/roles/robertdebock.dhcpd/molecule/default/molecule.yml b/bootserver/roles/robertdebock.dhcpd/molecule/default/molecule.yml deleted file mode 100644 index 9b3d769..0000000 --- a/bootserver/roles/robertdebock.dhcpd/molecule/default/molecule.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# -# Ansible managed -# -dependency: - name: galaxy - options: - role-file: requirements.yml -lint: | - set -e - yamllint . - ansible-lint - ansible-later -driver: - name: docker -platforms: - - name: "dhcpd-${image:-fedora}-${tag:-latest}${TOX_ENVNAME}" - image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}" - command: /sbin/init - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: yes - pre_build_image: yes -provisioner: - name: ansible -verifier: - name: ansible diff --git a/bootserver/roles/robertdebock.dhcpd/molecule/default/prepare.yml b/bootserver/roles/robertdebock.dhcpd/molecule/default/prepare.yml deleted file mode 100644 index cb5aa6f..0000000 --- a/bootserver/roles/robertdebock.dhcpd/molecule/default/prepare.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - role: robertdebock.bootstrap - - role: robertdebock.apt_autostart - - role: robertdebock.core_dependencies diff --git a/bootserver/roles/robertdebock.dhcpd/molecule/default/verify.yml b/bootserver/roles/robertdebock.dhcpd/molecule/default/verify.yml deleted file mode 100644 index 37f1090..0000000 --- a/bootserver/roles/robertdebock.dhcpd/molecule/default/verify.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Verify - hosts: all - become: yes - gather_facts: no - - tasks: - - name: check if connection still works - ansible.builtin.ping: diff --git a/bootserver/roles/robertdebock.dhcpd/requirements.txt b/bootserver/roles/robertdebock.dhcpd/requirements.txt deleted file mode 100644 index ba1d384..0000000 --- a/bootserver/roles/robertdebock.dhcpd/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# These role have been tested with these PIP component. -# To install the required version yourself, use a command as: -# `python -m pip --user install -r requirements.txt` -# See the pip requirements file documentation for details: -# https://pip.pypa.io/en/stable/user_guide/#requirements-files -# -# Tests run on the previous and current (latest) version of Ansible. -ansible>=2.10 -# Some Jinja2 filters are used that are available in the newer releases. -jinja2>=2.11.2 diff --git a/bootserver/roles/robertdebock.dhcpd/requirements.yml b/bootserver/roles/robertdebock.dhcpd/requirements.yml deleted file mode 100644 index 9cb2008..0000000 --- a/bootserver/roles/robertdebock.dhcpd/requirements.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -roles: - - name: robertdebock.apt_autostart - - name: robertdebock.bootstrap - - name: robertdebock.core_dependencies -collections: - - name: community.general diff --git a/bootserver/roles/robertdebock.dhcpd/tasks/assert.yml b/bootserver/roles/robertdebock.dhcpd/tasks/assert.yml deleted file mode 100644 index 169b4be..0000000 --- a/bootserver/roles/robertdebock.dhcpd/tasks/assert.yml +++ /dev/null @@ -1,96 +0,0 @@ ---- - -- name: test if dhcpd_ipv4_interface is set correctly - ansible.builtin.assert: - that: - - dhcpd_ipv4_interface is defined - - dhcpd_ipv4_interface is string - quiet: yes - -- name: test if dhcpd_default_lease_time is set correctly - ansible.builtin.assert: - that: - - dhcpd_default_lease_time is defined - - dhcpd_default_lease_time is number - - dhcpd_default_lease_time > 0 - quiet: yes - -- name: test if dhcpd_max_lease_time is set correctly - ansible.builtin.assert: - that: - - dhcpd_max_lease_time is defined - - dhcpd_max_lease_time is number - - dhcpd_max_lease_time > 0 - quiet: yes - -- name: test if dhcpd_subnet_mask is set correctly - ansible.builtin.assert: - that: - - dhcpd_subnet_mask is defined - - dhcpd_subnet_mask is string - quiet: yes - -- name: test if dhcpd_broadcast_address is set correctly - ansible.builtin.assert: - that: - - dhcpd_broadcast_address is defined - - dhcpd_broadcast_address is string - quiet: yes - -- name: test if dhcpd_routers is set correctly - ansible.builtin.assert: - that: - - dhcpd_routers is defined - - dhcpd_routers is string - quiet: yes - -- name: test if dhcpd_domain_name_servers is set correctly - ansible.builtin.assert: - that: - - dhcpd_domain_name_servers is defined - - dhcpd_domain_name_servers is iterable - quiet: yes - -- name: test if dhcpd_domain_search is set correctly - ansible.builtin.assert: - that: - - dhcpd_domain_search is defined - - dhcpd_domain_search is string - quiet: yes - -- name: test if dhcpd_filename is set correctly - ansible.builtin.assert: - that: - - dhcpd_filename is defined - - dhcpd_filename is string - quiet: yes - -- name: test if dhcpd_next_server is set correctly - ansible.builtin.assert: - that: - - dhcpd_next_server is defined - - dhcpd_next_server is string - quiet: yes - -- name: test if dhcpd_subnets is set correctly - ansible.builtin.assert: - that: - - dhcpd_subnets is iterable - quiet: yes - when: - - dhcpd_subnets is defined - - dhcpd_subnets is string - -- name: test if item in dhcpd_subnets is set correctly - ansible.builtin.assert: - that: - - item.network is defined - - item.network is string - - item.netmask is defined - - item.netmask is string - quiet: yes - loop: "{{ dhcpd_subnets }}" - loop_control: - label: "{{ item.network }}" - when: - - dhcpd_subnets is defined diff --git a/bootserver/roles/robertdebock.dhcpd/tasks/main.yml b/bootserver/roles/robertdebock.dhcpd/tasks/main.yml deleted file mode 100644 index b78d161..0000000 --- a/bootserver/roles/robertdebock.dhcpd/tasks/main.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- -# tasks file for dhcpd - -- name: import assert.yml - ansible.builtin.import_tasks: assert.yml - run_once: yes - delegate_to: localhost - -- name: install dhcpd software - ansible.builtin.package: - name: "{{ dhcpd_packages }}" - state: present - -- name: configure defaults - ansible.builtin.template: - src: "{{ dhcpd_defaults_src }}" - dest: "{{ dhcpd_defaults_dest }}" - backup: yes - mode: "0640" - when: - - ansible_os_family == "Debian" or - ansible_distribution == "openSUSE Leap" - notify: restart dhcpd - -- name: configure software - ansible.builtin.template: - src: dhcpd.conf.j2 - dest: "{{ dhcpd_confdir }}/dhcpd.conf" - backup: yes - mode: "0640" - notify: restart dhcpd - -- name: start and enable software - block: - - name: start and enable software - ansible.builtin.service: - name: "{{ dhcpd_service }}" - state: started - enabled: yes - rescue: - - name: install procps - ansible.builtin.package: - name: procps - state: present - - - name: stop dhcpd - ansible.builtin.command: - cmd: pkill dhcpd - - - name: remove pid file - ansible.builtin.file: - path: /var/run/dhcpd.pid - state: absent - - - name: start and enable software again - ansible.builtin.service: - name: "{{ dhcpd_service }}" - state: started - enabled: yes diff --git a/bootserver/roles/robertdebock.dhcpd/templates/dhcpd.conf.j2 b/bootserver/roles/robertdebock.dhcpd/templates/dhcpd.conf.j2 deleted file mode 100644 index a5f0d69..0000000 --- a/bootserver/roles/robertdebock.dhcpd/templates/dhcpd.conf.j2 +++ /dev/null @@ -1,20 +0,0 @@ -{{ ansible_managed | comment }} -default-lease-time {{ dhcpd_default_lease_time }}; -max-lease-time {{ dhcpd_max_lease_time }}; -option subnet-mask {{ dhcpd_subnet_mask }}; -option broadcast-address {{ dhcpd_broadcast_address }}; -option routers {{ dhcpd_routers }}; -option domain-name-servers {{ dhcpd_domain_name_servers | join(', ') }}; -option domain-search "{{ dhcpd_domain_search }}"; - -{% for subnet in dhcpd_subnets %} -subnet {{ subnet.network }} netmask {{ subnet.netmask }} { -{% if subnet.range_start is defined and subnet.range_end is defined %} - range {{ subnet.range_start }} {{ subnet.range_end }}; -{% endif %} -{% if dhcpd_filename is defined %} filename "{{ dhcpd_filename }}"; -{% endif %} -{% if dhcpd_next_server is defined %} next-server {{ dhcpd_next_server }}; -{% endif %} -} -{% endfor %} diff --git a/bootserver/roles/robertdebock.dhcpd/templates/dhcpd.j2 b/bootserver/roles/robertdebock.dhcpd/templates/dhcpd.j2 deleted file mode 100644 index ed53e8a..0000000 --- a/bootserver/roles/robertdebock.dhcpd/templates/dhcpd.j2 +++ /dev/null @@ -1,13 +0,0 @@ -{{ ansible_managed | comment }} -DHCPD_INTERFACE="{{ dhcpd_ipv4_interface }}" -DHCPD6_INTERFACE="" -DHCPD_IFUP_RESTART="" -DHCPD6_IFUP_RESTART="" -DHCPD_RUN_CHROOTED="yes" -DHCPD6_RUN_CHROOTED="yes" -DHCPD_CONF_INCLUDE_FILES="/etc/dhcpd.d" -DHCPD6_CONF_INCLUDE_FILES="/etc/dhcpd6.d" -DHCPD_RUN_AS="dhcpd" -DHCPD6_RUN_AS="dhcpd" -DHCPD_OTHER_ARGS="" -DHCPD6_OTHER_ARGS="" diff --git a/bootserver/roles/robertdebock.dhcpd/templates/isc-dhcp-server.j2 b/bootserver/roles/robertdebock.dhcpd/templates/isc-dhcp-server.j2 deleted file mode 100644 index 652c20b..0000000 --- a/bootserver/roles/robertdebock.dhcpd/templates/isc-dhcp-server.j2 +++ /dev/null @@ -1,4 +0,0 @@ -{{ ansible_managed | comment }} -INTERFACESv4="{{ dhcpd_ipv4_interface }}" - -INTERFACESv6="" diff --git a/bootserver/roles/robertdebock.dhcpd/tox.ini b/bootserver/roles/robertdebock.dhcpd/tox.ini deleted file mode 100644 index c1ade81..0000000 --- a/bootserver/roles/robertdebock.dhcpd/tox.ini +++ /dev/null @@ -1,25 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.21.4 -envlist = py{39}-ansible-{2.9,2.10,2.11} - -skipsdist = true - -[testenv] -deps = - 2.9: ansible == 2.9.* - 2.10: ansible-base == 2.10.* - 2.11: ansible-core == 2.11.* - molecule[docker] - docker == 4.* - ansible-lint == 5.* -commands = molecule test -setenv = - TOX_ENVNAME={envname} - PY_COLORS=1 - ANSIBLE_FORCE_COLOR=1 - ANSIBLE_ROLES_PATH=../ - -passenv = namespace image tag DOCKER_HOST diff --git a/bootserver/roles/robertdebock.dhcpd/vars/main.yml b/bootserver/roles/robertdebock.dhcpd/vars/main.yml deleted file mode 100644 index 5bd9dfa..0000000 --- a/bootserver/roles/robertdebock.dhcpd/vars/main.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -# vars file for dhcpd - -_dhcpd_packages: - default: - - dhcp - Amazon: - - dhcp - Debian: - - isc-dhcp-server - CentOS-7: - - dhcp - Red Hat Enterprise Linux-7: - - dhcp - RedHat: &redhat_packages - - dhcp-server - Rocky: *redhat_packages - Suse: - - dhcp-server - -dhcpd_packages: "{{ _dhcpd_packages[ansible_distribution ~ '-' ~ ansible_distribution_major_version] | default(_dhcpd_packages[ansible_distribution] | default(_dhcpd_packages[ansible_os_family] | default(_dhcpd_packages['default'] ))) }}" - -_dhcpd_defaults_src: - Debian: isc-dhcp-server.j2 - Suse: dhcpd.j2 - -dhcpd_defaults_src: "{{ _dhcpd_defaults_src[ansible_os_family] }}" - -_dhcpd_defaults_dest: - Debian: /etc/default/isc-dhcp-server - Suse: /etc/sysconfig/dhcpd - -dhcpd_defaults_dest: "{{ _dhcpd_defaults_dest[ansible_os_family] }}" - -_dhcpd_service: - default: dhcpd - Debian: isc-dhcp-server - -dhcpd_service: "{{ _dhcpd_service[ansible_os_family] | default (_dhcpd_service['default'] ) }}" - -_dhcpd_confdir: - default: /etc/dhcp - Suse: /etc - -dhcpd_confdir: "{{ _dhcpd_confdir[ansible_os_family] | default (_dhcpd_confdir['default'] ) }}" diff --git a/manifests/bootable-rpm-ostree.yaml b/manifests/bootable-rpm-ostree.yaml new file mode 100644 index 0000000..c93ecbe --- /dev/null +++ b/manifests/bootable-rpm-ostree.yaml @@ -0,0 +1,53 @@ +# This minimal base starts just from: kernel + systemd + rpm-ostree + bootloader. +# The intent of this is to inherit from this if you are doing something highly +# custom that e.g. might not involve Ignition or podman, but you do want +# rpm-ostree. +# We expect most people though using coreos-assembler to inherit from +# fedora-coreos-base.yaml. +packages: + # Kernel + systemd. + - kernel systemd + # linux-firmware now a recommends so let's explicitly include it + # https://gitlab.com/cki-project/kernel-ark/-/commit/32271d0cd9bd52d386eb35497c4876a8f041f70b + # https://src.fedoraproject.org/rpms/kernel/c/f55c3e9ed8605ff28cb9a922efbab1055947e213?branch=rawhide + - linux-firmware + # rpm-ostree + - rpm-ostree nss-altfiles + +# bootloader +packages-aarch64: + - grub2-efi-aa64 efibootmgr shim + # firmware updates + - fwupd +packages-ppc64le: + - grub2 ostree-grub2 + # firmware updates + - fwupd +packages-s390x: + # On Fedora, this is provided by s390utils-core. on RHEL, this is for now + # provided by s390utils-base, but soon will be -core too. + - /usr/sbin/zipl + # for Secure Execution + - veritysetup +packages-x86_64: + - grub2 grub2-efi-x64 efibootmgr shim + - microcode_ctl + # firmware updates + - fwupd + +postprocess: + # See: https://github.com/coreos/fedora-coreos-tracker/issues/1253 + # https://bugzilla.redhat.com/show_bug.cgi?id=2112857 + # https://github.com/coreos/rpm-ostree/issues/3918 + # Temporary workaround to remove the SetGID binary from liblockfile that is + # pulled by the s390utils but not needed for /usr/sbin/zipl. + - | + #!/usr/bin/env bash + set -xeuo pipefail + rm -f /usr/bin/dotlockfile + +exclude-packages: + # Exclude kernel-debug-core to make sure that it doesn't somehow get + # chosen as the package to satisfy the `kernel-core` dependency from + # the kernel package. + - kernel-debug-core diff --git a/manifests/bootupd.yaml b/manifests/bootupd.yaml new file mode 100644 index 0000000..ca8c5de --- /dev/null +++ b/manifests/bootupd.yaml @@ -0,0 +1,13 @@ +# Integration with https://github.com/coreos/bootupd +# xref https://github.com/coreos/fedora-coreos-tracker/issues/510 +packages: + - bootupd + +postprocess: + - | + #!/bin/bash + set -xeuo pipefail + # Until we have https://github.com/coreos/rpm-ostree/pull/2275 + mkdir -p /run + # Transforms /usr/lib/ostree-boot into a bootupd-compatible update payload + /usr/bin/bootupctl backend generate-update-metadata / diff --git a/manifests/fallback-hostname.yaml b/manifests/fallback-hostname.yaml new file mode 100644 index 0000000..f3bc6b4 --- /dev/null +++ b/manifests/fallback-hostname.yaml @@ -0,0 +1,11 @@ +postprocess: + # Set the fallback hostname to `localhost`. This can be removed + # once we are based on Fedora 37+. + # See https://github.com/coreos/fedora-coreos-tracker/issues/902 + - | + #!/usr/bin/env bash + set -euxo pipefail + source /etc/os-release + if [ -z "${DEFAULT_HOSTNAME:-}" ]; then + echo 'DEFAULT_HOSTNAME=localhost' >> /usr/lib/os-release + fi diff --git a/manifests/ignition-and-ostree.yaml b/manifests/ignition-and-ostree.yaml new file mode 100644 index 0000000..8416a6d --- /dev/null +++ b/manifests/ignition-and-ostree.yaml @@ -0,0 +1,44 @@ +# Defines the "core" of a Fedora CoreOS like system; basically (ignition, ostree) +# plus other default tweaks. Things in this file should be something we expect +# basically everyone using both Ignition and (rpm-)ostree to want. +# It may be used as an inheritance base by other projects like Fedora Silverblue or RHCOS. +# One good model is to add fedora-coreos-config as a git submodule. See: +# https://github.com/coreos/coreos-assembler/pull/639 + +# Include rpm-ostree + kernel + bootloader +include: bootable-rpm-ostree.yaml + +# Modern defaults we want +boot-location: modules +tmp-is-dir: true + +# Required by Ignition, and makes the system not compatible with Anaconda +machineid-compat: false + +packages: + - ignition + - dracut-network + # for encryption + - clevis clevis-luks clevis-dracut clevis-systemd + +remove-from-packages: + # We don't want systemd-firstboot.service. It conceptually conflicts with + # Ignition. We also inject runtime bits to disable it in systemd-firstboot.service.d/fcos-disable.conf + # to make it easier to use systemd builds from git. + - [systemd, /usr/bin/systemd-firstboot, + /usr/lib/systemd/system/systemd-firstboot.service, + /usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service] + # We don't want auto-generated mount units. See also + # https://github.com/systemd/systemd/issues/13099 + - [systemd-udev, /usr/lib/systemd/system-generators/systemd-gpt-auto-generator] + +postprocess: + # Undo RPM scripts enabling units; we want the presets to be canonical + # https://github.com/projectatomic/rpm-ostree/issues/1803 + - | + #!/usr/bin/env bash + set -xeuo pipefail + rm -rf /etc/systemd/system/* + systemctl preset-all + rm -rf /etc/systemd/user/* + systemctl --user --global preset-all diff --git a/manifests/rocky-ostree-base.yaml b/manifests/rocky-ostree-base.yaml index 768b37b..3406eb1 100644 --- a/manifests/rocky-ostree-base.yaml +++ b/manifests/rocky-ostree-base.yaml @@ -1,3 +1,12 @@ +include: + - ignition-and-ostree.yaml + + +conditional-include: + - if: releasever <= 8 + include: fallback-hostname.yaml + + packages: - rpm - policycoreutils @@ -33,107 +42,7 @@ check-groups: units: - getty@tty1.service - -# Integration with bootupd -packages: - - bootupd - -postprocess: - - | - #!/bin/bash - set -xeuo pipefail - # Until we have https://github.com/coreos/rpm-ostree/pull/2275 - mkdir -p /run - # Transforms /usr/lib/ostree-boot into a bootupd-compatible update payload - /usr/bin/bootupctl backend generate-update-metadata / - - - -# This minimal base starts just from: kernel + systemd + rpm-ostree + bootloader. -# The intent of this is to inherit from this if you are doing something highly -# custom that e.g. might not involve Ignition or podman, but you do want -# rpm-ostree. -# We expect most people though using coreos-assembler to inherit from -# fedora-coreos-base.yaml. -packages: - # Kernel + systemd. - - kernel systemd - # linux-firmware now a recommends so let's explicitly include it - # https://gitlab.com/cki-project/kernel-ark/-/commit/32271d0cd9bd52d386eb35497c4876a8f041f70b - # https://src.fedoraproject.org/rpms/kernel/c/f55c3e9ed8605ff28cb9a922efbab1055947e213?branch=rawhide - - linux-firmware - # rpm-ostree - - rpm-ostree nss-altfiles - -# bootloader -packages-aarch64: - - grub2-efi-aa64 efibootmgr shim - # firmware updates - - fwupd -packages-ppc64le: - - grub2 ostree-grub2 - # firmware updates - - fwupd -packages-s390x: - # On Fedora, this is provided by s390utils-core. on RHEL, this is for now - # provided by s390utils-base, but soon will be -core too. - - /usr/sbin/zipl - # for Secure Execution - - veritysetup -packages-x86_64: - - grub2 grub2-efi-x64 efibootmgr shim - - microcode_ctl - # firmware updates - - fwupd - -postprocess: - # See: https://github.com/coreos/fedora-coreos-tracker/issues/1253 - # https://bugzilla.redhat.com/show_bug.cgi?id=2112857 - # https://github.com/coreos/rpm-ostree/issues/3918 - # Temporary workaround to remove the SetGID binary from liblockfile that is - # pulled by the s390utils but not needed for /usr/sbin/zipl. - - | - #!/usr/bin/env bash - set -xeuo pipefail - rm -f /usr/bin/dotlockfile -exclude-packages: - # Exclude kernel-debug-core to make sure that it doesn't somehow get - # chosen as the package to satisfy the `kernel-core` dependency from - # the kernel package. - - kernel-debug-core - - -# Modern defaults we want -boot-location: modules -tmp-is-dir: true - -# Required by Ignition, and makes the system not compatible with Anaconda -machineid-compat: false - -packages: - - ignition - - dracut-network - # for encryption - - clevis clevis-luks clevis-dracut clevis-systemd - -remove-from-packages: - # We don't want systemd-firstboot.service. It conceptually conflicts with - # Ignition. We also inject runtime bits to disable it in systemd-firstboot.service.d/fcos-disable.conf - # to make it easier to use systemd builds from git. - - [systemd, /usr/bin/systemd-firstboot, - /usr/lib/systemd/system/systemd-firstboot.service, - /usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service] - # We don't want auto-generated mount units. See also - # https://github.com/systemd/systemd/issues/13099 - - [systemd-udev, /usr/lib/systemd/system-generators/systemd-gpt-auto-generator] - -postprocess: - # Undo RPM scripts enabling units; we want the presets to be canonical - # https://github.com/projectatomic/rpm-ostree/issues/1803 - - | - #!/usr/bin/env bash - set -xeuo pipefail - rm -rf /etc/systemd/system/* - systemctl preset-all - rm -rf /etc/systemd/user/* - systemctl --user --global preset-all +# See https://github.com/coreos/bootupd +arch-include: + x86_64: bootupd.yaml + aarch64: bootupd.yaml