From 98f24fbbefc19bd33bb848055d4169717787707f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 17 Dec 2021 17:34:21 -0600 Subject: [PATCH] General Fixes (#20) * Remove redundant calls to facts. * Must have accidentally removed miner/system thinking it was general/system. * Add missing variable xmr_stak_cpu. * Ignore when connection to GitHub fails. * Telegraf agents have been hoarding resources on Debian servers. Reset job will killall should work properly now. * Once the function sets accept, it is staying for the session. Need to unset in case `update -y` is run, cancelled, and then `update` is run. --- local.yml | 12 ++++++------ tasks/general/acct_mgmt/provision_config.yml | 9 ++++++++- tasks/general/acct_mgmt/users.yml | 1 + tasks/general/software/packages.yml | 6 ++++++ tasks/general/tests/lynis.yml | 1 + 5 files changed, 22 insertions(+), 7 deletions(-) diff --git a/local.yml b/local.yml index 60b8ee9..352bbdb 100644 --- a/local.yml +++ b/local.yml @@ -104,14 +104,13 @@ -####### Workstations ####### -# Additional setup for systems with GUI. + ####### Workstations ####### + + # Additional setup for systems with GUI. - name: Main | Workstation Setup block: - - include: facts/general/system.yml - include: facts/workstation/package.yml - - include: facts/general/service.yml # Set Up Desktop Environments # - include: tasks/workstation/freebsd/software/gui.yml @@ -161,6 +160,7 @@ ####### Miners ####### + # Additional setup for miners. - name: Main | Miner Setup block: @@ -232,8 +232,8 @@ - ####### Reporting ####### - # Provide information for analysis. + ####### Reporting ####### + # Provide information for analysis. - include: tasks/general/software/telegraf.yml diff --git a/tasks/general/acct_mgmt/provision_config.yml b/tasks/general/acct_mgmt/provision_config.yml index c0773d7..7c43675 100644 --- a/tasks/general/acct_mgmt/provision_config.yml +++ b/tasks/general/acct_mgmt/provision_config.yml @@ -85,7 +85,7 @@ ; CURRENTLY FREEBSD-ONLY ; ; vnc : Set to true for installation of VNC protocol - ; NOT IMPLEMENTED YET + ; UNFINISHED/UNTESTED ; [global] marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config' @@ -147,8 +147,13 @@ ; Example: 100K ; ; ethminer : Set to true for installation of ethminer + ; UNFINISHED/UNTESTED ; ; nvidia : Set to true for NVidia support in ethminer. + ; UNFINISHED/UNTESTED + ; + ; xmr_stak_cpu : Set to true for istallation + ; UNFINISHED/UNTESTED ; [global] marker: '; {mark} MANAGED BY ANSIBLE | Miner Config' @@ -169,6 +174,7 @@ eth_minhashrate: "{{ lookup('ini', 'eth_minhashrate file={{mnr_file}} default=false') }}" ethminer: "{{ lookup('ini', 'ethminer file={{mnr_file}} default=false') }}" nvidia: "{{ lookup('ini', 'nvidia file={{mnr_file}} default=false') }}" + xmr_stak_cpu: "{{ lookup('ini', 'xmr_stak_cpu file={{mnr_file}} default=false') }}" - name: General | Account Management | Provisioning Configuration | Miner | Print debug: @@ -185,6 +191,7 @@ - eth_minhashrate - ethminer - nvidia + - xmr_stak_cpu ## Server ## diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index c6eb79d..efb571b 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -125,6 +125,7 @@ -y : Assume yes to any prompts." unset OPTIND + unset accept while getopts ":hy" opt; do case $opt in h) echo -e "$usage" diff --git a/tasks/general/software/packages.yml b/tasks/general/software/packages.yml index a61959c..77f1c96 100644 --- a/tasks/general/software/packages.yml +++ b/tasks/general/software/packages.yml @@ -56,6 +56,12 @@ state: present when: ansible_pkg_mgr == "dnf" +- name: General | Software | Services | Install killall (Looking at you, Debian) + package: + name: psmisc + state: present + when: ansible_distribution == "Debian" + - name: General | Software | Packages | Update Software (Disabled) package: name: diff --git a/tasks/general/tests/lynis.yml b/tasks/general/tests/lynis.yml index 01d69cd..9706e13 100644 --- a/tasks/general/tests/lynis.yml +++ b/tasks/general/tests/lynis.yml @@ -7,6 +7,7 @@ dest: "{{ lynis_install_dir }}" clone: yes force: yes + ignore_errors: yes - name: General | Tests | Lynis | Ensure Permissions (Looking at you Parrot OS!) file: