From 5b84d44d5b849df5d5da6ed0776c1b2debae0e2b Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Wed, 21 Jul 2021 00:27:17 +0700 Subject: [PATCH] Remove unused Ansible files --- metal/Makefile | 5 ----- metal/group_vars/all.yml | 4 ---- metal/roles/pxe-server/defaults/main.yml | 8 -------- metal/roles/pxe-server/tasks/main.yml | 4 +--- metal/shutdown.yml | 11 ----------- 5 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 metal/group_vars/all.yml delete mode 100644 metal/roles/pxe-server/defaults/main.yml delete mode 100644 metal/shutdown.yml diff --git a/metal/Makefile b/metal/Makefile index d415b09d..35d8df82 100644 --- a/metal/Makefile +++ b/metal/Makefile @@ -7,10 +7,5 @@ run: --inventory hosts.yml \ main.yml -shutdown: - ansible-playbook \ - --inventory hosts.yml \ - shutdown.yml - lint: ansible-lint --project-dir . diff --git a/metal/group_vars/all.yml b/metal/group_vars/all.yml deleted file mode 100644 index c6d65be8..00000000 --- a/metal/group_vars/all.yml +++ /dev/null @@ -1,4 +0,0 @@ -disk: "sda" -dns_server: "8.8.8.8" -network_interface: "eno1" -ssh_public_key: "{{lookup('file', '~/.ssh/id_ed25519.pub') }}" diff --git a/metal/roles/pxe-server/defaults/main.yml b/metal/roles/pxe-server/defaults/main.yml deleted file mode 100644 index 663a333b..00000000 --- a/metal/roles/pxe-server/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ -iso_url: "https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/34.20210529.3.0/x86_64/fedora-coreos-34.20210529.3.0-live.x86_64.iso" -iso_checksum: "sha256:6bec8c1e67747c4d2fd8dca8bb833b74879d9c60c99d9edd4c4f17e2830ed6f0" -iso_file_name: "fedora-coreos-34.20210529.3.0-live.x86_64.iso" - -os_username: admin -os_name: CoreOS -# TODO (optimize) Get timezone automatically from the controller -timezone: Asia/Ho_Chi_Minh diff --git a/metal/roles/pxe-server/tasks/main.yml b/metal/roles/pxe-server/tasks/main.yml index 44d63998..3714b53c 100644 --- a/metal/roles/pxe-server/tasks/main.yml +++ b/metal/roles/pxe-server/tasks/main.yml @@ -9,8 +9,6 @@ state: directory loop: - "{{ role_path }}/build" - - "{{ role_path }}/files/images" - - "{{ role_path }}/build/mnt" - name: Copy configs copy: @@ -22,7 +20,7 @@ src: dhcp/dhcpd.conf.j2 dest: "{{ role_path }}/build/dhcp/dhcpd.conf" -- name: Start ephemeral PXE server +- name: Start ephemeral DHCP server docker_compose: project_src: "{{ role_path }}/build" state: present diff --git a/metal/shutdown.yml b/metal/shutdown.yml deleted file mode 100644 index acc5830d..00000000 --- a/metal/shutdown.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: Shutdown the homelab - hosts: metal - gather_facts: no - tasks: - - name: Unconditionally shut down the machine - raw: poweroff - ignore_errors: yes - ignore_unreachable: yes - - name: Wait for the machine to shutdown - shell: "until ! ping -c 1 {{ ansible_host }}; do sleep 1; done" - delegate_to: localhost