UncleNUC Wiki

Second chance for NUCs

User Tools

Site Tools


lab:stack_of_nucs:ansible_playbook_-_fah_removal

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lab:stack_of_nucs:ansible_playbook_-_fah_removal [2023/05/29 19:36] – [Step 2 - Create the Playbook] userlab:stack_of_nucs:ansible_playbook_-_fah_removal [2024/05/06 02:11] (current) – removed user
Line 1: Line 1:
-====== Ansible Playbook - FAH Removal ====== 
-In our previous step we [[ansible playbook - fah installation|set up FAH]] on our [[start|Stack of NUCs]]. 
  
-Now we are going to disable the service and uninstall it. In the last step there was an optional step to "finish folding". Bonus points for doing this. 
- 
-Purpose: 
-  * Demonstrate stopping and removing an installed service workload 
- 
-====== Step 1 - Connect to the Ansible Control Node ====== 
-From [[NUC 1]], log in to the Ansible control node, [[NUC 2]]. 
- 
-====== Step 2 - Create the Playbook ====== 
-Create the file /home/ansible/my-project/fah/remove-fah.yml 
- 
-<file yaml remove-fah.yml> 
---- 
-- hosts: all 
-  become: true 
-  become_user: root 
-  tasks: 
-    - name: Stop and disable FAHClient.service 
-      ansible.builtin.service: 
-        name: FAHClient.service 
-        state: stopped 
-        enabled: false 
-    - name: Wait for termination of all FaH client processes 
-      wait_for: 
-        path: /var/run/fahclient.pid 
-        state: absent 
-    - name: Remove fahclient package 
-      apt: 
-        name: fahclient 
-        state: absent 
-        autoclean: true 
-        purge: true 
-    - name: Reboot 
-      reboot: 
-</file> 
-====== Step 3 - Test the Playbook ====== 
-''ansible-playbook removefah.yml'' 
- 
-====== Next Step ====== 
-Now that we have removed the CPU-hungry FAH service, we go next to [[Ansible Playbeook - Install Kubernetes|installing Kubernetes]]. 
- 
-====== Optional ====== 
-Cyber security students may want to deploy [[ansible playbook - hashtopolis installation|Hashtopolis]] in the Lab. This deploys a distributed hashcat cluster for brute forcing password hashes. 
lab/stack_of_nucs/ansible_playbook_-_fah_removal.1685388976.txt.gz · Last modified: 2023/05/29 19:36 by user