Compare commits

...
476 Commits
Author SHA1 Message Date
me 8d01548627 backups, no longer include the SFTP directory. 2026-11-07 20:12:51 -07:00
me f587ca1e5e tunnel, keep the loop in the foreground so that the output makes it to the log. 2026-11-06 14:53:16 -07:00
me bbffe8c69a tunnel, add green light output for loop. 2026-11-04 19:50:58 -07:00
me 768cabfe45 tunnel, add task which makes sure the main directory is 755 so that users may view the files. 2026-11-04 19:20:13 -07:00
me b1bdc953c2 tunnel, restart the service if the remote host no longer forwards to the local process. 2026-11-04 19:11:51 -07:00
me 1764ca510f test, remove java and docker as they've become stable. 2026-11-04 08:50:34 -07:00
me 7f986e51d3 AGENTS.md, add coding conventions and layout logistics including code snippets and example programs. 2026-11-04 08:48:26 -07:00
me d0970f5971 i3, increase startup volume to 75 from 25. 2026-11-03 13:56:11 -07:00
me d94397349b ai, begin refactoring sections into their own plays, starting with Sandbox and its AGENTS.md file. 2026-11-03 13:36:23 -07:00
me bb1514c33d llm, AGENTS.md, cover downgrades not being preferred. 2026-11-03 13:20:48 -07:00
me 0581ea62df docker, fix network sync run file permissions. 2026-11-03 08:45:50 -07:00
me 0332289742 llm, move enabling docker to docker playbook. 2026-11-02 20:51:42 -07:00
me a3a647318d docker, ensure container networks accurately reflect host network when using network_mode:host on runit systems. 2026-11-02 20:51:16 -07:00
me 4da671c40e llm, do not try to pull local image. 2026-11-02 16:19:16 -07:00
me 4db955b32d llm, add more context to the Build process headers. 2026-11-02 15:32:54 -07:00
me c0a9d79776 llm, add note on how to compile KMP projects. 2026-11-02 15:28:20 -07:00
me 4145a12637 i3, fix sunset-alarm not reporting errors. 2026-11-02 07:27:37 -07:00
me c23bb1c06b i3, fix location on redshift to have a colon. 2026-11-02 06:52:42 -07:00
me a9b78dbba2 i3, change bedtime from 21 to 20 and generalize redshift location. 2026-11-01 20:09:07 -07:00
me a714a26058 llm, mention that the release build needs filtered on v8a. 2026-11-01 15:26:45 -07:00
me d15b22ec26 llm, continue editing AGENTS based on findings when fixing more Android projects. 2026-11-01 09:56:30 -07:00
me 482d3072f5 llm, move the open-terminal container name up. 2026-11-01 08:10:42 -07:00
me 609edd6c3b llm, refactor the AGENTS version section. 2026-11-01 08:04:22 -07:00
me 1ded62a3d4 llm, update a few versions for Android and Flutter projects, as well as add the paths to where they are set and an example of what they look like. 2026-11-01 06:58:31 -07:00
me 0303a1c091 llm, change namespace on open-terminal build in case it does ever get uploaded. 2026-11-01 06:39:05 -07:00
me 10b21ac49b i3, add logging for sunset-alarm, add an annoyance for bedtime. 2026-11-01 05:59:36 -07:00
me 7efa7f1b91 llm, refactor which models are still relevent to install. 2026-11-01 05:47:15 -07:00
me d3a5946232 llm, add a function which deletes models that get put into the removal array. 2026-10-31 20:24:09 -07:00
me 46890d0d16 llm, stop mounting resolv.conf on containers, they sometimes get stale versions and files do not stay up tp date, let network_mode host handle it. 2026-10-31 09:29:45 -07:00
me 9073dfc597 docker, stop making the DNS file, the nameservers seem to fail even on network_mode host, unsure what else would be needed to get them to resolve. 2026-10-31 09:28:57 -07:00
me f3d9f088c7 llm, add mistral-small and see it if't truly the v4 MoE. 2026-10-31 08:21:18 -07:00
me 3c10415347 update, improve output of skipping NPM. 2026-10-31 08:07:19 -07:00
me 26dc61ebbf ai, add the command for the most recent test. 2026-10-31 07:54:46 -07:00
me 33755480bb ai, add some more benchmark results and make the tables per-model for easier reading. 2026-10-31 07:53:38 -07:00
me 35783422a3 i3, change sunset timer to actually be based on AZ sunset. 2026-10-30 21:19:56 -07:00
me d681c3f447 i3, fix sunset-timer not being able to show alert. 2026-10-30 21:17:20 -07:00
me a31cad1f42 open-webui, fix the network for this as well by mounting the host's resolv.conf directly. 2026-10-30 21:04:22 -07:00
me 788a723690 llm, go back to using host mode, seems to work as long as daemon.json exists with DNS servers, could not find a combination of the named network which worked well. 2026-10-30 20:55:11 -07:00
me 6ed4f284c0 i3, officially add Sunset Alarm, just from Code for now. 2026-10-30 20:34:02 -07:00
me 59b4343ec2 open-terminal, more attemots to get the container access to the Internet (DNS). 2026-10-30 20:26:12 -07:00
me af64e47519 ai, further scope Coder personality. 2026-10-30 19:57:45 -07:00
me e2c18a5cfc llm, do a few more things to try to get open-terminal DNS-ready more consistently. 2026-10-30 19:55:30 -07:00
me 556f483aaa roleplays, add an even smaller lang (16k ctx, 10k compact) and re-enable the 128k and 256k versions of code since some projects are actually getting big and keep compacting before even responding.. 2026-10-30 17:54:53 -07:00
me b09e74c4b7 roleplays, upload latest version. 2026-10-29 19:54:44 -07:00
me 107afbece4 llm, let compose know that the open-webui network for open-terminal is created elsewhere and not to tear it down. 2026-10-29 18:55:19 -07:00
me 076f954abd llm, get Open WebUI & Terminal working 100% without using host network, solves some DNS issues that the containers were seeing for some reason, but adds complexity since they are not in the same compose file. 2026-10-29 17:37:17 -07:00
me 648962e710 llm, still need to add gateway to host so that open-webui can see ollama, port to host is successfully being forwarded though! 2026-10-29 17:03:55 -07:00
me 15370d639f vpn, fix lint issues. 2026-10-29 10:49:58 -07:00
me eb3b16264e vpn, explicitly have Mullvad enable Local Sharing. 2026-10-29 10:48:45 -07:00
me 25346a95de llm, go back to using ports for Docker! 2026-10-29 10:47:35 -07:00
me d25f47bd72 vpn, fix Mullvad breaking Docker. 2026-10-29 10:45:43 -07:00
me 9aa25f85cd llm, go back to using network host for docker containers, ports still not working. 2026-10-29 10:44:14 -07:00
me b732402719 llm, return the sleeps to 10 minutes after the Docker programs starts, messes up the log too much, can run the commands manually if wanting them quickly. 2026-10-29 10:34:21 -07:00
me b3b2cb075f llm, ensure all the open-terminal compose commands use the correct compose file. 2026-10-29 09:57:49 -07:00
me 95542ec233 llm, go ahead and do the Docker image updates at the beginning rather than waiting since it's now a loop. 2026-10-29 09:56:39 -07:00
me 8abe634c42 packages, fix xkb package name. 2026-10-29 08:24:41 -07:00
me 5e0b5fb4d2 llm, have the Docker-based services fork their background update checker and make it a loop. 2026-10-29 08:04:28 -07:00
me 855cffc64d llm, stop doing the DNS portion for open-terminal now that the network is working properly. 2026-10-29 07:43:08 -07:00
me 032239e430 i3, lock the session properly and have it call i3lock plus turn off the screen. 2026-10-28 20:50:06 -07:00
me 57b56d82c4 packages, add xkb, xset, and xlock. 2026-10-28 19:51:42 -07:00
me bede2b84f3 llm, fixed intranet issue, stop using host network for open webui & terminal. 2026-10-28 19:42:05 -07:00
me 4fbf7b41e4 update, prevent error due to empty if statement. 2026-10-28 18:57:01 -07:00
me ce1afc6624 llm, add note to AGENTS about the host system and Docker container preferences. 2026-10-28 17:29:53 -07:00
me b4fc988f97 llm, improve AGENTS since model thinks it can ignore putting the Kotlin version in the build file, ensure a few critical components are installed on open-terminal image, give the built container a name. 2026-10-28 17:07:01 -07:00
me 9ab9f0095b update, stop doing NPM manually. 2026-10-28 08:38:47 -07:00
me 9949014558 llm, begin refactoring the script into an ai folder, also increase parallel. 2026-10-27 19:07:07 -07:00
me 373b03d46c docker, remove the daemon.json file. 2026-10-27 19:06:25 -07:00
me 6117a65009 Add docker.yml to local and test playbooks. 2026-10-27 08:32:23 -07:00
me af82cd3319 llm, extracted docker tasks, no longer needed here. 2026-10-27 08:31:59 -07:00
me bb1529e5b1 docker, pull from llm. 2026-10-27 08:31:09 -07:00
me 252d24b2a7 llm, fixes and improvements to the personality blurbs. 2026-10-27 06:49:52 -07:00
me a997fd8efc llm, update the AGENTS.md text to be a bit more over about when to stop due to blockers and how much effort to put in. 2026-10-27 06:49:31 -07:00
me 88ec75a544 llm, comment the DNS servers which don't actually exist yet. 2026-10-26 09:36:20 -07:00
me 3d64b90d58 llm, ensure open-terminal has access to DNS. 2026-10-25 20:44:48 -07:00
me 892af9a669 llm, the hosts file should already get mounted from the host. 2026-10-25 20:14:03 -07:00
me 7661b85238 roleplays, set up some smaller context models and disabled the big guys and unused guys, also added a Tasks model for chat names and such. 2026-10-25 20:13:30 -07:00
me f487461d94 llm, change fastfetch output to be a fresh boot. 2026-10-25 10:27:01 -07:00
me 65ab204409 llm, update open-terminal 10 minutes after boot, not 1. 2026-10-25 10:26:33 -07:00
me 62302b3a0c llm, add tests but excluded 27b weights when a 35b existed. 2026-10-24 21:34:19 -07:00
me 4597151bbf llm, add beginning of benchmark data which accidentally got cancelled. 2026-10-24 20:55:41 -07:00
me 9e75d9b981 llm, extend keep alive, add final mounts to open-terminal, have open-webui do its update 5 minutes after boot once network exists, fix extra / in JAVA_HOME. 2026-10-24 20:44:17 -07:00
me 65aeea9a93 llm, switch open-terminal over to compose so that build dependencies are persistent. 2026-10-24 17:32:49 -07:00
me 0e1648cc31 llm, fix pub_cache to pub-cache. 2026-10-24 16:18:17 -07:00
me 3e53bd3c9b llm, add GOT_EM env var and reference it in the AGENTS file. 2026-10-24 16:00:18 -07:00
me 43dc65a84b llm, mount etc dirs for Java security policy, add needed packages to compile Android and Flutter. 2026-10-24 15:53:29 -07:00
me 2a7fa98825 llm, move projects and SDK back to user so that compilation paths do not need changed. 2026-10-24 15:17:13 -07:00
me 71bcb7c351 users, ensure home and its immediate subdirectories are owned by the user. 2026-10-24 15:16:37 -07:00
me cea7e03c11 bashrc, when restarting a process, only follow the new log entries. 2026-10-24 14:36:22 -07:00
me 38a04fbda1 swap_stopper, do not let the echo prevent the function from returning an unclean status. 2026-10-24 12:39:56 -07:00
me 4342b8842f swap_stopper, ensure ollama dies even if it is not being run through runit. 2026-10-24 12:35:27 -07:00
me ef9566c76c llm, move some functions to env-shared project. 2026-10-24 10:55:11 -07:00
me 41f306f7d7 llm, add another alias for restarting AI services. 2026-10-23 19:03:16 -07:00
me 4c5d753b73 vscode, ensure new files are opened at the end. 2026-10-23 17:44:19 -07:00
me fcf77e22c5 llm, adjust the prompts. 2026-10-23 17:44:00 -07:00
me 75503d762b llm, extend keep alive time again since context gets unloaded too, remove DEBUG output from ollama log, use .bashrc rather than profiles since Docker is not creating those, create AGENTS.md in user root, make the JDK directory read only to prevent AI from tampering. 2026-10-23 17:43:48 -07:00
me e0b1fa30f1 java, go down to 17 like being used in development. 2026-10-23 17:41:31 -07:00
me d7eed3c883 llm, update PATH wording since it has been taken care of. 2026-10-22 18:04:05 -07:00
me c341d216ad llm, maintain env vars and PATH changes in the AI Sandbox folder. 2026-10-22 18:03:32 -07:00
me f6fd08f966 llm, add a safeguard when a model causes swap-stopper to reset ollama. 2026-10-22 11:58:16 -07:00
me 295b6b3d19 android, allow the licenses check to fail on newer SDKs. 2026-10-22 11:57:44 -07:00
me fe3cb9b5ba package, add changed_when. 2026-10-22 11:57:26 -07:00
me 431510a729 package, finish adding pipefails. 2026-10-22 09:53:10 -07:00
me e7a461550d android, finish adding pipefails. 2026-10-22 09:52:34 -07:00
me d13b97d5aa Merge branch 'dev-deleteme' into dev
Forgot to pull before working on a different laptop again.
2026-10-22 09:50:12 -07:00
me 96dd0118fa llm, add SDK homes for open-terminal. 2026-10-22 09:48:19 -07:00
me 17684becbb test, add Java task since LLM now relies on its vars. 2026-10-22 09:32:41 -07:00
me 4474ad664e system, change back to checking exit code not status. 2026-10-22 09:32:11 -07:00
me 24e4ea9c8c java, do not use ~ in environment variables. 2026-10-22 09:22:17 -07:00
me 847dfe88d4 android, fix Flutter var. 2026-10-22 09:22:02 -07:00
me 9f74361af1 Small fixes for Java and Flutter. 2026-10-22 09:15:03 -07:00
me 6c79addc3c java, fix apt to only be for apt, only install all JDKs on Arch if coding. 2026-10-22 09:10:02 -07:00
me 049df1ab61 java, be more system agnostic and remove the coding requirement. 2026-10-22 09:05:06 -07:00
me 007f338d2e flutter, add FLUTTER_HOME and refactor some variables. 2026-10-22 09:04:41 -07:00
me 494a9b70f6 system, check the 2nd var, it is 0 more often but seems more accurate. 2026-10-22 09:04:12 -07:00
me ed8a33e00c Modify environment variables for Flutter, Android, and Java. 2026-10-22 08:42:00 -07:00
me 6640058d8d provision, remove extra line. 2026-10-21 10:05:00 -07:00
me c852329455 packages, remove disabled task. 2026-10-21 10:01:53 -07:00
me 0363aefc1d Merge branch 'dev2' into dev
Pushed on a system when another system still needed to push.
2026-10-21 09:58:43 -07:00
me e81de0c63b llm, add more performance tests to markdown file. 2026-10-21 09:56:47 -07:00
me d5e3a57f56 llm, add a few models for mistral-small4 but they are too large or not the correct format for ollama, a few more edits to ollama_threads. 2026-10-21 09:56:14 -07:00
me 99a0b7ca0b provision, fix the MCP block overwriting the GUI block. 2026-10-21 09:48:42 -07:00
me a47d5fd129 tunnel, move service task to block and change block to be for runit. 2026-10-21 09:45:14 -07:00
me 472f7921e7 tunnel, fix location of facts. 2026-10-21 09:40:47 -07:00
me 8567cae2b1 packages, add btop. 2026-10-21 08:58:17 -07:00
me a1190290db roleplays, shorten names. 2026-10-21 08:54:25 -07:00
me 9a2e4ca4d2 i3, move gnome-system-monitor to WS10, btop on WS1. 2026-10-21 08:51:35 -07:00
me eb761e41dc roleplays, rename Quick Coder to Coder MoE in both title and ID. 2026-10-21 08:20:41 -07:00
me 05e2244efb roleplays, add a language entry for qwen3.5:35b since it is MoE and is not code-scoped like qwen3.6. 2026-10-21 08:19:48 -07:00
me bd7112e8d5 llm, filter out the less useful tests in ollama_threads. Should help save a lot of time, maybe up to 60-75% since they were the slower ones. 2026-10-21 07:27:28 -07:00
me 40d9a7252e llm, if Internet is available, pull extra packages for open-terminal. 2026-10-21 06:06:41 -07:00
me 6482dd123d llm, change ollama_threads to use a better method of determining the number of cores to test, also fix output. 2026-10-21 05:43:37 -07:00
me 74789ba70c roleplays, go up to 7 threads due to benchmark data. 8 is very marginal, leave it for the system. 4 is great for MoE tokens/sec but 7 is still a bit faster in overall response time. 2026-10-21 05:28:05 -07:00
me 6411d4792a roleplays, download the current state. 2026-10-21 05:26:35 -07:00
me e367e9e14b llm, begin populating thread benchmark data. 2026-10-21 05:23:57 -07:00
me c604859947 llm, add elapsed time to ollama_threads. 2026-10-21 05:23:41 -07:00
me 7f7f2a2edb llm, fix context sending in ollama_threads. 2026-10-21 04:55:01 -07:00
me 92be32345a llm, add context param to ollama_threads. 2026-10-21 04:51:46 -07:00
me 5719ec6b60 llm, add optional open-terminal package list, helpful but required Internet, may have to do an Internet check and then choose which docker run command to execute. Also fix and enhance the ollama_thread checker. 2026-10-21 04:47:16 -07:00
me 85e60ef60c llm, improve the thread testing output and also make the the ansible variable is always an int. 2026-10-21 03:03:24 -07:00
me 5620e5a223 llm, add function for benchmarking whether more threads adds latency. 2026-10-21 02:57:12 -07:00
me 4fd12ce45e llm, add details about the workstation being used. 2026-10-21 02:43:07 -07:00
me 5c67da3eb8 roleplays, delete old IDs, change to use 6 cores leaving 1 physical for the system and 1 for the user (in theory, of course). 2026-10-21 02:42:44 -07:00
me 14fdc1f740 llm, add more size testing data. 2026-10-21 02:32:55 -07:00
me 1adf4db6ee llm, wrap the personality prompts. 2026-10-21 02:30:04 -07:00
me 3b3c7bd501 Place the personality prompts into a knowledge base and attach them to the roleplays so that they can be maintained in a more centralized manner 2026-10-21 02:29:03 -07:00
me b5e5a18e4c roleplays, fix the IDs, will import back into Open WebUI. 2026-10-21 02:05:34 -07:00
me 870a99804a llm, add OLLAMA_NUM_THREADS which was proposed but rejected so far. 2026-10-21 02:03:37 -07:00
me 358bf9e11d roleplays, set max thread count to number of physical cores rather than using the emulated cores too. 2026-10-21 02:03:03 -07:00
me 20549e0055 roleplays, ensure everyone has tags, add providers for remaining ministral weights. 2026-10-20 17:40:32 -07:00
me 003e8d8430 roleplays, add an entry coder based on codestral since it does not swell up like devstral. 2026-10-20 17:28:44 -07:00
me 0e990e2ed5 roleplays, ensure models have all functionality. 2026-10-20 17:18:53 -07:00
me 2ff0ccd392 llm.md, finish the prompts for now. 2026-10-20 17:10:13 -07:00
me 9a9eb8b8e6 roleplays, add current Open WebUI lineup. 2026-10-20 17:09:54 -07:00
me bec4c919d4 llm, stop using pull=always because then network is required to start the container. 2026-10-20 16:36:44 -07:00
me 1ad4f642db llm, continue working on the prompts. 2026-10-20 11:56:23 -07:00
me 52d7ae3d86 llm, move bulk comments to an md file and start adding prompts to use in Open WebUI. 2026-10-20 10:16:40 -07:00
me a892aae620 llm, fix open-terminal docker syntax. 2026-10-20 10:16:15 -07:00
me 36b8305f0f system, shorten the runit error sleep. 2026-10-20 09:23:33 -07:00
me a823d4ae63 llm, fix open-terminal port control. 2026-10-18 10:27:10 -07:00
me 8311427506 llm, make the ollama_usage output much fancier, more report-like. 2026-10-18 10:26:56 -07:00
me 797744d9fe llm, add function which gets the model sizes, both disk and memory. 2026-10-18 09:00:25 -07:00
me 4ae411584e insgtall, fix lint warning. 2026-10-17 17:19:33 -07:00
me 2dccea21ae root, set the mode directly to avoid lint issues. 2026-10-17 17:18:51 -07:00
me 32916ad470 header, name most the include_tasks and reorder based on subgroups, refactoring a few file locations in some instances. 2026-10-17 17:17:49 -07:00
me 8b4329d129 header, add tunnel. 2026-10-17 17:13:49 -07:00
me ec60e9f5f7 test, remove tunnel. 2026-10-17 17:12:36 -07:00
me edffe124fd services, set modes of edited files. 2026-10-17 17:01:59 -07:00
me 1de11bc2d9 tunnel, fix the ssh command. 2026-10-17 16:57:25 -07:00
me 44a0463ab8 tunnel, enable the service and fix folder permissions. 2026-10-17 16:52:04 -07:00
me 9a1004dfb9 provision, refactor and ensure false keys are actually False. 2026-10-17 16:47:02 -07:00
me 607129e1c2 tunnel, fix outer if statement. 2026-10-17 16:46:37 -07:00
me 48c6f54903 test, add tunnel to the list. 2026-10-17 16:24:18 -07:00
me 1278c5020f tunnel, implement the playbook. 2026-10-17 16:24:10 -07:00
me 11cac42df8 provision, add section for tunnel. 2026-10-17 16:21:21 -07:00
me feb1985755 Add a tunnel file for forwarding ports as a runit service. 2026-10-17 15:35:03 -07:00
me 99965a1df2 ssh, allow tcp forwarding so that gateway works properly when pushing local ports to the domain. 2026-10-17 15:23:01 -07:00
me 4de2772ad0 ssh, allow gateway ports. 2026-10-17 15:05:50 -07:00
me 3e1291d1f9 Centralize the /var/log/*/config code. 2026-10-17 14:59:37 -07:00
me bcdb47ac74 llm, add shortcut to restart LLM related software. 2026-10-17 14:51:28 -07:00
me 1764705562 swap-stopper, increase full_pct. 2026-10-17 14:42:12 -07:00
me c8bd5ee1e4 llm, fix open-webui missing backslash after pull option. 2026-10-17 14:38:17 -07:00
me 36a80041f3 llm, no longer bother with autocomplete in Continue, not getting any functionality since on 100% CPU so it's just draining resources. 2026-10-17 14:37:03 -07:00
me 41d01c70f5 llm, implement the qwen code key variable. 2026-10-17 13:14:59 -07:00
me 9f82c136e9 llm, add open-terminal as a test bed for Open WebUI LLMs, so that they can read/write files and execute commands in a safe way. 2026-10-17 13:08:50 -07:00
me 89fdb52fcc llm, move Docker section out of Open WebUI since it's now shared. 2026-10-17 13:08:12 -07:00
me 98c6d47d7f provision, add params for open-terminal, plus an optional key for qwen code. 2026-10-17 12:55:27 -07:00
me 8a2a723d4b llm, continue dropping keep alive since tools which use LLMs correctly manage this themselves. 2026-10-17 12:01:57 -07:00
me 1e8aa6956f llm, always update open-webui. 2026-10-17 11:46:30 -07:00
me caf60d1ccd i3, fix comment since i3 config only allows comments at the start of the line. 2026-10-17 11:46:12 -07:00
me f17b6a96b2 swap-stopper, only restart ollama. 2026-10-17 09:11:08 -07:00
me c8f32b917f llm, try mounting user's Code directory in the Open WebUI container. 2026-10-17 08:47:16 -07:00
me e5891a72c6 system, shorten the runit success sleep. 2026-10-17 08:42:39 -07:00
me b1ebe20874 llm, leave the rm of the docker container to the explicit commands, rather than also expecting run to take care of it. 2026-10-17 08:42:24 -07:00
me 1746d7f11a system, adjust finish script to sleep on success too, just for a shorter time. 2026-10-17 08:19:46 -07:00
me 90ecb842d3 system, add runit sleep script. 2026-10-17 08:18:29 -07:00
me be53012c48 llm, adjust some more parameters and try reducing complexity of qwen config a bit to see if that's why it's stopped working decently, move runit script to system.. 2026-10-17 08:18:18 -07:00
me c709930bf0 llm, add model section back to qwen settings in case that's why it's freaking out. 2026-10-16 17:47:50 -07:00
me 7e0df2ee13 llm, remove model section from qwen settings. 2026-10-16 11:52:09 -07:00
me 6a446a8383 llm, handle max_tokens a little more dynamically, likely only affects the smaller models. 2026-10-16 09:46:46 -07:00
me bedfbe566d rc, add shortcut to restart a service then immediately follow its log. 2026-10-16 09:37:54 -07:00
me 629f7c424d llm, add the actual context values rather than rounding down. 2026-10-16 09:34:08 -07:00
me 0a0b85e66d llm, increase context as to not hinder models from achieving their intended abilities. Keep max_tokens limited where applicable. 2026-10-16 09:23:58 -07:00
me 2706011fa0 llm, add moe tag to a few more model provider names. 2026-10-16 09:10:06 -07:00
me 669095e7cb llm, add more memorable aliases for the fancy ollama show loop. 2026-10-16 09:08:47 -07:00
me 13f20a4e98 packages, add a shell_check, AUR tasks need to be changed similar to android.yml where it echoes what was truly done so we know if it is OK, CHANGED, FAILED, etc. 2026-10-16 09:01:29 -07:00
me cab2013a97 packages, add English and Spanish dictionaries for workstations. 2026-10-16 08:53:16 -07:00
me 8ed0aca797 llm, add a temperature for qwen code providers. 2026-10-16 07:54:34 -07:00
me 79d6f53424 llm, add additional qwen code config to help tame the models. 2026-10-15 18:01:02 -07:00
me 79a8c32584 llm, add longer tineout for qwen, add a few more documentation links. 2026-10-15 17:28:13 -07:00
me 0f4fe291b2 llm, edit provider suffixes. 2026-10-15 12:07:56 -07:00
me 490df1e24c llm, use underscores for model names in qwen, not spaces. 2026-10-14 11:27:42 -07:00
me b26ead5577 llm, fix extra space in provider name. 2026-10-14 11:05:34 -07:00
me bcf2a5aee6 llm, make the qwen drop-down more readable. 2026-10-14 10:32:28 -07:00
me 98b9691e1e llm, add comment for nemo. 2026-10-14 10:28:09 -07:00
me 62306f886e llm, re-reverse the qwen prefix logic. 2026-10-14 10:24:41 -07:00
me 03d0978a64 llm, add sleepy finishes to each service, further edit facts, fix qwen config file and add validator task, move non-ollama web services to non-critical check, start refactoring shell functions, make all context 3200 so programs don;t have to restart the models. 2026-10-14 10:23:03 -07:00
me f3632fa13a llm, add a few more aliases for model purge closer to pull-models (the one used to download them). 2026-10-14 07:29:55 -07:00
me f828e0a9f2 llm, fix the port checking for open-webui. 2026-10-14 07:27:58 -07:00
me 852b904dd4 llm, large refactor on the choices, add a lot of Mistral family models too. 2026-10-14 07:25:12 -07:00
me b7738a1b78 lm, add a few more functions, one just a TBD. 2026-10-14 07:24:45 -07:00
me 13801d9d86 llm, add missing provisioned var to the print. 2026-10-14 05:35:55 -07:00
me 0dc7f258a3 llm, reduce and simplify concurrecy and parallel as to not waste system resources or time. 2026-10-14 05:34:41 -07:00
me d20b1b8114 llm, experimented with adding providers to both directories but was not needed, JSON is strict and does not allow trailing commas. 2026-10-14 04:52:50 -07:00
me f070896ad3 llm, create the qwen config in both the home and projects directory. 2026-10-14 04:44:31 -07:00
me 822140efe6 llm, ensure open-webui check hits the right port. 2026-10-14 04:04:46 -07:00
me 231aa8a9a2 llm, add config file for qwen code. 2026-10-14 03:58:32 -07:00
me 5e3d162481 llm, more changes to open-webui setup to hopefully get it happy. 2026-10-14 03:55:23 -07:00
me eab790c2cc llm, ensure open-webui can see ollama. 2026-10-13 10:51:14 -07:00
me 3c04476217 llm, ensure user and root and in docker group in case that's why the port was not being forwarded? Also may allow user to run docker commands without sudo. 2026-10-13 10:38:33 -07:00
me e762e1231a llm, ensure the OLLAMA_BASE_URL still gets set. 2026-10-13 10:22:24 -07:00
me 44ae9967f1 llm, move links to ollama env documentation. 2026-10-13 10:21:48 -07:00
me fe4f23fdb0 i3, don't worry about Telegram. 2026-10-13 10:11:13 -07:00
me c213397550 llm, add comment as to why the -p and related commands are not being used. 2026-10-13 09:58:19 -07:00
me 951959a00b llm, finalize the open-webui setup, network=host works great, still really unsure why the port mapping was not forwarding correctly. 2026-10-13 09:54:29 -07:00
me 9d7a6414b3 swap-stopper, go back to continuing after the restarts are called. 2026-10-12 12:12:59 -07:00
me 18b73f7665 swap-stopper, add another process which needs stopped so that it does not keep starting models. 2026-10-12 12:10:44 -07:00
me cccd7238cd llm, enable metrics if the version supports it. 2026-10-12 10:58:55 -07:00
me 43eff5399c llm, use the default container for open-webui. 2026-10-12 10:58:35 -07:00
me 65090d32e8 llm, fix model names for chat and code. 2026-10-12 10:58:15 -07:00
me fb692f3766 llm, add a few more ollama env variables as well as set the keep alive to -1 (infinite). 2026-10-12 10:25:02 -07:00
me 6ae099fcb1 rc, add shortcut for following a file my favorite way. 2026-10-12 09:54:55 -07:00
me 80f5f100f1 llm, add shortcuts for calling chat and code bots. 2026-10-12 09:52:37 -07:00
me 7e2dd72fc1 llm, enable checking qwen port. 2026-10-12 09:52:19 -07:00
me b3a11dec30 llm, add qwen-code as a daemon, it seems promising, what I was hoping for from zeroclaw. 2026-10-12 09:43:15 -07:00
me e8cece4445 provision, add qwen-code to workstation, break LLMs into main and GUI sections. 2026-10-12 09:42:46 -07:00
me 0e10bc235f i3, also require mod for shutdown and restart to prevent colliding with shortcuts on other programs. 2026-10-12 09:13:02 -07:00
me 883ad223c2 llm, further simplify the pull-llm function so that it never exits prematurely or kills the terminal session. 2026-10-12 08:40:07 -07:00
me 9dee72820b llm, print the pull command in case the command keeps failing and we want to just do it manually. 2026-10-12 08:15:14 -07:00
me a3ba5e7a60 llm, try doing pull-models a different way since it's been trhowing weird errors. 2026-10-12 08:13:40 -07:00
me d27d759c97 llm, add TBD's for qwen serve, seems like it may be a really useful interface after a little playing, what I was hoping zeroclaw could do. 2026-10-11 06:04:13 -07:00
me fe46062be0 swap-stopper, be more robust in the checks by using both ram and swap for checking conditions, lower full percentage from 98 to 95 to avoid edge cases. 2026-10-11 06:03:18 -07:00
me a0eae9a7cc llm, make the context consistent across devices. 2026-10-11 05:06:54 -07:00
me df0df85d9e llm, use a more distinct number for the context so that ollama ps better gives away how the model is being used. 2026-10-10 19:46:20 -07:00
me 5541c8251c qwen3-coder is actually pretty great to chat with in ollama run, very responsive unlike in all the other tools. 2026-10-10 19:21:02 -07:00
me 6fc8181272 swap-stopper, prevent restart loops if swap does not go down after it started to rise, also fix log consistency with newlines between loops. 2026-10-10 19:07:36 -07:00
me 487f1f46f3 llm, add Swap Stopper as a service based on custom shell script. 2026-10-10 18:41:50 -07:00
me 0776e89d26 Add shell script which stops LLMs from causing system swap. 2026-10-10 18:41:25 -07:00
me ccd8355946 llm, fix ollama-stop function. 2026-10-10 17:27:47 -07:00
me 942780e6d1 Refactor redundant names, do not need to say "Setup". 2026-10-10 16:48:08 -07:00
me 019066c4dc llm, further reduce contexts based on testing, now using 2.5:14b for Complete successfully alongside the RAM needs of 3:30b on Cline. 2026-10-10 16:42:19 -07:00
me 1f16053042 llm, continue tuning the model context and tokens to prevent swapping. 2026-10-10 16:04:09 -07:00
me bafa669bb5 Update spacing in main YML files. 2026-10-10 15:59:38 -07:00
me 5595ea0888 test, add comment, add names to tasks. 2026-10-10 14:59:12 -07:00
me 3aee0feb39 footer, name tasks and add comment. 2026-10-10 14:56:08 -07:00
me 5d352bbb53 llm, add section comments, ensure ollama allows Codium workflows with concurrency and parallel. 2026-10-10 14:32:28 -07:00
me 6c46439eb6 llm, add shortcuts for stopping all ollama models. 2026-10-10 13:42:36 -07:00
me 648501b7c0 llm, use pipefail on the final lint error. 2026-10-10 13:35:34 -07:00
me e0288ce4d5 llm, filter models by purpose, use chat in Zeroclaw and code in Continue. 2026-10-10 13:33:48 -07:00
me c6cc631d8c llm, tuning the context and token parameters. 2026-10-10 13:10:29 -07:00
me 3381eb6d70 loop, output the command before starting the loop, just to make sure all looks okay. 2026-10-10 12:28:45 -07:00
me 53351fde28 llm, add a finish for open-webui, fix config.yaml for Continue, possibly fix pull-models causing terminals to close when cancelled. 2026-10-10 11:12:25 -07:00
me 7922225b26 Remove unecessary update_cache which eat up time. 2026-10-10 11:11:15 -07:00
me d27976150c setup, add option to run test.yml. 2026-10-10 10:30:00 -07:00
me 8b73c7ef02 test, create new playbook which takes advantage of header and footer then only calls the specific tasks we want to test. 2026-10-10 10:29:47 -07:00
me 69b1e62c82 local, refactor the necessary portions into subfiles header and footer. 2026-10-10 10:29:17 -07:00
me 8970b14e31 llm, always do the setup steps, then XYZ_enabled vars are used to disable and stop services not wanted. 2026-10-10 10:28:45 -07:00
me 861546236f provision, enable zeroclaw by default, barely takes any resources and can be helpful. 2026-10-10 10:27:39 -07:00
me f7389bc944 lint, add another silly "error" about spaces. 2026-10-10 10:27:15 -07:00
me c85d96f940 llm, add hugging face token to ollama. 2026-10-10 09:56:41 -07:00
me 4ab93d02f4 llm, fix the hugging face token env var for open-webui. 2026-10-10 09:49:29 -07:00
me 0feb9b1995 llm, fix filename for continue, add print for llm check, refer to stdout on llm check. 2026-10-10 04:57:00 -07:00
me e95054d329 llm, use new variables provisioned for open-webui. 2026-10-10 04:51:10 -07:00
me 993eeda08b provision, add two new variables for open-webui. 2026-10-10 04:50:22 -07:00
me 5655fe52b0 provision, ensure llm variables do not collide with existing facts. 2026-10-10 04:20:55 -07:00
me daec9237f0 llm, finish the open-webui setup, start using the workstation config variables. 2026-10-10 04:20:28 -07:00
me a866a6d2e5 sudoers, allow sv commands in i3 config. 2026-10-10 02:34:42 -07:00
me 43d92d14ed i3, add system restart and restarting of LLM services. 2026-10-10 02:32:55 -07:00
me 0450aa45c3 i3, add smaller stepping for both brightnesses and volume. 2026-10-10 02:32:32 -07:00
me 196c879c27 llm, begin adding section for open-webui, untested so far. 2026-10-09 20:23:17 -07:00
me 9aae4dc2ca privision, change open_webui_port default to 3000. 2026-10-09 20:22:54 -07:00
me 6735e257b3 llm, enhance comments in the ollama run script. 2026-10-09 20:06:14 -07:00
me 4ce0720a43 llm, change exit to return to prevent session from closing. 2026-10-09 20:02:06 -07:00
me c59d78270b llm, stop purging partial pulls. 2026-10-09 20:00:28 -07:00
me 0c422687a5 provision, add variables to wlorkspace which will eventually be implemented in llm.yml. 2026-10-09 20:00:01 -07:00
me d0f7127807 local, add more names, do not hug block items with the block wrapper. 2026-10-09 17:23:21 -07:00
me c7432d554f llm, add each LLM as an autocomplete agent for Continue. 2026-10-09 16:56:15 -07:00
me bd181de2c9 vpn, fix lint issues besides shell changed_when. 2026-10-09 16:47:59 -07:00
me e95c87dddf node, fix lint issues: fix indentation, do not update cache or use the latest file, add a changed_chen to shell. 2026-10-09 16:47:00 -07:00
me 0b88905e91 local, begin adding more names. 2026-10-09 16:35:03 -07:00
me e3d6a759a8 provisioning, test went well, refactor the rest of the file. 2026-10-09 15:53:43 -07:00
me b5c7bed4e9 llm, change message to not display \n's. 2026-10-09 15:45:36 -07:00
me 29e989fae9 priovision, refactor the general.ini file. 2026-10-09 15:44:52 -07:00
me f6dfa4f81f llm, fix unfinished message. 2026-10-09 15:44:39 -07:00
me 9e6e162b03 llm, attempt to fix decimal values which are supposed to be integers, fix some spacing. 2026-10-09 15:26:22 -07:00
me 816ef4ddc6 llm, simplify Continue config, add a function for pulling the LLMs outside of Ansible, adjust ollama settings. 2026-10-09 15:18:03 -07:00
me 731a367e6f llm, add config for Continue (a Codium plugin), fix size_mb not actually getting calculated, change log files to be per-run by making the timestamp very specific, further adjust the ollama environment variables. 2026-10-09 14:52:27 -07:00
me 76702e6433 local, change zeroclaw to llm. 2026-10-09 13:45:49 -07:00
me ee97598070 llm, refactor zeroclaw.yml to be llm since zeroclaw is now understood to be less of the priority. 2026-10-09 13:19:34 -07:00
me 74b42f3d63 zeroclaw, variablize the context amount to be per-machine. 2026-10-09 13:18:07 -07:00
me 0c86a76968 zeroclaw, greatly simplify the choosing of LLMs based on resources, refactor ollama run file, modify some of the env values, add qwen-code, change some of the models in the download queue. 2026-10-09 11:43:46 -07:00
me f29fad4078 loop, make the function much more robust. 2026-10-09 10:06:23 -07:00
me a9080a6d12 zeroclaw, a few more small edits while learning how things work. 2026-10-08 21:09:24 -07:00
me 22252b8880 zeroclaw, refactor a bit more, add env variables to zeroclaw daemon. 2026-10-08 20:00:34 -07:00
me 3c8617aab2 setup, be more specific about what failed. 2026-10-08 18:59:08 -07:00
me f29b28e838 cron, disable automatic flatpak updating. 2026-10-08 18:53:14 -07:00
me 9860f56bf7 zeroclaw, don't download qwen3.5:27b since 35b is also being used. 2026-10-08 12:09:02 -07:00
me 10821d2317 zeroclaw, still trying to fine-tune things, getting closer. 2026-10-08 10:38:05 -07:00
me d7c321adea setup, add status validation. 2026-10-08 09:56:29 -07:00
me 77d2ae62a3 zeroclaw, begin formatting the removals, add some more TBD's. 2026-10-07 11:58:16 -07:00
me a511fdac35 zeroclaw, move providers back after the installs so that they are accurate in the GUI. 2026-10-07 11:33:51 -07:00
me 934bec45b5 zeroclaw, remove extra newline. 2026-10-07 11:25:01 -07:00
me 0660dd55d4 zeroclaw, have both backup, not just the first one, in case the first doesn't change anything and that's what causes the save. 2026-10-07 11:20:39 -07:00
me 57707ff56e zeroclaw, add explicit attributes to the blockinfile tasks. 2026-10-07 11:19:50 -07:00
me fe6f41d1e8 zeroclaw, a few small fixes and refactors. 2026-10-07 11:11:56 -07:00
me b60c4c4170 zeroclaw, print the llms being installed and removed. 2026-10-07 10:58:20 -07:00
me 8099c34791 zeroclaw, move config editing to before the downloads so that it takes effect before waiting for all the installs. 2026-10-07 10:54:00 -07:00
me a319e29f93 zeroclaw, put system requirements in variables directly with the llm lists for better visibility and easier updating. 2026-10-07 10:51:40 -07:00
me 80a809545c zeroclaw, automate which laptop gets which llm based on system specs, add providers automatically to config.toml, add some root levels defaults including a parameter which hopefully help with timeouts. 2026-10-07 10:46:00 -07:00
me 4cd86fc47f zeroclaw, refactor runit section into a block as well as service and wait into loops. 2026-10-07 08:36:27 -07:00
me bef91a4ba1 zeroclaw, consolidate dir tasks and ensure all the variables are correct. 2026-10-07 08:26:49 -07:00
me ce34f879d6 zeroclaw, uncomment the lower weights for preferred models. 2026-10-07 08:20:42 -07:00
me 2c6921688f zeroclaw, add keep alive for ollama. 2026-10-07 08:20:04 -07:00
me e7d307a306 zeroclaw, remove comment. 2026-10-07 01:23:13 -07:00
me 227a91e2f3 zeroclaw, add a URI for web dashboard. 2026-10-07 01:14:26 -07:00
me 2fc13b59e6 zeroclaw, fix log script locations, rename variables. 2026-10-07 01:12:01 -07:00
me 7dd0f80590 zeroclaw, fix tasks to create log dest, all have owner and mode set, and have when clauses related to runit. 2026-10-07 00:58:06 -07:00
me af8182626a zeroclaw, add more potential options for qwen. 2026-10-07 00:47:39 -07:00
me 50d51b7264 zeroclaw, list the different weights of qwen3.5. 2026-10-07 00:42:54 -07:00
me 6fa3a42362 zeroclaw, ensure run and log directories exist, refactor the pulled models. 2026-10-07 00:34:42 -07:00
me 393ff77eaf zeroclaw, add runit script for web daemon. 2026-10-07 00:05:39 -07:00
me 562c2e4416 zeroclaw, final changes to get things working, still need to add zeroclaw daemon runit script. 2026-10-06 17:57:47 -07:00
me fecefb6a6e zeroclaw, remove toml file, web gui from daemon is way easy to use. 2026-10-06 17:56:33 -07:00
me 704955248b zeroclaw, addlogging for ollama service, fix ollama script ensuring all necessary variables exist; 2026-10-06 17:23:01 -07:00
me 5899f93a0a zeroclaw, add copying of the config file. 2026-10-06 17:21:53 -07:00
me 0e4c6d5faa system, add more variables for runit and its logging system. 2026-10-06 17:01:21 -07:00
me 15b8fc95ff update, ensure pacman has the priority over node_modules. 2026-10-06 17:00:57 -07:00
me 4307856790 zeroclaw, add a quickstarted config file. 2026-10-06 16:23:56 -07:00
me acfe37f0c0 local, add runit as well as start naming includes. 2026-10-06 16:23:14 -07:00
me 8db3616687 runit, create file to help with any fixes needed or additional software. 2026-10-06 16:22:54 -07:00
me 5be5c34fd6 android, go back to including all available in final report. 2026-10-06 16:19:15 -07:00
me bddb4d14b4 zeroclaw, create the runit scripts in the script dir, rather than directly in the service dir. 2026-10-06 15:57:25 -07:00
me c0fb178193 update, hopefully fix yay to not ask for password midway through the process. 2026-10-06 15:53:26 -07:00
me 8a5c2f4b8a zeroclaw, also pull qwen3:4b. 2026-10-06 15:50:04 -07:00
me 79887c227b android, speed up script by catting a file rather than calling the slow command android sdk list every time. 2026-10-06 15:49:47 -07:00
me 44b1bfd43a zeroclaw, add zerocode. 2026-10-06 15:43:54 -07:00
me 1d7374e3ad zeroclaw, add environment variable. 2026-10-06 15:43:41 -07:00
me ddfa5d5d81 zeroclaw, use a runit script which de-escalates to the user. 2026-10-06 15:40:12 -07:00
me 7f9d59213f zeroclaw, use exec_always in case the ollama process is killed and needs restarted. 2026-10-05 17:30:58 -07:00
me 9cf77d2ab8 zeroclaw, continue attempting to automate the process, don't have good enough reception to successfully download yet. 2026-10-05 17:28:03 -07:00
me d36585f21d tlp, use variable to name the run file. 2026-10-05 17:15:20 -07:00
me 742de9b6b4 system, add variable for the file used in runit. 2026-10-05 17:14:14 -07:00
me edaeec1ff2 android, revert back to doing direct cmmands since result code was not being handled properly. 2026-10-05 17:01:00 -07:00
me 2cf83a2fcf zeroclaw, add links to install guides and other details. 2026-10-05 15:27:05 -07:00
me d6dbe38e17 local, add zeroclaw to slow workstation list. 2026-10-05 15:13:12 -07:00
me 813a96c469 local, use FQCN. 2026-10-05 15:12:37 -07:00
me fbe5f54b7f zeroclaw, add initial playbook. 2026-10-05 14:53:03 -07:00
me b1d70789e7 flutter, fix lint issues. 2026-10-05 14:37:38 -07:00
me 39b949517a android, fix everything lint suggested besides the pipefails for single liners. 2026-10-05 07:13:36 -07:00
me 58f8636969 flutter, fix double spaces. 2026-10-02 19:25:48 -07:00
me 827db06b38 android, stop adding path changes to rc files and begin putting them in profiles for user. 2026-10-02 19:25:36 -07:00
me 08b60b62b6 flutter, remove PATH changes from user and root rc files and put in user's profile files. 2026-10-02 19:20:36 -07:00
me 48bf1d542f flutter, add TBD for env variables. 2026-10-02 19:15:03 -07:00
me 50e99bde43 android, add TBD for home variable. 2026-10-02 19:14:54 -07:00
me 31d9600253 Fix a misclick while doing find and replace for FQCN's. 2026-10-02 11:55:08 -07:00
me 1f47d2b50d Migrate meta to FQCN. 2026-10-02 11:26:43 -07:00
me e3bdcc595a Migrate package to FQCN. 2026-10-02 11:26:21 -07:00
me 77ca6380f4 Migrate debug to FQCN. 2026-10-02 11:25:34 -07:00
me f08f0e630a Migrate git to FQCN. 2026-10-02 11:24:23 -07:00
me b306064061 Migrate set_fact to FQCN. 2026-10-02 11:23:31 -07:00
me ab09a74bf2 Migrate file to FQCN. 2026-10-02 11:23:02 -07:00
me 45e1331ce8 Migrate stat to FQCN. 2026-10-02 11:21:31 -07:00
me 4fa346bd8b Migrate service to FQCN. 2026-10-02 11:20:43 -07:00
me 547112c4a1 Migrate blockinfile to FQCN. 2026-10-02 11:20:03 -07:00
me 688ee6cb1c Migrate lineinfile to FQCN. 2026-10-02 11:19:29 -07:00
me 1845c8da63 Migrate cron to FQCN. 2026-10-02 11:18:40 -07:00
me 1374648d0c Migrate user to FQCN. 2026-10-02 11:18:02 -07:00
me a06b5680c0 Migrate shell to FQCN. 2026-10-02 11:16:42 -07:00
me 425abcff73 notify, fix to current lint standards. 2026-10-02 11:11:48 -07:00
me 502cec92f3 sudo, fix to current lint standards. 2026-10-02 11:11:38 -07:00
me 18a875e842 users, fix to current lint standards. 2026-10-02 11:11:19 -07:00
me d272730ced doas, fix to current lint standards. 2026-10-02 11:11:13 -07:00
me 6178c56838 lint, go ahead and start fixing FQCN's, ignore more naming and spacing non-issues. 2026-10-02 11:10:49 -07:00
me e38d86015f local, ensure all tasks which require connectivity list that, so that the rest can be run offline. 2026-10-02 11:02:12 -07:00
me 463a5fc4af notify, reverse the changed_when's. 2026-10-02 11:01:49 -07:00
me a266189b38 intnernet, sleep after the output so the user may read it if running manually. 2026-10-02 11:01:30 -07:00
me eddc73850f internet, don't pause, won't work with cron. 2026-10-02 10:55:35 -07:00
me 8297204c9c internet, add pausing. 2026-10-02 10:50:15 -07:00
me d4b3c57cc9 ansible, add rotating of the log file. 2026-10-02 10:49:53 -07:00
me 50b67ed0cc users, move env-shared download to its own Internet requiring playbook. 2026-10-02 10:49:37 -07:00
me 4cb5e89fe9 internet, remove extra .com. 2026-10-02 10:36:14 -07:00
me ba98477576 ansible, remove the date from the log file name since that's about when the logs stopped appearing anywhere at all. 2026-10-02 10:25:24 -07:00
me d01227fcde Allow using notify.yml for any sort of mesages that need relayed. 2026-10-02 10:22:14 -07:00
me 2ea65fda25 notify, make sure commands execute successfully, use a variable rather than hard-coded status. 2026-10-02 10:21:32 -07:00
me d36eac4ceb local, fix indentation, add a few names, pass notify a variable. 2026-10-02 10:21:04 -07:00
me 1d750e4e30 lint, hide a few warnings completely. 2026-10-02 10:19:23 -07:00
me 4c0aef9bca local, add internet checking. 2026-10-02 10:05:32 -07:00
me bd3a0d33e0 internet_check, create file. 2026-10-02 10:05:12 -07:00
me e75d293787 packages, remove unnecessary ignore_errors. 2026-10-02 09:05:18 -07:00
me eedcebe11e flatpaks, add default mode for all executables. 2026-10-02 09:04:12 -07:00
me 3085ae8569 flatpaks, remove failed backspace. 2026-10-02 09:02:19 -07:00
me ad5c4b2d0e lint, ignore another type of fqcn. 2026-10-02 09:01:43 -07:00
me d77674a283 flatpaks, remove all ignore_errors, these should all work properly and if they didn't then we want to know. 2026-10-02 09:01:19 -07:00
me 3290afc7b7 i3, keep the 10 in the name so that it stays at the end. 2026-10-02 08:54:54 -07:00
me 29a08af257 i3, rename WS10 to WS0. 2026-10-02 08:53:51 -07:00
me c6f7a2526b i3, greatly shorten the FF and Transmission chains. 2026-10-02 08:52:52 -07:00
me c81726ab2c i3, greatly improve the Ctrl+Shift shortcuts, all apps open now in one go. 2026-10-02 08:50:13 -07:00
me d5c91d4fff flatpak, use Forkgram rather than Telegram. 2026-10-02 08:39:14 -07:00
me 1966e44734 packages, add Android Studio to coding AUR pulls. 2026-10-02 08:38:57 -07:00
me 713ae2dc49 lint, piped code has been working fine, move to be a warning. 2026-10-02 08:19:55 -07:00
me 3e5837bde2 android, add pipefails and see what it does. 2026-10-02 08:19:05 -07:00
me d40c178985 lint, names are not critical errors. 2026-10-02 08:14:14 -07:00
me 00d0a5297f Fix more ! into not. 2026-10-02 08:13:55 -07:00
me d01a6e5432 provision, exit more gracefully. 2026-10-02 08:12:26 -07:00
me 1f048876d0 lint, found more errors which need de-escalated. 2026-10-02 08:09:21 -07:00
me 386eb58767 Ansible does not use !, use not instead. 2026-10-02 08:07:27 -07:00
me 864853f5dc Use false instead of no. 2026-10-02 08:00:48 -07:00
me a822b095ee Use true instead of yes. 2026-10-02 07:59:57 -07:00
me ff548cc7a2 Add become to all become_user tasks. 2026-10-02 07:58:58 -07:00
me f808eb7ecb lint, ignore error about comments being too long. 2026-10-02 07:58:42 -07:00
me 9beecf1a49 Elminate usage of "BOOL != true". 2026-10-02 07:52:22 -07:00
me 0a820394bb Elminate usage of "BOOL == true". 2026-10-02 07:51:10 -07:00
me 198a731f9e lint, hide more warnigns and errors. 2026-10-02 07:49:17 -07:00
me 2917e32498 codium, fix boolean comparisons. 2026-10-02 07:48:55 -07:00
me b7ed58bac1 lint, change some of its full-on errors to be just warnings or ignored. 2026-10-02 07:44:31 -07:00
me d797b8a295 packages, dump code-oss for codium via AUR, code-oss has tons of sign-in and AI prompts YUCK!! 2026-10-02 07:44:08 -07:00
me 510af86d25 codium, block redhad telemetry. 2026-10-02 07:21:16 -07:00
me 060b1ac771 i3, add strawberry and move code to WS3. 2026-10-02 07:17:48 -07:00
me 9f203d5112 packages, add strawberry to workstations. 2026-10-02 07:17:30 -07:00
me 53920832cd tlp, change battery specs to be much higher if the battery setting is not done, otherwise if commented the config just retains the last applied settings. 2026-10-01 20:13:05 -07:00
me b522d18100 i3, better handing of restarting redshift. 2026-10-01 20:07:51 -07:00
me f3bc150953 i3, try only using the redshift-gtk line. 2026-10-01 20:02:49 -07:00
me 89b7c6d5de i3, redshift, add killall, fix location, and make it deeper. 2026-10-01 19:47:48 -07:00
me 97d2e38e2c packages, fix some churn on workstations. 2026-10-01 16:31:27 -07:00
me f97c2708fa setup, fix a double newline instance. 2026-09-29 15:57:21 -07:00
me 3d1b0791b3 android, change comment location. 2026-09-29 15:54:33 -07:00
me f7a260c722 setup, continue working on log output. 2026-09-29 15:52:59 -07:00
me 65d0c3c45e android, use proper if statements. 2026-09-29 15:52:38 -07:00
me e094ec7143 android, fix churn caused by flutter. 2026-09-29 15:52:19 -07:00
me 772c2906dd setup, make the output a bit more consistent. 2026-09-29 14:34:38 -07:00
me eb54844618 android, add comments to versions. 2026-09-29 14:34:16 -07:00
me f8226c07c3 android, fix grep quotes. 2026-09-29 14:34:01 -07:00
me ee461bee2d android, if the version says unknown try to install it again rather than skipping. 2026-09-29 14:22:15 -07:00
me f5d65ba192 android, move 37 to additional and keep 36 as required. 2026-09-29 14:18:27 -07:00
me 5e7279e497 ansible, fix false booleans. 2026-09-29 13:56:11 -07:00
me ba5a142339 packages, automatically install ansible-lint on coding machines. 2026-09-29 13:55:42 -07:00
me e11c6e1e64 setup, enhance output when no concurrent processes found. 2026-09-29 13:50:50 -07:00
me 7ad7edc82c android, attempt to add fail condition for sdk installs and removals. 2026-09-29 13:50:17 -07:00
me 63e7e97076 android, use boolean rather than deprecated yes/no. 2026-09-29 13:49:24 -07:00
me 19821939e2 android, list ALL packages, even the ones not installed. 2026-09-29 13:48:51 -07:00
me 07c2f352f1 android, fix download churn. 2026-09-29 13:48:05 -07:00
me 1c8c237bac android, make the removals idempotent too. 2026-09-29 12:29:36 -07:00
me c6875551b2 android, fix variable names, add idempotency to module changes. 2026-09-29 12:22:03 -07:00
me 3d61a7619c android, more thorough switch to android sdk from sdkmanager. 2026-09-29 11:51:19 -07:00
me 2d6bba789c setup, ensure variables are quoted. 2026-09-29 10:32:04 -07:00
me 5be56dd7f8 android, use the new sdk manager android. 2026-09-29 10:31:45 -07:00
me 7fe9f650a6 setup, remove lock file if we have verified there are no other runs. 2026-09-29 10:23:45 -07:00
me 6285f02214 bashrc, fix EOF and add note so it does not happen again. 2026-09-29 10:21:32 -07:00
me 1c20173b8b main, add lock file scripts and clean some areas up. 2026-09-29 09:48:33 -07:00
me 2dbfffafd0 lock, add files which handle checking, creating, and then removing a temporary lock file. 2026-09-29 09:48:21 -07:00
me 3aa1819440 cron, put timestamp in log file name. 2026-09-29 09:00:46 -07:00
me 68f7c91cdc workstation, add gimp and libreoffice to packages. 2026-09-29 08:45:01 -07:00
me 1e3f1e82cf flatpak, begin removing a few apps. 2026-09-29 08:39:36 -07:00
me adab73ff82 i3, have workspace 4 open Android Studio. 2026-09-29 08:32:04 -07:00
me 8daf385422 android, change semi-colons to be / to work better with the newer android sdk command. 2026-09-29 08:21:06 -07:00
me 8ead4b4e6d bashrc, add explicit () to functions. 2026-09-29 07:52:58 -07:00
me 5b6f1a5b64 bashrc, change functions to have underscore names. 2026-09-29 07:48:20 -07:00
104 changed files with 6526 additions and 1579 deletions

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# .ansible-lint
---
skip_list:
- command-instead-of-shell
- key-order[task]
- yaml[line-length]
- yaml[colons]
- jinja[spacing]
- name[missing]
- yaml[comments]
- yaml[commas]
- var-naming[pattern]
- yaml[braces]
warn_list:
- literal-compare
- ignore-errors
- no-changed-when
- yaml[indentation]
- risky-file-permissions
- risky-shell-pipe
- fqcn[action-core]
- fqcn[action]
+6 -7
View File
@@ -2,17 +2,16 @@
# Facts that must be gathered after running tasks.
- name: General | Facts | Gather | Locate bash
shell: which bash
ansible.builtin.shell: which bash
register: bash_exec
ignore_errors: yes
ignore_errors: true
- name: General | Facts | Gather | Locate ansible-pull
shell: which ansible-pull
ansible.builtin.shell: which ansible-pull
register: ansible_pull_exec
ignore_errors: yes
ignore_errors: true
- name: General | Facts | Gather | Locate zsh
shell: which zsh
ansible.builtin.shell: which zsh
register: zsh_exec
ignore_errors: yes
ignore_errors: true
+39 -22
View File
@@ -3,7 +3,7 @@
# This file is for ALL systems and should not include UI components.
- name: General | Facts | Package | Shared Defaults
set_fact:
ansible.builtin.set_fact:
sshfs: sshfs
tar: tar
iftop: iftop
@@ -22,15 +22,17 @@
alsa: alsa-utils
stress: stress
jq: jq
btop: btop
xkb: x11-xkb-utils
- name: General | Facts | Package | Parrot OS Fixes
set_fact:
ansible.builtin.set_fact:
ansible_pkg_mgr: "apt"
ansible_python_interpreter: "/usr/bin/python3"
when: ansible_distribution == "Parrot OS"
- name: General | Facts | Package | apt
set_fact:
ansible.builtin.set_fact:
locate: locate
opensshd: openssh-server
microcode_amd: amd64-microcode
@@ -41,7 +43,7 @@
when: ansible_pkg_mgr == "apt"
- name: General | Facts | Package | pacman
set_fact:
ansible.builtin.set_fact:
locate: mlocate
opensshd: openssh
microcode_amd: linux-firmware
@@ -50,10 +52,11 @@
encfs: encfs
dig: bind
base_devel: base-devel
xkb: xorg-setxkbmap
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Package | FreeBSD
set_fact:
ansible.builtin.set_fact:
sshfs: fusefs-sshfs
locate: htop # Placeholder to prevent errors, locate built into FreeBSD.
opensshd: htop # sshd comes installed on FreeBSD
@@ -65,12 +68,12 @@
when: ansible_system == "FreeBSD"
- name: General | Facts | Package | dnf (Fixes)
set_fact:
ansible.builtin.set_fact:
ansible_pkg_mgr: dnf
when: ansible_pkg_mgr in ("dnf5")
- name: General | Facts | Package | dnf
set_fact:
ansible.builtin.set_fact:
sshfs: fuse-sshfs
locate: plocate
opensshd: openssh
@@ -83,7 +86,7 @@
when: ansible_pkg_mgr == "dnf"
- name: General | Facts | Package | zypper
set_fact:
ansible.builtin.set_fact:
locate: plocate
opensshd: openssh
microcode_amd: ucode-amd
@@ -95,20 +98,24 @@
- name: General | Facts | Package | Update Command | Helpers
set_fact:
ansible.builtin.set_fact:
update_accept_var: '$accept'
nix_days: 14
ansible_distribution_file: "{{ prov_dir }}/ansible_distribution.txt"
ansible_pkg_mgr_file: "{{ prov_dir }}/ansible_pkg_mgr.txt"
- name: General | Facts | Package | Update Command | Store Variables
shell: "{{ item }}"
ansible.builtin.shell: |
set -o pipefail
{{ item }}
loop:
- "echo '{{ ansible_distribution }}' > {{ ansible_distribution_file }}"
- "echo '{{ ansible_pkg_mgr }}' > {{ ansible_pkg_mgr_file }}"
register: shell_check
changed_when: shell_check.rc == 0
- name: General | Facts | Package | Update Command
set_fact:
ansible.builtin.set_fact:
update_package_manager: |
distribution="`cat {{ ansible_distribution_file }}`"
@@ -159,13 +166,13 @@
auto_accept="--noconfirm"
fi
sudo pacman -Syu $auto_accept ||
sudo pacman -Syu $auto_accept --overwrite '/usr/lib/node_modules/*' ||
return 1
echo -e "\n"
if [[ "$LOGNAME" != "root" ]]; then
echo "*** AUR (yay) ***"
yay -Syu $auto_accept || return 2
yay --sudoloop -Syu $auto_accept || return 2
else
echo "*** User is root, skipping AUR (yay) ***"
fi
@@ -261,20 +268,27 @@
;;
esac
update_npm: |
if [[ `which npm` ]]; then
## Let's let the distro package managers handle this, otherwise may end up
## breaking dependencies or causing other system weirdness. No thanks! :)
if [[ `which npm` && 1 == 0 ]]; then
echo "*** NPM ***" &&
sudo npm update -g
echo -e "\n"
else
echo -e "*** Skipping NPM ***\n\n"
fi
# Flatpaks
- name: General | Facts | Package | Update Command | Flatpak | Check
shell: which flatpak
ansible.builtin.shell: |
set -o pipefail
which flatpak
register: flatpak_exec
ignore_errors: yes
changed_when: flatpak_exec.rc == 0
ignore_errors: true
- name: General | Facts | Package | Update Command | Flatpak | Exists
set_fact:
ansible.builtin.set_fact:
update_flatpak: |
echo "*** Flatpak ***"
[[ -n "$accept" ]] && sudo flatpak repair
@@ -286,19 +300,22 @@
and not flatpak_exec.failed
- name: General | Facts | Package | Update Command | Flatpak | Missing
set_fact:
ansible.builtin.set_fact:
update_flatpak: |
echo "*** Flatpak Not Installed ***"
when: update_flatpak is not defined
# Firmware
- name: General | Facts | Package | Update Command | Firmware | Check
shell: which fwupdmgr
ansible.builtin.shell: |
set -o pipefail
which fwupdmgr
register: fwupdmgr_exec
ignore_errors: yes
changed_when: fwupdmgr_exec.rc == 0
ignore_errors: true
- name: General | Facts | Package | Update Command | Firmware | Exists
set_fact:
ansible.builtin.set_fact:
update_firmware: |
echo "*** Firmware ***"
sudo fwupdmgr refresh --force &&
@@ -310,7 +327,7 @@
and not fwupdmgr_exec.failed
- name: General | Facts | Package | Update Command | Firmware | Missing
set_fact:
ansible.builtin.set_fact:
update_firmware: |
echo "*** Firmware Updater (fwupdmgr) Not Installed ***"
when: update_firmware is not defined
+4 -4
View File
@@ -2,7 +2,7 @@
# Definitions for service management.
- name: General | Facts | Service | All
set_fact:
ansible.builtin.set_fact:
cups: cups
cups_pattern: cupsd
cups_browse: cups-browsed
@@ -18,19 +18,19 @@
bluetooth_pattern: bluetooth
- name: General | Facts | Service | Arch Linux
set_fact:
ansible.builtin.set_fact:
crond: cronie
crond_pattern: cronie
when: ansible_pkg_mgr == "pacman"
- name: General | Facts | Service | Fedora
set_fact:
ansible.builtin.set_fact:
crond: crond
crond_pattern: crond
when: ansible_distribution in ("Fedora")
- name: General | Facts | Service | Ubuntu Linux
set_fact:
ansible.builtin.set_fact:
sshd: ssh
sshd_pattern: ssh
when: ansible_distribution == "Ubuntu"
+37 -8
View File
@@ -2,7 +2,7 @@
# Define file, folder, and other facts per OS.
- name: General | Facts | System | Global 01
set_fact:
ansible.builtin.set_fact:
global_src: /usr/local/src
global_bin: /usr/local/bin
x_desktops: /usr/share/xsessions
@@ -11,22 +11,51 @@
notify_log: "ansible.notify.log"
runit_script_dir: /etc/runit/sv
runit_service_dir: /etc/runit/runsvdir/default
runit_service_script: run
runit_log_dir: log
global_log: /var/log
global_log_config: config
runit_finish_sleep: |
#!/bin/sh
exec 2>&1
# $1 is the exit code, $2 is the exit status byte (signal number if killed)
echo "FINISH: Service returned with exit code: $1 and status: $2"
sleep_long=10
sleep_short=1
if [[ "$1" != 0 ]]; then
echo "FINISH: Sleeping for $sleep_long seconds due to error..."
sleep $sleep_long
else
echo "FINISH: Sleeping for $sleep_short seconds."
sleep $sleep_short
fi
runit_log_config_1mb: |
s1000000 # rotate at 1 MB
n2 # keep 2 old files
runit_log_config_10mb: |
s10000000 # rotate at 10 MB
n2 # keep 2 old files
runit_log_config_100mb: |
s100000000 # rotate at 100 MB
n2 # keep 2 old files
- name: General | Facts | System | Global 02
set_fact:
ansible.builtin.set_fact:
shared_rc_install_dir: "{{ global_src }}/env-shared"
notify_log_file: "/var/log/{{ notify_log }}"
notify_log_file_wip: "/tmp/{{ notify_log }}.wip"
lynis_install_dir: "{{ global_src }}/lynis"
dwm_install_dir: "{{ global_src }}/dwm"
st_install_dir: "{{ global_src }}/st"
runit_log_script: "{{ runit_service_script }}"
- name: General | Facts | System | Global 03
set_fact:
ansible.builtin.set_fact:
shared_rc_bin: "{{ shared_rc_install_dir }}/bin-shared"
- name: General | Facts | System | Linux
set_fact:
ansible.builtin.set_fact:
rc_conf: /dev/null
sudoers_install_dir: /etc/sudoers.d/
sudoers_config: /etc/sudoers
@@ -34,24 +63,24 @@
when: ansible_system == "Linux"
- name: General | Facts | System | FreeBSD
set_fact:
ansible.builtin.set_fact:
rc_conf: /etc/rc.conf
sudoers_install_dir: /usr/local/etc/sudoers.d/
shutdown_command: sudo shutdown -p now
when: ansible_system == "FreeBSD"
- name: General | Facts | System | Report File Names
set_fact:
ansible.builtin.set_fact:
lynis_report: "lynis_hardness_check.txt"
nmap_report: "nmap_port_check.txt"
- name: General | Facts | System | Ansible Branch
set_fact:
ansible.builtin.set_fact:
branch: main
when: branch is not defined
- name: General | Facts | System | runit (Devuan)
set_fact:
ansible.builtin.set_fact:
runit_script_dir: /etc/sv
runit_service_dir: /etc/service
when: ansible_pkg_mgr == "apt"
+2 -2
View File
@@ -2,12 +2,12 @@
# Define users and groups per OS type.
- name: General | Facts | User | Linux
set_fact:
ansible.builtin.set_fact:
root_group: root
when: ansible_system == "Linux"
- name: General | Facts | User | FreeBSD
set_fact:
ansible.builtin.set_fact:
root_group: wheel
when: ansible_system == "FreeBSD"
+5 -5
View File
@@ -4,10 +4,10 @@
## Load Config File ##
- name: Miner | Facts | Config File | Download
shell: "scp {{ file_server }}:{{ config_file_remote }} {{ config_file_local }}; chmod 700 {{ config_file_local }}"
ansible.builtin.shell: "scp {{ file_server }}:{{ config_file_remote }} {{ config_file_local }}; chmod 700 {{ config_file_local }}"
- name: Miner | Facts | Config File | Load Wallets
set_fact:
ansible.builtin.set_fact:
wallet_xmr: "{{ lookup('ini', 'xmr section={{config_section_wallet}} file={{config_file_local}}') }}"
wallet_eth: "{{ lookup('ini', 'eth section={{config_section_wallet}} file={{config_file_local}}') }}"
@@ -15,9 +15,9 @@
## Verify ##
- name: Miner | Facts | Config File | DEBUG
debug:
ansible.builtin.debug:
var: "{{ item }}"
loop:
loop:
- wallet_xmr
- wallet_eth
@@ -25,4 +25,4 @@
## Clean Up ##
- name: Miner | Facts | Config File | Delete
shell: "mv {{ config_file_local }} ~/TRASH/"
ansible.builtin.shell: "mv {{ config_file_local }} ~/TRASH/"
+7 -7
View File
@@ -2,7 +2,7 @@
# Create arrays of pools per coin.
- name: Miner | Facts | Pools
set_fact:
ansible.builtin.set_fact:
nanopool_xmr:
- { "priority": 1, "name": "xmr-us-east1.nanopool.org:14433" }
- { "priority": 2, "name": "xmr-us-west1.nanopool.org:14433" }
@@ -34,7 +34,7 @@
# CPU #
- name: Miner | Facts | Pools | Set GPU to Nanopool Eth
set_fact:
ansible.builtin.set_fact:
cpu_pool: "{{ nanopool_xmr }}"
when: nanominer_cpu == "xmr" and nanominer_cpu_pool == "nanopool"
@@ -42,26 +42,26 @@
# GPU #
- name: Miner | Facts | Pools | Set GPU to Nanopool Eth
set_fact:
ansible.builtin.set_fact:
gpu_pool: "{{ nanopool_eth }}"
when: nanominer_gpu == "eth" and nanominer_gpu_pool == "nanopool"
- name: Miner | Facts | Pools | Set GPU to Etherpool Eth
set_fact:
ansible.builtin.set_fact:
gpu_pool: "{{ ethermine_eth }}"
when: nanominer_gpu == "eth" and nanominer_gpu_pool == "etherpool"
- name: Miner | Facts | Pools | Set GPU to F2Pool Eth
set_fact:
ansible.builtin.set_fact:
gpu_pool: "{{ f2pool_eth }}"
when: nanominer_gpu == "eth" and nanominer_gpu_pool == "f2pool"
## Validate ##
- name: Miner | Facts | Pools | DEBUG
debug:
ansible.builtin.debug:
var: "{{ item }}"
loop:
- cpu_pool
+7 -7
View File
@@ -4,21 +4,21 @@
## Global ##
- name: Miner | Facts | System | Global 1
set_fact:
ansible.builtin.set_fact:
file_server: '{{ user }}@leet'
check_alive_start: "[[ `ps -ef | grep -v 'grep' | grep -v '/bin/sh -c' | grep -v $$ | grep -c '"
check_alive_end: "'` == '0' ]] &&"
combined_log_file: "{{ user_mfn.home }}/log.txt"
- name: Miner | Facts | System | Global 2
set_fact:
ansible.builtin.set_fact:
use_combined_log_file: ">> {{ combined_log_file }} 2>&1"
## Config File ##
- name: Miner | Facts | System | My Config File
set_fact:
ansible.builtin.set_fact:
config_file_remote: "InstallFiles/Miners/miner.ini"
config_file_local: "{{ user_mfn.home }}/miner.ini"
config_section_wallet: wallet
@@ -31,20 +31,20 @@
## Nanominer ##
- name: Miner | Facts | System | nanominer 1
set_fact:
ansible.builtin.set_fact:
nanominer_home: "{{ user_mfn.home }}/nanominer"
nanominer_version: "3.4.3" # Download link: https://github.com/nanopool/nanominer/releases
nanominer_script: "{{ user_mfn.home }}/nanominer.sh"
- name: Miner | Facts | System | nanominer 2
set_fact:
ansible.builtin.set_fact:
nanominer_bin: "{{ nanominer_home }}/nanominer-linux-{{ nanominer_version }}"
nanominer_tar_remote: "InstallFiles/Miners/nanominer/*{{ nanominer_version }}*.tar.gz"
nanominer_config: "{{ nanominer_home }}/config.ini"
nanominer_logs: "{{ nanominer_home}}/logs"
- name: Miner | Facts | System | nanominer 3
set_fact:
ansible.builtin.set_fact:
nanominer_tar_local: "{{ nanominer_bin }}.tar.gz"
nanominer_exec: "{{ nanominer_bin }}/nanominer"
@@ -52,7 +52,7 @@
## Miner Array ##
- name: Miner | Facts | System | Miner Array
set_fact:
ansible.builtin.set_fact:
miners:
- { "name": "xmr_stak_cpu", "enabled": '{{ (xmr_stak_cpu != false) }}', "command": "{{ user_mfn.home }}/xmr_stak_cpu.sh {{ use_combined_log_file }}" }
- { "name": "ethminer", "enabled": '{{ (ethminer != false) }}', "command": "{{ user_mfn.home }}/ethminer.sh {{ use_combined_log_file }}" }
+1 -1
View File
@@ -2,6 +2,6 @@
# System related variables.
- name: Facts | Server | System | FreeBSD
set_fact:
ansible.builtin.set_fact:
ansible_python_interpreter: "/usr/local/bin/python3.8"
when: ansible_system == "FreeBSD"
+24 -16
View File
@@ -3,14 +3,14 @@
# This is only for Workstation devices with UIs.
- name: Workstation | Facts | Packages | Parrot OS Fixes
set_fact:
ansible.builtin.set_fact:
ansible_pkg_mgr: "apt"
ansible_python_interpreter: "/usr/bin/python3"
when: ansible_distribution == "Parrot OS"
- name: Workstation | Facts | Package | Consistent
set_fact:
ansible.builtin.set_fact:
firefox: firefox
firefox_esr: firefox-esr
thunderbird: thunderbird
@@ -56,10 +56,15 @@
mpv: mpv
transmission_gtk: transmission-gtk
transmission_qt: transmission-qt
libreoffice: libreoffice
strawberry: strawberry
dict_en: hunspell-en_us
dict_es: hunspell-es_any
xset: xorg-xset
xlock: xss-lock
- name: Workstation | Facts | Package | apt (All Distros)
set_fact:
ansible.builtin.set_fact:
xz: xz-utils
mesa: libglu1-mesa
mesa_utils: libglu1-mesa
@@ -76,55 +81,58 @@
ncurses: libncurses-dev
android_udev: android-udev-rules
vlc_plugins: libavcodec-extra
xset: x11-server-utils
when: ansible_pkg_mgr == "apt"
- name: Workstation | Facts | Package | Pop_OS!
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
firefox_esr: firefox
when: ansible_distribution == "Pop!_OS"
- name: Workstation | Facts | Package | Ubuntu
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
firefox_esr: firefox
dmenu: suckless-tools
when: ansible_distribution == "Ubuntu"
- name: Workstation | Facts | Package | Debian & Devuan
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
dmenu: suckless-tools
firefox: firefox-esr
when: ansible_distribution in ("Debian", "Devuan")
- name: Workstation | Facts | Package | Mint
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
firefox_esr: firefox
when: ansible_distribution == "Linux Mint"
- name: Workstation | Facts | Package | Parrot OS
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
when: ansible_distribution == "Parrot OS"
- name: Workstation | Facts | Package | Apt w/o LibVirt
set_fact:
ansible.builtin.set_fact:
gnome_boxes: htop
when: ansible_pkg_mgr == "apt"
and ansible_service_mgr not in ("systemd", "sysvinit")
- name: Workstation | Facts | Package | pacman (All Distros)
set_fact:
ansible.builtin.set_fact:
macbook_wifi_driver: broadcom-wl-dkms
android_jdk: jdk-openjdk
android_fastboot: android-tools
android_adb: android-tools
libreoffice: libreoffice-still
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Facts | Package | Arch / Manjaro / Artix
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
psutil: python-psutil
#appimagelauncher: appimagelauncher # No longer in the repos, AUR.
@@ -135,7 +143,7 @@
- name: Workstation | Facts | Package | FreeBSD
set_fact:
ansible.builtin.set_fact:
flatpak_distro: false
psutil: py38-psutil
ansible_python_interpreter: "/usr/local/bin/python3.8"
@@ -145,7 +153,7 @@
- name: Workstation | Facts | Package | Fedora
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
firefox_esr: firefox
font_awesome: python3-XStatic-Font-Awesome
@@ -155,7 +163,7 @@
- name: Workstation | Facts | Package | openSUSE
set_fact:
ansible.builtin.set_fact:
flatpak_distro: true
firefox_esr: firefox-esr-branding-openSUSE
font_awesome: fontawesome-fonts
@@ -164,6 +172,6 @@
- name: Workstation | Facts | Package | NixOS
set_fact:
ansible.builtin.set_fact:
flatpak_distro: false
when: ansible_distribution == "NixOS"
+1 -1
View File
@@ -69,7 +69,7 @@ sleep 5
echo "*** Creating backup at '$BACKUP2' ***"
sudo zip -rv "$BACKUP2" \
/root /home /srv/sftp \
/root /home \
-x "*/.gradle/" -x "*/app/build/*"
status="$?"
+94
View File
@@ -0,0 +1,94 @@
#!/bin/sh -e
# 2026-10-10 Hyperling
# Stop a system from going into swap due to LLMs.
### Tuning ###
typeset -i sleep=10 full_pct=98 high_pct=90
### Functions ###
restart_service() {
if [ -z $1 ]; then
echo "ERROR: Service name must be passed to restart_service()."
return 1
fi
sv restart $1
status=$?
if [[ $status != 0 ]]; then
echo "$1 failed to restart, returned $status."
return $status
fi
}
# While we could loop over `ollama ps` and stop them, this ensures that the UIs
# do not sit around waiting for responses from the dead LLMs. It bring them up
# in a fresh state so that work can continue from a more clean slate.
restart_llms() {
restart_service ollama || killall ollama
#restart_service zeroclaw
#restart_service open-webui
#restart_service qwen-code
}
### Main ###
typeset -i {total,used}_{ram,swap}=0 \
used_{ram,swap}_pct=0 \
last_{ram,swap}_pct=100 \
count=0
while [[ true ]]; do
count=$(expr $count + 1 )
echo "$(date +'%Y-%m-%d @ %H:%M:%S') - Loop $count"
# RAM #
total_ram=$(free | awk '/^Mem:/ {print $2}')
used_ram=$(free | awk '/^Mem:/ {print $3}')
used_ram_pct=$( \
awk -v used="$used_ram" -v total="$total_ram" \
'BEGIN {printf "%d",(used/total)*100}' \
)
echo "Current RAM usage is $used_ram_pct%, was $last_ram_pct% last loop."
# Swap #
total_swap=$(free | awk '/^Swap:/ {print $2}')
used_swap=$(free | awk '/^Swap:/ {print $3}')
used_swap_pct=$( \
awk -v used="$used_swap" -v total="$total_swap" \
'BEGIN {printf "%d",(used/total)*100}' \
)
echo "Current swap usage is $used_swap_pct%, was $last_swap_pct% last loop."
# If RAM is full and swap is growing then restart LLM services.
if [ $used_ram_pct -gt $full_pct ] &&
[ $used_swap_pct -gt $last_swap_pct ]
then
echo "WARNING: RAM full and swap is growing. Restarting LLMs."
restart_llms
continue
fi
# If both are high then restart LLM services.
if [ $used_ram_pct -ge $high_pct ] &&
[ $used_swap_pct -ge $high_pct ]
then
echo "WARNING: RAM and swap both high. Restarting LLMs."
restart_llms
continue
fi
# Finish #
echo -e "Check finished, sleeping for ${sleep}...\n"
last_ram_pct=$used_ram_pct
last_swap_pct=$used_swap_pct
sleep $sleep
done
+108 -61
View File
@@ -9,8 +9,8 @@
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $FIREFOX "sh -c '(which firefox && firefox) || (which firefox-esr && firefox-esr) || (which firefox-flatpak && firefox-flatpak)'"
set $TRANSMISSION "sh -c '(which transmission && transmission) || (which transmission-qt && transmission-qt) || (which transmission-gtk && transmission-gtk) || (which transmission-flatpak && transmission-flatpak)'"
set $FIREFOX "sh -c '(firefox || firefox-esr || firefox-flatpak)'"
set $TRANSMISSION "sh -c '(transmission || transmission-qt || transmission-gtk || transmission-flatpak)'"
# Use the `xev` command to see the name and code of a keyboard key.
@@ -27,28 +27,6 @@ font pango:monospace 8
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
@@ -144,18 +122,23 @@ bindsym $mod+c exec codium-flatpak
# light requires sudo privileges unless video group and udev are configured.
set $b_time 3000
set $b_micro 5
set $b_small 10
set $b_large 20
# Use the bracket keys to change the brightness.
bindsym $mod+bracketleft exec --no-startup-id "light -U $b_small && notify-send -t $b_time 'Brightness - ' $(light -G)"
bindsym $mod+bracketright exec --no-startup-id "light -A $b_small && notify-send -t $b_time 'Brightness + ' $(light -G)"
bindsym $ctrl+bracketleft exec --no-startup-id "light -U $b_micro && notify-send -t $b_time 'Brightness - ' $(light -G)"
bindsym $ctrl+bracketright exec --no-startup-id "light -A $b_micro && notify-send -t $b_time 'Brightness + ' $(light -G)"
bindsym $mod+bracketleft exec --no-startup-id "light -U $b_small && notify-send -t $b_time 'Brightness -- ' $(light -G)"
bindsym $mod+bracketright exec --no-startup-id "light -A $b_small && notify-send -t $b_time 'Brightness ++ ' $(light -G)"
bindsym $shift+$mod+bracketleft exec --no-startup-id "light -U $b_large && notify-send -t $b_time 'Brightness ---' $(light -G)"
bindsym $shift+$mod+bracketright exec --no-startup-id "light -A $b_large && notify-send -t $b_time 'Brightness +++' $(light -G)"
# Also get the actual brightness keys to work!!
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A $b_small && notify-send -t $b_time 'Brightness + ' $(light -G)"
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U $b_small && notify-send -t $b_time 'Brightness - ' $(light -G)"
bindsym $ctrl+XF86MonBrightnessUp exec --no-startup-id "light -A $b_micro && notify-send -t $b_time 'Brightness + ' $(light -G)"
bindsym $ctrl+XF86MonBrightnessDown exec --no-startup-id "light -U $b_micro && notify-send -t $b_time 'Brightness - ' $(light -G)"
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A $b_small && notify-send -t $b_time 'Brightness ++ ' $(light -G)"
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U $b_small && notify-send -t $b_time 'Brightness -- ' $(light -G)"
bindsym $shift+XF86MonBrightnessUp exec --no-startup-id "light -A $b_large && notify-send -t $b_time 'Brightness +++' $(light -G)"
bindsym $shift+XF86MonBrightnessDown exec --no-startup-id "light -U $b_large && notify-send -t $b_time 'Brightness ---' $(light -G)"
@@ -167,13 +150,17 @@ bindsym $shift+XF86MonBrightnessDown exec --no-startup-id "light -U $b_large &&
# Macbooks tend to use 'sysfs/leds/smc::kbd_backlight'
# NovaCustom laptop is 'sysfs/leds/system76_acpi::kbd_backlight'
# Some other laptops may be 'sysfs/class/leds/...', use ìght -L`to find out.
bindsym XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A $b_small && notify-send -t $b_time 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U $b_small && notify-send -t $b_time 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $ctrl+XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A $b_micro && notify-send -t $b_time 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $ctrl+XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U $b_micro && notify-send -t $b_time 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A $b_small && notify-send -t $b_time 'Keyboard Brightness ++ ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U $b_small && notify-send -t $b_time 'Keyboard Brightness -- ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A $b_large && notify-send -t $b_time 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U $b_large && notify-send -t $b_time 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A $b_small && notify-send -t $b_time 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $b_small && notify-send -t $b_time 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $ctrl+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A $b_micro && notify-send -t $b_time 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $ctrl+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $b_micro && notify-send -t $b_time 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A $b_small && notify-send -t $b_time 'Keyboard Brightness ++ ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $b_small && notify-send -t $b_time 'Keyboard Brightness -- ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+$mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A $b_large && notify-send -t $b_time 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
bindsym $shift+$mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $b_large && notify-send -t $b_time 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
@@ -182,26 +169,30 @@ bindsym $shift+$mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U $
# The volume function is from https://git.hyperling.com/me/env-ansible
set $v_time 1500
set $v_small 5
set $v_micro 5
set $v_small 10
set $v_large 25
# Use the comma and period keys to change volume.
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_small && notify-send -t $v_time "Volume - " $(volume)'
bindsym $mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_small && notify-send -t $v_time "Volume + " $(volume)'
bindsym $ctrl+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_micro && notify-send -t $v_time "Volume - " $(volume)'
bindsym $ctrl+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_micro && notify-send -t $v_time "Volume + " $(volume)'
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_small && notify-send -t $v_time "Volume -- " $(volume)'
bindsym $mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_small && notify-send -t $v_time "Volume ++ " $(volume)'
bindsym $shift+$mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_large && notify-send -t $v_time "Volume ---" $(volume)'
bindsym $shift+$mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_large && notify-send -t $v_time "Volume +++" $(volume)'
# Actual volume keys.
bindsym XF86AudioMute exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume mute && notify-send -t $v_time "Volume Muted" $(volume)'
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_small && notify-send -t $v_time "Volume + " $(volume)'
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_small && notify-send -t $v_time "Volume - " $(volume)'
bindsym $ctrl+XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_micro && notify-send -t $v_time "Volume + " $(volume)'
bindsym $ctrl+XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_micro && notify-send -t $v_time "Volume - " $(volume)'
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_small && notify-send -t $v_time "Volume ++ " $(volume)'
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_small && notify-send -t $v_time "Volume -- " $(volume)'
bindsym $shift+XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$v_large && notify-send -t $v_time "Volume +++ " $(volume)'
bindsym $shift+XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$v_large && notify-send -t $v_time "Volume --- " $(volume)'
bindsym $mod+slash exec pavucontrol
## Workspaces ##
# Define names for default workspaces for which we configure key bindings later on.
@@ -225,7 +216,7 @@ set $ws8 "8 - MUS"
# Videos
set $ws9 "9 - VID"
# VPNs
set $ws10 "10 - VPN"
set $ws0 "10 - VPN"
# switch to workspace
bindsym $mod+1 workspace number $ws1
@@ -237,7 +228,7 @@ bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
bindsym $mod+0 workspace number $ws0
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
@@ -249,7 +240,7 @@ bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
bindsym $mod+Shift+0 move container to workspace number $ws0
## Keep certain programs in certain tabs. ##
# Use the `xprop` command to find the class of a program.
@@ -262,8 +253,8 @@ assign [class="(?i).*librewolf.*"] $ws2
assign [class="(?i).*brave.*"] $ws2
assign [class="(?i).*codium.*"] $ws3
assign [class="(?i).*code.*"] $ws3
assign [class="(?i).*code.*"] $ws4
assign [class="(?i).*flutter.*"] $ws4
assign [class="(?i).*jetbrains.*"] $ws4
@@ -280,25 +271,29 @@ assign [class="(?i).*waydroid.*"] $ws6
assign [class="(?i).*transmission.*"] $ws7
assign [class="(?i).*rhythmbox.*"] $ws8
assign [class="(?i).*strawberry.*"] $ws8
assign [class="(?i).*vlc.*"] $ws9
assign [class="(?i).*mpv.*"] $ws9
assign [class="(?i).*vpn.*"] $ws10
assign [class="(?i).*mullvad.*"] $ws10
assign [class="(?i).*vpn.*"] $ws0
assign [class="(?i).*mullvad.*"] $ws0
assign [class="(?i).*gnome-system-monitor.*"] $ws0
## Workspace Specific Workflows ##
bindsym $ctrl+$shift+1 workspace $ws1; exec "i3-sensible-terminal; gnome-system-monitor"
#bindsym $ctrl+$shift+1 workspace $ws1; exec "i3-sensible-terminal & gnome-system-monitor"
bindsym $ctrl+$shift+1 workspace $ws1; exec "i3-sensible-terminal & i3-sensible-terminal btop -u 500"
bindsym $ctrl+$shift+2 workspace $ws2; exec $FIREFOX
bindsym $ctrl+$shift+3 workspace $ws3; exec codium-flatpak
bindsym $ctrl+$shift+4 workspace $ws4; exec code-flatpak
bindsym $ctrl+$shift+5 workspace $ws5; exec "session; dino"
bindsym $ctrl+$shift+6 workspace $ws6; exec "pavucontrol; blueman-manager"
bindsym $ctrl+$shift+3 workspace $ws3; exec "(codium || vscodium || codium-flatpak || vscodium-flatpak)"
bindsym $ctrl+$shift+4 workspace $ws4; exec "android-studio || android-studio-flatpak"
bindsym $ctrl+$shift+5 workspace $ws5; exec "(signal || signal-flatpak) & (dino || dino-flatpak)"
bindsym $alt+$shift+5 workspace $ws5; exec "(session || session-flatpak) & (forkgram || forkgram-flatpak || telegram || telegram-flatpak)"
bindsym $ctrl+$shift+6 workspace $ws6; exec "pavucontrol & blueman-manager"
bindsym $ctrl+$shift+7 workspace $ws7; exec $TRANSMISSION
bindsym $ctrl+$shift+8 workspace $ws8; exec rhythmbox
bindsym $ctrl+$shift+8 workspace $ws8; exec strawberry
bindsym $ctrl+$shift+9 workspace $ws9; exec thunar
bindsym $ctrl+$shift+0 workspace $ws10; exec mullvad-vpn
bindsym $ctrl+$shift+0 workspace $ws0; exec "mullvad-vpn & gnome-system-monitor"
## Reloads, Restarts, Exit ##
@@ -314,15 +309,29 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
bindsym $mod+Shift+q exec "i3-msg exit"
# lock
bindsym $ctrl+$alt+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
bindsym $ctrl+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
bindsym $shift+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
#set $LOCK_CMD "i3lock -c 333333 -e -f && sleep 1 && xset dpms force off"
set $LOCK_CMD "loginctl lock-session"
bindsym $ctrl+$alt+l exec $LOCK_CMD
bindsym $ctrl+$mod+l exec $LOCK_CMD
bindsym $shift+$mod+l exec $LOCK_CMD
# shutdown entire system.
#bindsym $ctrl+$shift+q exec dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
bindsym $ctrl+$alt+q exec sudo shutdown -h now
bindsym $shift+$alt+q exec sudo shutdown -h now
bindsym $shift+$ctrl+q exec sudo shutdown -h now
bindsym $ctrl+$alt+$mod+q exec sudo shutdown -h now
bindsym $shift+$alt+$mod+q exec sudo shutdown -h now
bindsym $shift+$ctrl+$mod+q exec sudo shutdown -h now
# restart entire system.
bindsym $ctrl+$alt+$mod+r exec sudo shutdown -r now
bindsym $shift+$alt+$mod+r exec sudo shutdown -r now
bindsym $shift+$ctrl+$mod+r exec sudo shutdown -r now
# restart LLM programs
set $RESTART_LLMS "sudo sv restart ollama; sudo sv restart zeroclaw; sudo sv restart open-webui"
bindsym $ctrl+$alt+delete exec $RESTART_LLMS
bindsym $shift+$alt+delete exec $RESTART_LLMS
bindsym $shift+$ctrl+delete exec $RESTART_LLMS
## Resizing (Disabled) ##
@@ -367,11 +376,12 @@ bar {
# Workspace 1
exec --no-startup-id i3-sensible-terminal
exec --no-startup-id gnome-system-monitor
exec --no-startup-id i3-sensible-terminal btop -u 500
# Respective Workspaces
exec --no-startup-id mullvad-vpn
exec --no-startup-id $TRANSMISSION
exec --no-startup-id gnome-system-monitor
# Set defaults for laptop backlights.
exec --no-startup-id "light -S 20; light -N 5; light -O"
@@ -388,7 +398,7 @@ exec_always --no-startup-id "sleep 00; killall pipewire wireplumber pipewire-pul
exec_always --no-startup-id "sleep 01; pipewire >~/Reports/pipewire.log 2>&1 &"
exec_always --no-startup-id "sleep 02; wireplumber >~/Reports/wireplumber.log 2>&1 &"
exec_always --no-startup-id "sleep 03; pipewire-pulse >~/Reports/pipewire-pulse.log 2>&1 &"
exec --no-startup-id "sleep 04; bash -c 'source /usr/local/bin/volume.function && volume 25'"
exec --no-startup-id "sleep 04; bash -c 'source /usr/local/bin/volume.function && volume 75'"
# Wallpaper
exec_always --no-startup-id feh --recursive --randomize --bg-fill ~/Pictures/Wallpapers
@@ -400,5 +410,42 @@ exec_always --no-startup-id "killall picom; picom -f --backend xrender"
exec_always --no-startup-id bash -c 'pkill -ef "bash `which battery_nag.sh`" >~/Reports/battery_nag.log 2>&1; battery_nag.sh >>~/Reports/battery_nag.log 2>&1'
# Redshift
exec_always --no-startup-id redshift-gtk
exec_always --no-startup-id redshift -l 35.5:-111.5 -t 6500K:1800K
#exec_always --no-startup-id "killall redshift-gtk; redshift-gtk"
#exec_always --no-startup-id "killall redshift; redshift -l 35.19540:-111.65720 -t 6500K:1100K"
exec_always --no-startup-id "killall redshift; killall redshift-gtk; sleep 1; redshift -x; redshift-gtk -l 32:-111 -t 6500K:1100K"
# Allow locking the session.
#set $AGENT pkttyagent
set $AGENT lxqt-policykit-agent
exec_always --no-startup-id "killall $AGENT; $AGENT"
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
#exec_always --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 111111 -e -f --nofork
exec_always --no-startup-id xss-lock --transfer-sleep-lock -- sh -c 'i3lock -c 111111 -e -f --nofork & sleep 1; xset dpms force off; wait'
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Sunset Alarm
#exec_always --no-startup-id "killall sunset-alarm; /home/ling/Code/sunset_alarm_cli/sunset-alarm -t 20:00 -m 30 > ~/Reports/sunset-alarm.log 2>&1"
exec_always --no-startup-id "killall sunset-alarm; /home/ling/Code/sunset_alarm_cli/sunset-alarm -l 32:-111 -m 30 > ~/Reports/sunset-alarm.log 2>&1"
# Bedtime ;)
exec --no-startup-id "while true; do if [[ `date +'%H'` -ge 20 ]]; then fyi -w -u critical 'Bedtime' 'Go to sleep! >:)'; fi; sleep 150; done"
Binary file not shown.
File diff suppressed because it is too large. Load diff
+3
View File
@@ -7,6 +7,7 @@
"update.showReleaseNotes": false,
"workbench.startupEditor": "none",
"git.confirmSync": false,
"workbench.editor.openPositioning": "last",
"editor.rulers": [
80, 120, 200,
@@ -42,4 +43,6 @@
}
}
],
"redhat.telemetry.enabled": false,
}
+3
View File
@@ -3,3 +3,6 @@
# Allow anyone in the sudo group to shutdown or reboot without a password.
%sudo ALL=(ALL) NOPASSWD: /sbin/shutdown, /usr/sbin/shutdown, /sbin/reboot, /usr/sbin/reboot
# Allow the sudo group to manage runit services.
%sudo ALL=(ALL) NOPASSWD: /sbin/sv, /usr/sbin/sv, /sbin/sv, /usr/sbin/sv
+161 -215
View File
@@ -2,292 +2,238 @@
# Harmonize systems rather than doing everything manually. :)
# Setup of any device connected to this repo.
- name: Main | Default Setup
- name: Local | Main
hosts: localhost
connection: local
become: true
tasks:
####### Gather #######
# Load facts for all systems.
- include_tasks: facts/general/gather.yml
- include_tasks: tasks/general/acct_mgmt/provision_config.yml
- include_tasks: facts/general/system.yml
- include_tasks: facts/general/package.yml
- include_tasks: facts/general/service.yml
- include_tasks: facts/general/user.yml
####### Start #######
- name: Main | Start
block:
- name: Main | Start | Notify | Touch File
include_tasks: tasks/general/acct_mgmt/notify.yml
- name: Main | Start | Notify | Add Message
shell : echo "'Ansible' 'Provisioning started @ `date`'" >> "{{ notify_log_file }}"
when: workstation == true
####### NixOS #######
# Install the .nix files and do a little data setup.
- name: Main | NixOS Setup
block:
- include_tasks: tasks/general/software/nixos.yml
# TBD if we are going to use this many, then just have IF statements
# and use blocks within the General area for NixOS vs not-NixOS.
- include_tasks: tasks/general/software/swap.yml
- include_tasks: tasks/general/acct_mgmt/groups.yml
- include_tasks: tasks/general/acct_mgmt/users.yml
- include_tasks: tasks/general/acct_mgmt/sudo.yml
- include_tasks: tasks/general/acct_mgmt/doas.yml
- include_tasks: tasks/general/scripts/root.yml
- include_tasks: tasks/general/scripts/user.yml
- include_tasks: tasks/general/scripts/install.yml
- include_tasks: tasks/general/cron/ansible.yml
# psutil does not work in NixOS. Cannot figure out how to fix it. Maybe
# time to start looking into home-manager but still not wanting to
# maintain two different GNOME setups. HMMMM!
- include_tasks: tasks/workstation/shared/settings/gnome.yml
when: workstation == true
# Try including these. Really need to get NixOS working with the rest!
#- include_tasks: tasks/general/software/telegraf.yml # "Could not find a module for unknown.""
- include_tasks: tasks/general/tests/services.yml
- include_tasks: tasks/general/tests/lynis.yml
- include_tasks: tasks/general/tests/nmap.yml
- name: NixOS | Complete
meta: end_play
when: ansible_distribution == "NixOS"
####### General #######
# Basic setup for all enabled systems.
- name: Main | General Setup
block:
- include_tasks: tasks/general/software/swap.yml
- include_tasks: tasks/general/software/packages.yml
- include_tasks: tasks/general/software/services.yml
- include_tasks: tasks/general/software/sendmail.yml
when: ansible_system == "FreeBSD"
- include_tasks: tasks/general/software/aur.yml
when: ansible_pkg_mgr == "pacman"
# Gather again in case missing programs have now been installed.
- include_tasks: facts/general/gather.yml
- include_tasks: tasks/general/settings/keyboard.yml
- include_tasks: tasks/general/acct_mgmt/groups.yml
- include_tasks: tasks/general/acct_mgmt/users.yml
- include_tasks: tasks/general/acct_mgmt/sudo.yml
- include_tasks: tasks/general/acct_mgmt/doas.yml
- include_tasks: tasks/general/scripts/root.yml
- include_tasks: tasks/general/scripts/user.yml
- include_tasks: tasks/general/scripts/install.yml
- include_tasks: tasks/general/cron/ansible.yml
# TODO Need to refactor. Maybe tasks/general/cron/freebsd.yml
- include_tasks: tasks/workstation/freebsd/cron/ansible.yml
when: ansible_system == "FreeBSD"
- include_tasks: tasks/general/software/metasploit.yml
when: provision == true
####### Header #######
- name: Main | Header
ansible.builtin.include_tasks: tasks/header.yml
####### Workstations #######
# Additional setup for systems with GUI.
- name: Main | Workstation Setup
# Additional setup for systems with GUI.
- name: Main | Workstation
block:
- include_tasks: facts/workstation/package.yml
- ansible.builtin.include_tasks: facts/workstation/package.yml
## Desktop Environments ##
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
when: ansible_system == "FreeBSD" and bsd_gpu == true
## Desktop Environments ##
- ansible.builtin.include_tasks: tasks/workstation/freebsd/software/gpu.yml
when: ansible_system == "FreeBSD"
and bsd_gpu
and internet
# Window Managers without true Desktop Environments #
- include_tasks: tasks/workstation/shared/software/dwm.yml
- include_tasks: tasks/workstation/shared/software/i3.yml
# Window Managers without true Desktop Environments #
- ansible.builtin.include_tasks: tasks/workstation/shared/software/dwm.yml
when: internet
# Polished Desktop Environments #
- include_tasks: tasks/workstation/freebsd/software/gnome.yml
when: ansible_system == "FreeBSD"
- ansible.builtin.include_tasks: tasks/workstation/shared/software/i3.yml
when: internet
- name: Main | Workstation | Fancy Desktop Environments
block:
- include_tasks: tasks/workstation/linux/software/gnome.yml
when: ansible_service_mgr == "systemd"
- include_tasks: tasks/workstation/linux/software/cinnamon.yml
- include_tasks: tasks/workstation/linux/software/lxqt.yml
when: ansible_system == "Linux"
# TBD: Implement this: and extra_desktops == true
# Polished Desktop Environments #
- ansible.builtin.include_tasks: tasks/workstation/freebsd/software/gnome.yml
when: ansible_system == "FreeBSD"
and internet
## Software Tasks ##
- block:
- include_tasks: tasks/workstation/linux/software/packages.yml
- include_tasks: tasks/workstation/linux/software/tlp.yml
- include_tasks: tasks/workstation/linux/software/lutris.yml
- include_tasks: tasks/workstation/linux/software/vscodium.yml
- include_tasks: tasks/workstation/linux/software/vpn.yml
- include_tasks: tasks/workstation/linux/software/nodejs.yml
- include_tasks: tasks/workstation/linux/software/hugo.yml
- include_tasks: tasks/workstation/linux/software/brave.yml
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
when: ansible_system == "Linux"
- name: Main | Workstation | Fancy Desktop Environments
block:
- include_tasks: tasks/workstation/freebsd/software/packages.yml
when: ansible_system == "FreeBSD"
- ansible.builtin.include_tasks: tasks/workstation/linux/software/gnome.yml
when: ansible_service_mgr == "systemd"
- include_tasks: tasks/workstation/mac-os/software/brew.yml
when: ansible_system == "Darwin"
- ansible.builtin.include_tasks: tasks/workstation/linux/software/cinnamon.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/lxqt.yml
## Configuration Tasks ##
- block:
- include_tasks: tasks/workstation/shared/settings/gnome.yml
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
- include_tasks: tasks/workstation/shared/settings/xdg_autostart.yml
- include_tasks: tasks/workstation/linux/cron/ansible.yml
when: ansible_system == "Linux"
when: not mobile
and internet
# TBD: Implement this: and extra_desktops
- include_tasks: tasks/workstation/shared/settings/nfs.yml
## Software Tasks ##
- include_tasks: tasks/workstation/shared/settings/rdp.yml
when: rdp == true
- name: Main | Workstation | Linux
block:
- include_tasks: tasks/workstation/shared/settings/vnc.yml
when: vnc == true
- ansible.builtin.include_tasks: tasks/workstation/linux/software/packages.yml
- include_tasks: tasks/workstation/shared/settings/services.yml
- include_tasks: tasks/workstation/shared/settings/templates.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/tlp.yml
## Final Tasks (SLOW) ##
- block:
- include_tasks: tasks/workstation/linux/software/flatpaks.yml
when: flatpak_distro
- include_tasks: tasks/workstation/linux/software/java.yml
- include_tasks: tasks/workstation/linux/software/flutter.yml
- include_tasks: tasks/workstation/linux/software/android.yml
when: ansible_system == "Linux"
- ansible.builtin.include_tasks: tasks/workstation/linux/software/lutris.yml
when: workstation == true
- ansible.builtin.include_tasks: tasks/workstation/linux/software/vscodium.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/vpn.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/nodejs.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/hugo.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/brave.yml
when: ansible_pkg_mgr in ("apt", "dnf", "zypper") and not mobile
when: ansible_system == "Linux"
and internet
- ansible.builtin.include_tasks: tasks/workstation/freebsd/software/packages.yml
when: ansible_system == "FreeBSD"
and internet
- ansible.builtin.include_tasks: tasks/workstation/mac-os/software/brew.yml
when: ansible_system == "Darwin"
and internet
## Configuration Tasks ##
- name: Main | Workstation | Configuration
block:
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/gnome.yml
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/cinnamon.yml
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/xdg_autostart.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/cron/ansible.yml
when: ansible_system == "Linux"
when: not mobile
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/nfs.yml
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/rdp.yml
when: rdp
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/vnc.yml
when: vnc
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/services.yml
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/templates.yml
## Final Tasks (SLOW) ##
- name: Main | Workstation | Linux [Slow]
block:
- ansible.builtin.include_tasks: tasks/workstation/linux/software/flatpaks.yml
when: flatpak_distro
- ansible.builtin.include_tasks: tasks/workstation/linux/software/java.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/flutter.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/android.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/docker.yml
- ansible.builtin.include_tasks: tasks/workstation/linux/software/ai/llm.yml
when: ansible_system == "Linux"
and internet
when: workstation
# No longer mining, this is now considered deprecated.
# ####### Miners #######
#
# # Additional setup for miners.
# - name: Main | Miner Setup
# - name: Main | Miner
# block:
#
# ##### Setup #####
# - include_tasks: tasks/miner/debug.yml
# - ansible.builtin.include_tasks: tasks/miner/debug.yml
#
# - include_tasks: tasks/miner/acct_mgmt/users.yml
# - ansible.builtin.include_tasks: tasks/miner/acct_mgmt/users.yml
#
# - include_tasks: facts/miner/system.yml
# - include_tasks: facts/miner/config.yml
# - include_tasks: facts/miner/pool.yml
# - ansible.builtin.include_tasks: facts/miner/system.yml
# - ansible.builtin.include_tasks: facts/miner/config.yml
# - ansible.builtin.include_tasks: facts/miner/pool.yml
#
# ##### Installations #####
# ### CPU SECTION ###
# # Monero #
# - include_tasks: tasks/miner/software/xmr-stak-cpu.yml
# - ansible.builtin.include_tasks: tasks/miner/software/xmr-stak-cpu.yml
# when: xmr_stak_cpu is defined
#
# ### GPU Section ###
# ## Drivers ##
# - include_tasks: tasks/miner/drivers/amdgpu.yml
# when: ansible_distribution == "Ubuntu" and amdgpu == true
# - ansible.builtin.include_tasks: tasks/miner/drivers/amdgpu.yml
# when: ansible_distribution == "Ubuntu" and amdgpu
#
# # Ethereum #
# - include_tasks: tasks/miner/software/ethminer.yml
# when: ethminer == true
# - ansible.builtin.include_tasks: tasks/miner/software/ethminer.yml
# when: ethminer
#
# - include_tasks: tasks/miner/software/nanominer.yml
# when: nanominer == true
# - ansible.builtin.include_tasks: tasks/miner/software/nanominer.yml
# when: nanominer
#
# ##### Scheduling #####
# - include_tasks: tasks/miner/cron/ansible.yml
# - include_tasks: tasks/miner/cron/mfn.yml
# - ansible.builtin.include_tasks: tasks/miner/cron/ansible.yml
# - ansible.builtin.include_tasks: tasks/miner/cron/mfn.yml
#
# when: miner == true
# when: miner
####### Servers #######
# Easy to deploy server configurations.
- name: Main | Server Setup
# Easy to deploy server configurations.
- name: Main | Server
block:
- include_tasks: tasks/server/software/services.yml
- name: Main | Server | Services
ansible.builtin.include_tasks: tasks/server/software/services.yml
- block:
- include_tasks: tasks/server/software/certbot.yml
- include_tasks: tasks/server/cron/certbot.yml
when: certbot == true
- block:
- block:
- include_tasks: tasks/server/software/onlyoffice.yml
when: onlyoffice == true
- include_tasks: tasks/server/software/influxdb1.yml
when: influxdb1 == true
- include_tasks: tasks/server/software/influxdb2.yml
when: influxdb2 == true
- include_tasks: tasks/server/software/grafana.yml
when: grafana == true
when: ansible_pkg_mgr == "apt"
- name: Main | Server | Certbot
ansible.builtin.include_tasks: tasks/server/software/certbot.yml
- include_tasks: tasks/server/software/hugo.yml
when: hugo == true
- name: Main | Server | Certbot Cron
ansible.builtin.include_tasks: tasks/server/cron/certbot.yml
when: certbot
when: server == true
- block:
- name: Main | Server | OnlyOffice
ansible.builtin.include_tasks: tasks/server/software/onlyoffice.yml
when: onlyoffice
- ansible.builtin.include_tasks: tasks/server/software/influxdb1.yml
when: influxdb1
- ansible.builtin.include_tasks: tasks/server/software/influxdb2.yml
when: influxdb2
- ansible.builtin.include_tasks: tasks/server/software/grafana.yml
when: grafana
when: ansible_pkg_mgr == "apt"
- ansible.builtin.include_tasks: tasks/server/software/hugo.yml
when: hugo
when: server
####### Reporting #######
# Provide information for analysis.
- name: Main | Reporting
block:
- include_tasks: tasks/general/software/telegraf.yml
- ansible.builtin.include_tasks: tasks/general/software/telegraf.yml
when: internet
- include_tasks: tasks/general/tests/services.yml
- include_tasks: tasks/general/tests/lynis.yml
- include_tasks: tasks/general/tests/nmap.yml
- ansible.builtin.include_tasks: tasks/general/tests/services.yml
- ansible.builtin.include_tasks: tasks/general/tests/lynis.yml
####### Finish #######
- name: Main | Finish
block:
- ansible.builtin.include_tasks: tasks/general/tests/nmap.yml
- name: Main | Finish | Notify | Touch File
include_tasks: tasks/general/acct_mgmt/notify.yml
####### Footer #######
- name: Main | Finish | Notify | Add Message
shell : echo "'Ansible' 'Provisioning finished @ `date`'" >> "{{ notify_log_file }}"
when: workstation == true
- name: Main | Footer
ansible.builtin.include_tasks: tasks/footer.yml
+39 -12
View File
@@ -5,7 +5,8 @@
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
PROG="$(basename -- "${BASH_SOURCE[0]}")"
LOCAL=$DIR/local.yml
LOCAL="$DIR/local.yml"
TEST="$DIR/test.yml"
URL="https://git.hyperling.com/me/env-ansible"
if [[ -z $BRANCH ]]; then
export BRANCH="main"
@@ -31,7 +32,7 @@ branch=""
function usage {
cat <<- EOF
$PROG [-l] [-b branch_name] [-g] [-w] [-s] [-f] [-h]
$PROG [-l | -t] [-b branch_name] [-g] [-w] [-s] [-f] [-h]
Program to initialize synchronization with Hyperling's Ansible configuration.
$URL
@@ -39,6 +40,7 @@ function usage {
-l : Run the local playbook associated with this $PROG.
This is helpful for development or just saving bandwidth.
It also provides prettier colors than the plaintext from ansible-pull. ;)
-t : Run the test playbook which has a much smaller set of includes.
-b branch_name : Download and run a specific branch. Default is $BRANCH.
-g : Enable the General config with test contents.
-w : Enable the Workstation config with test contents.
@@ -52,9 +54,10 @@ function usage {
## Parameter Parsing ##
while getopts ":lb:gwsfh" arg; do
while getopts ":ltb:gwsfh" arg; do
case $arg in
l) local="Y" && echo "Running $LOCAL as the playbook." ;;
t) test="Y" && echo "Running $TEST as the playbook." ;;
b) branch="$OPTARG" && echo "Using branch $branch instead of $BRANCH." ;;
g) create_general="Y" && echo "Generating test '$general_config'." ;;
w) create_workstation="Y" && echo "Generating test '$workstation_config'." ;;
@@ -78,6 +81,7 @@ if [[ "$branch" == "" ]]; then
else
echo "Set branch to '$branch'."
fi
echo " "
fi
if [[ -n "$create_general" && -f "$general_config" ]]; then
@@ -130,7 +134,7 @@ if [[ `which ansible > /dev/null; echo $?` != 0 ]]; then
exit 1
fi
fi
echo "- Installed!"
echo -e "- Installed!\n"
if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
echo "Ensuring hosts file exists..."
@@ -139,7 +143,7 @@ if [[ -n $HOSTS_DIR && -n $HOSTS_FILE ]]; then
sudo sh -c "echo 'localhost ansible_connection=local' > $HOSTS_FILE"
fi
echo "$HOSTS_FILE: '`cat $HOSTS_FILE`'"
echo "- Hosts file created successfully!"
echo -e "- Hosts file created successfully!\n"
fi
if [[ "$show_facts" == "Y" ]]; then
@@ -153,7 +157,6 @@ fi
#echo "- Added!"
# Create basic layouts if configs do not exist and are requested.
if [[ -n "$create_general"
|| -n "$create_workstation"
|| -n "$create_server" ]]
@@ -161,6 +164,7 @@ then
sudo mkdir -pv "$config_dir"
MARK1="BEGIN"
MARK2="END"
echo "Creating placeholder config files..."
fi
if [[ -n "$create_general" && ! -f "$general_config" ]]; then
function print_general_contents {
@@ -207,29 +211,52 @@ if [[ -n "$create_server" && ! -f "$server_config" ]]; then
print_server_contents | sudo tee "$server_config"
ls -lh "$server_config"
fi
if [[ -n "$create_general"
|| -n "$create_workstation"
|| -n "$create_server" ]]
then
echo " "
fi
echo "Verifying this is the only run..."
ps -ef | grep ansible-playbook | grep -v grep
ansible_exists="$?"
lock_file=/tmp/ansible-playbook.lock
if [[ "$ansible_exists" == 0 ]]; then
echo "Playbook is already being executed. Exiting."
echo "- Playbook is already being executed. Exiting."
exit 0
elif [[ -e "$lock_file" ]]; then
echo "- Removing lock file."
sudo mv -v "$lock_file" "${lock_file}.disabled"
else
echo "- No processes or lockfile found."
fi
echo "- Verified!"
echo " "
echo "Provisioning Ansible..."
if [[ $local == "Y" ]]; then
status=""
if [[ "$test" == "Y" ]]; then
sudo ansible-playbook $TEST
status=$?
elif [[ "$local" == "Y" ]]; then
sudo ansible-playbook $LOCAL
status=$?
else
sudo ansible-pull -U $URL.git --checkout $branch
status=$?
fi
if [[ "$status" == 0 ]]; then
echo -e "- Provisioned!\n"
else
echo -e "\nERROR: Playbook failed with status $status, exiting."
exit $status
fi
echo "- Provisioned!"
echo "Mounting all drives..."
mount -a
echo "- Mounted!"
echo -e "- Mounted!\n"
echo "Don't forget to set any new users' passwords!"
echo -e "Don't forget to set any new users' passwords!\n"
## Finish ##
+14
View File
@@ -0,0 +1,14 @@
---
# All the tasks which need run to successfully end the playbook.
####### Footer #######
- name: Footer
block:
- name: Footer | Notify
ansible.builtin.include_tasks: tasks/general/acct_mgmt/notify.yml
vars:
notify_message: "Provisioning Finished"
- name: Footer | Lock | Remove
ansible.builtin.include_tasks: tasks/general/tests/lock_remove.yml
+16 -13
View File
@@ -2,7 +2,7 @@
# Install and configure doas.
- name: General | Software | DoAs | Facts
set_fact:
ansible.builtin.set_fact:
doas_config: |
permit persist :wheel as root
permit persist :admin as root
@@ -11,44 +11,47 @@
doas_conf_file_bsd: /usr/local/etc/doas.conf
- name: General | Software | DoAs | Install
package:
ansible.builtin.package:
name:
- doas
register: doas_install
ignore_errors: yes
ignore_errors: true
- name: General | Software | DoAs | Configure [Linux]
blockinfile:
ansible.builtin.blockinfile:
path: "{{ doas_conf_file_linux }}"
block: |
{{ doas_config }}
marker: '# {mark} MANAGED BY ANSIBLE | doas Linux'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "644"
when: not doas_install.failed and ansible_system in ("Linux")
- name: General | Software | DoAs | Configure [BSD]
blockinfile:
ansible.builtin.blockinfile:
path: "{{ doas_conf_file_linux }}"
block: |
{{ doas_config }}
marker: '# {mark} MANAGED BY ANSIBLE | doas BSD'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "644"
when: not doas_install.failed and ansible_system in ("FreeBSD")
- name: General | Software | DoAs | Configure [Other]
blockinfile:
ansible.builtin.blockinfile:
path: "{{ item }}"
block: |
{{ doas_config }}
marker: '# {mark} MANAGED BY ANSIBLE | doas Other'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "644"
loop:
- "{{ doas_conf_file_linux }}"
- "{{ doas_conf_file_bsd }}"
when: not doas_install.failed and ansible_system not in ("Linux", "FreeBSD")
when: not doas_install.failed and ansible_system not in ("Linux", "FreeBSD")
+2 -2
View File
@@ -1,10 +1,10 @@
---
# Groups that do not come to all distros by default.
- name: General | Account Management | System Groups
- name: General | Account Management | System Groups
group:
name: "{{ item }}"
system: yes
system: true
state: present
loop:
- sudo
+8 -1
View File
@@ -2,7 +2,14 @@
# Create and manage permissions for notify log.
- name: General | Notify | Update File
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- touch "{{ notify_log_file }}"
- chmod 777 "{{ notify_log_file }}"
register: shell_check
changed_when: shell_check.rc == 0
- name: General | Notify | Add Message
ansible.builtin.shell : echo "'Ansible' '{{ notify_message }} @ `date`'" >> "{{ notify_log_file }}"
register: shell_check
changed_when: shell_check.rc == 0
+319 -59
View File
@@ -2,19 +2,19 @@
# Set up directory and files for specifying software needs rather than using hosts file.
- name: General | Account Management | Provisioning Configuration | Variables 1
set_fact:
ansible.builtin.set_fact:
prov_dir: "/usr/local/etc/hyperling-scm"
provision_variables: []
- name: General | Account Management | Provisioning Configuration | Variables 2
set_fact:
ansible.builtin.set_fact:
gen_file: "{{ prov_dir }}/general.ini"
wrk_file: "{{ prov_dir }}/workstation.ini"
mnr_file: "{{ prov_dir }}/miner.ini"
srv_file: "{{ prov_dir }}/server.ini"
- name: General | Account Management | Provisioning Configuration | Create Directory
file:
ansible.builtin.file:
path: "{{ prov_dir }}"
state: directory
mode: '0755'
@@ -23,11 +23,11 @@
## General ##
- name: General | Account Management | Provisioning Configuration | General | Create
blockinfile:
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
block: |
; Please note that all portions require lowercase keys and values.
;
[global]
;;;;;;;;;;;;;;;;;;;; Basic Options ;;;;;;;;;;;;;;;;;;;;
;
; enable : Provide true for the provision to occur.
@@ -49,6 +49,17 @@
; nmap is already provided for reporting
; Default: false
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Git Polling
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Git Polling'
block: |
;;;;;;;;;;;;;;;;;;;; Git Polling ;;;;;;;;;;;;;;;;;;;;
;
; For syncing this machine to a Git repository of this Ansible project
@@ -74,6 +85,17 @@
; Example: Ansible, ansible-setup, my-env
; Default: env-ansible
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Swap File
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Swap File'
block: |
;;;;;;;;;;;;;;;;;;;; Swap File ;;;;;;;;;;;;;;;;;;;;
;
; swap_block : Set to the block size if dd should create a swapfile.
@@ -90,6 +112,17 @@
; Example: /usr/local/swap
; Default: /swapfile
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Sync Frequency
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Sync Frequency'
block: |
;;;;;;;;;;;;;;;;;;;; Sync Frequency ;;;;;;;;;;;;;;;;;;;;
;
; no_telem : Set to true to avoid setting up telemetry services.
@@ -101,6 +134,17 @@
; Slows down the rate of services such as telegraf and cron.
; Default: false
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Server Shortcuts
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Server Shortcuts'
block: |
;;;;;;;;;;;;;;;;;;;; Server Shortcuts ;;;;;;;;;;;;;;;;;;;;
;
; For typing `prod` and getting straight to a server, like in env-termux.
@@ -120,7 +164,18 @@
; Example: jim, bob, jeff, anne
; Default: user
;
; For pushing MASTER directories to an SFTP server with `send-master`.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Sync Shortcuts
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Sync Shortcuts'
block: |
;;;;;;;;;;;;;;;;;;;;; Sync Shortcuts ;;;;;;;;;;;;;;;;;;;;;
;
; Imagine the command:
; `rsync -auPhz --delete -e 'ssh -p prod_data_port' ./mydata-MASTER/ \
@@ -143,44 +198,86 @@
; Example: /srv/sftp/
; Default: /srv/sftp/
;
[global]
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Tunnel
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Tunnel'
block: |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Tunnel ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Create a runit script which maintains an SSH tunnel to a remote server.
;
; ssh -v -H -R tunnel_remote_port:localhost:tunnel_local_port \
; [-p tunnel_ssh_port] tunnel_remote_host
;
; tunnel_local_port (default=8080)
; Local HTTP port which need forwarded to a remote server.
; Example: http://localhost:8080
;
; tunnel_remote_host (default=false)
; Remote server including username (such as user@example.com) which will
; serve the port. Server should preferably have a reverse proxy in order
; to encrypt the traffic, otherwise the local server should use HTTPS.
;
; tunnel_remote_port (default=8080)
; Port which should host the service on the remote server. This is what
; will get typed into web browsers or used by the reverse proxy. Should
; be > 1024. Also, /etc/ssh/sshd_config will need AllowTcpForwarding and
; GatewayPorts set to yes, then sshd will need to be reloaded.
; Example: http://example.com:8080
;
; tunnel_ssh_port (default=22)
; Port which the remote server exposes ssh.
; Example: ssh -p 2222 user@example.com
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Load
set_fact:
ansible.builtin.set_fact:
provision: "{{ lookup('ini', 'enable file={{gen_file}} default=false') | bool }}"
user: "{{ lookup('ini', 'user file={{gen_file}} default=ling') }}"
user_desc: "{{ lookup('ini', 'user_desc file={{gen_file}} default=Hyperling') }}"
branch: "{{ lookup('ini', 'branch file={{gen_file}} default=main') }}"
user: "{{ lookup('ini', 'user file={{gen_file}} default=user' ) }}"
user_desc: "{{ lookup('ini', 'user_desc file={{gen_file}} default=User' ) }}"
branch: "{{ lookup('ini', 'branch file={{gen_file}} default=main' ) }}"
pentesting: "{{ lookup('ini', 'pentesting file={{gen_file}} default=false') | bool }}"
no_telem: "{{ lookup('ini', 'no_telem file={{gen_file}} default=false') | bool }}"
battery: "{{ lookup('ini', 'battery file={{gen_file}} default=false') | bool }}"
swap_block: "{{ lookup('ini', 'swap_block file={{gen_file}} default=false') }}"
swap_count: "{{ lookup('ini', 'swap_count file={{gen_file}} default=1') }}"
swap_file: "{{ lookup('ini', 'swap_file file={{gen_file}} default=/swapfile') }}"
sshd_port: "{{ lookup('ini', 'sshd_port file={{gen_file}} default=22') }}"
swap_block: "{{ lookup('ini', 'swap_block file={{gen_file}} default=false') }}"
swap_count: "{{ lookup('ini', 'swap_count file={{gen_file}} default=1' ) | int }}"
swap_file: "{{ lookup('ini', 'swap_file file={{gen_file}} default=/swapfile') }}"
sshd_port: "{{ lookup('ini', 'sshd_port file={{gen_file}} default=22' ) | int }}"
git_host: "{{ lookup('ini', 'git_host file={{gen_file}} default=git.hyperling.com') }}"
git_user: "{{ lookup('ini', 'git_user file={{gen_file}} default=me') }}"
git_project: "{{ lookup('ini', 'git_project file={{gen_file}} default=env-ansible') }}"
git_ssh_port: "{{ lookup('ini', 'git_ssh_port file={{gen_file}} default=22') }}"
git_ssh_port: "{{ lookup('ini', 'git_ssh_port file={{gen_file}} default=22') | int }}"
prod_host: "{{ lookup('ini', 'prod_host file={{gen_file}} default=hyperling.com') }}"
prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') }}"
prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') | int }}"
prod_user: "{{ lookup('ini', 'prod_user file={{gen_file}} default=user') }}"
prod_data_host: "{{ lookup('ini', 'prod_data_host file={{gen_file}} default=hyperling.com') }}"
prod_data_port: "{{ lookup('ini', 'prod_data_port file={{gen_file}} default=22') }}"
prod_data_port: "{{ lookup('ini', 'prod_data_port file={{gen_file}} default=22') | int }}"
prod_data_user: "{{ lookup('ini', 'prod_data_user file={{gen_file}} default=user') }}"
prod_data_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}"
prod_data_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}"
tunnel_local_port: "{{ lookup('ini', 'tunnel_local_port file={{gen_file}} default=8080' ) | int }}"
tunnel_remote_host: "{{ lookup('ini', 'tunnel_remote_host file={{gen_file}} default=false') }}"
tunnel_remote_port: "{{ lookup('ini', 'tunnel_remote_port file={{gen_file}} default=8080' ) | int }}"
tunnel_ssh_port: "{{ lookup('ini', 'tunnel_ssh_port file={{gen_file}} default=22' ) | int }}"
- name: General | Account Management | Provisioning Configuration | General | Boolean Check | Swap Block
set_fact:
- name: General | Account Management | Provisioning Configuration | General | Boolean Check | swap_block
ansible.builtin.set_fact:
swap_block: "{{ swap_block | bool }}"
when: swap_block in ("true", "false")
when: swap_block in ("false")
- name: General | Account Management | Provisioning Configuration | General | List
set_fact:
ansible.builtin.set_fact:
provision_variables: "{{ provision_variables | combine(item) }}"
loop:
- { 'provision': "{{ provision }}" }
@@ -205,15 +302,21 @@
- { 'prod_data_port': "{{ prod_data_port }}" }
- { 'prod_data_user': "{{ prod_data_user }}" }
- { 'prod_data_dir': "{{ prod_data_dir }}" }
- { 'tunnel_local_port': "{{ tunnel_local_port }}" }
- { 'tunnel_remote_host': "{{ tunnel_remote_host }}" }
- { 'tunnel_remote_port': "{{ tunnel_remote_port }}" }
- { 'tunnel_ssh_port': "{{ tunnel_ssh_port }}" }
## Workstation ##
- name: General | Account Management | Provisioning Configuration | Workstation | Create
blockinfile:
- name: General | Account Management | Provisioning Configuration | Workstation | Create | Main Options
ansible.builtin.blockinfile:
path: "{{ wrk_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config'
block: |
;;;;;;; Available options - all require lowercase values ;;;;;;
[global]
;;;;;;;;;;;;;;;;;;;;;;;;;; Main Options ;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; enable : Set to true for system to be considered a workstation.
;
@@ -228,6 +331,114 @@
;
; gaming : Set to true for installation of gaming software (Steam, Lutris)
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | Workstation | Create | LLMs
ansible.builtin.blockinfile:
path: "{{ wrk_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config | LLMs'
block: |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LLMs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; ollama (default=true)
; Install and enable the ollama LLM manager.
; API: http://127.0.0.1:11434
;
; manage_models (default=true)
; Automatically choose and pull the models to use based on system
; resources. Otherwise leaves images alone but still handles config.
;
; hf_token (default=false)
; Token from Hugging Face which allows faster download speeds than anon.
; May help with ollama and also supposed to help with open-webui. Token
; needs set to something like hf_kjBCCLABEEABUVAKbjadbvkaksvBAVKBkjsDVK.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | Workstation | Create | LLMs | GUIs
ansible.builtin.blockinfile:
path: "{{ wrk_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config | LLMs | GUIs'
block: |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LLMs: GUIs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; zeroclaw (default=true)
; Install and enable the Zeroclaw web daemon, a minimalistic interface
; for many models and providers with negligible resource usage. Also
; installs the CLI tool zerocode as an alternative to the web GUI.
; URL: http://127.0.0.1:42617
;
; open_webui (default=false)
; Install and enable open-webui as a Docker container. Very polished web
; frontend for ollama and also handles other web LLMs through API calls.
; Container is over 1GB in size and consumes substantial resources!
; URL: http://localhost:3000
;
; open_webui_port (default=3000)
; Port on which to run the open-webui Docker instance.
;
; open_webui_key (default=PleaseEnsureTheKeyIsAtLeast32To64Characters)
; Secret key, allows persistence between runs. If not a public-facing
; system, then not critical. Use `openssl rand -hex 32` to create one.
;
; codium_config (default=true)
; Manage the config files for and Codium plugins. Cline and Continue are
; the recommended Codium extensions but need installed through the GUI.
; Currently handles:
; ~/.continue/config.yml
;
; qwen_code (default=true)
; Install and enable qwen-code as a daemon.
; URL: http://127.0.0.1:4170
;
; qwen_code_key (default='')
; API key for accessing the web GUI. Optional, not used if left blank.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | Workstation | Create | LLMs | MCPs
ansible.builtin.blockinfile:
path: "{{ wrk_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config | LLMs | MCPs'
block: |
;;;;;;;;;;;;;;;;;;;;;;;;; LLMs: MCPs / Sandboxes ;;;;;;;;;;;;;;;;;;;;;;;;;
;
; open_terminal (default=false)
; Docker container to be used with GUIs like open-webui so that agents
; have somewhere safe to execute commands. Also allows file read/writes.
; URL: http://127.0.0.1:8000
;
; open_terminal_port (default=8000)
; Port on which to run the open-terminal Docker instance.
;
; open_terminal_key (default=open-terminal-key)
; API key, needed in order to access the server. Required.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | Workstation | Create | Other Options
ansible.builtin.blockinfile:
path: "{{ wrk_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config | Other Options'
block: |
;;;;;;;;;;;;;;;;;;;;;;;;;; Other Options ;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; rdp : Set to true for installation of RDP protocol
; CURRENTLY FREEBSD-ONLY
;
@@ -243,32 +454,60 @@
; redmode : Set to true/false for automatially using Night Light in GNOME.
; Default: true
;
[global]
marker: '; {mark} MANAGED BY ANSIBLE | Workstation Config'
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | Workstation | Load
set_fact:
ansible.builtin.set_fact:
# Main
workstation: "{{ lookup('ini', 'enable file={{wrk_file}} default=false') | bool }}"
coding: "{{ lookup('ini', 'coding file={{wrk_file}} default=false') | bool }}"
sdks: "{{ lookup('ini', 'sdks file={{wrk_file}} default=false') | bool }}"
editing: "{{ lookup('ini', 'editing file={{wrk_file}} default=false') }}"
gaming: "{{ lookup('ini', 'gaming file={{wrk_file}} default=false') | bool }}"
rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') | bool }}"
vnc: "{{ lookup('ini', 'vnc file={{wrk_file}} default=false') | bool }}"
bsd_gpu: "{{ lookup('ini', 'bsd_gpu file={{wrk_file}} default=false') | bool }}"
mobile: "{{ lookup('ini', 'mobile file={{wrk_file}} default=false') | bool }}"
redmode: "{{ lookup('ini', 'redmode file={{wrk_file}} default=true' ) | bool }}"
# Other
rdp: "{{ lookup('ini', 'rdp file={{wrk_file}} default=false') | bool }}"
vnc: "{{ lookup('ini', 'vnc file={{wrk_file}} default=false') | bool }}"
bsd_gpu: "{{ lookup('ini', 'bsd_gpu file={{wrk_file}} default=false') | bool }}"
mobile: "{{ lookup('ini', 'mobile file={{wrk_file}} default=false') | bool }}"
redmode: "{{ lookup('ini', 'redmode file={{wrk_file}} default=true' ) | bool }}"
# LLMs
ollama_enabled: "{{ lookup('ini', 'ollama file={{wrk_file}} default=true' ) | bool }}"
manage_models: "{{ lookup('ini', 'manage_models file={{wrk_file}} default=true' ) | bool }}"
hf_token: "{{ lookup('ini', 'hf_token file={{wrk_file}} default=false') }}"
# LLM GUIs
zeroclaw_enabled: "{{ lookup('ini', 'zeroclaw file={{wrk_file}} default=true ') | bool }}"
open_webui_enabled: "{{ lookup('ini', 'open_webui file={{wrk_file}} default=false') | bool }}"
open_webui_port: "{{ lookup('ini', 'open_webui_port file={{wrk_file}} default=3000' ) | int }}"
open_webui_key: "{{ lookup('ini', 'open_webui_key file={{wrk_file}} default=PleaseEnsureTheKeyIsAtLeast32To64Characters') }}"
codium_config: "{{ lookup('ini', 'codium_config file={{wrk_file}} default=true' ) | bool }}"
qwen_code_enabled: "{{ lookup('ini', 'qwen_code file={{wrk_file}} default=true' ) | bool }}"
qwen_code_key : "{{ lookup('ini', 'qwen_code_key file={{wrk_file}} default=false') }}"
# LLM MCPs
open_terminal_enabled: "{{ lookup('ini', 'open_terminal file={{wrk_file}} default=false') | bool }}"
open_terminal_port: "{{ lookup('ini', 'open_terminal_port file={{wrk_file}} default=8000' ) | int }}"
open_terminal_key: "{{ lookup('ini', 'open_terminal_key file={{wrk_file}} default=false') }}"
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | Editing
set_fact:
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | editing
ansible.builtin.set_fact:
editing: "{{ editing | bool }}"
when: editing in ("true", "false")
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | qwen_code_key
ansible.builtin.set_fact:
qwen_code_key: "{{ qwen_code_key | bool }}"
when: qwen_code_key in ("false")
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | open_terminal_key
ansible.builtin.set_fact:
open_terminal_key: "{{ open_terminal_key | bool }}"
when: open_terminal_key in ("false")
- name: General | Account Management | Provisioning Configuration | Workstation | List
set_fact:
ansible.builtin.set_fact:
provision_variables: "{{ provision_variables | combine(item) }}"
loop:
- { 'workstation': "{{ workstation }}" }
@@ -281,14 +520,28 @@
- { 'bsd_gpu': "{{ bsd_gpu }}" }
- { 'mobile': "{{ mobile }}" }
- { 'redmode': "{{ redmode }}" }
- { 'ollama_enabled': "{{ ollama_enabled }}" }
- { 'manage_models': "{{ manage_models }}" }
- { 'hf_token': "{{ hf_token }}" }
- { 'zeroclaw_enabled': "{{ zeroclaw_enabled }}" }
- { 'open_webui_enabled': "{{ open_webui_enabled }}" }
- { 'open_webui_port': "{{ open_webui_port }}" }
- { 'open_webui_key': "{{ open_webui_key }}" }
- { 'codium_config': "{{ codium_config }}" }
- { 'qwen_code_enabled': "{{ qwen_code_enabled }}" }
- { 'qwen_code_key': "{{ qwen_code_key }}" }
- { 'open_terminal_enabled': "{{ open_terminal_enabled }}" }
- { 'open_terminal_port': "{{ open_terminal_port }}" }
- { 'open_terminal_key': "{{ open_terminal_key }}" }
# No longer mining, this is now considered deprecated.
### Miner ##
#
#- name: General | Account Management | Provisioning Configuration | Miner | Create
# blockinfile:
# ansible.builtin.blockinfile:
# path: "{{ mnr_file }}"
# block: |
# [global]
# ;;;;;;; Available options - all require lowercase values ;;;;;;
# ;
# ; enable : Set to true for system to be considered a miner.
@@ -324,14 +577,15 @@
# ; xmr_stak_cpu : Set to true for istallation
# ; UNFINISHED/UNTESTED
# ;
# [global]
# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
# marker: '; {mark} MANAGED BY ANSIBLE | Miner Config'
# state: present
# create: yes
# backup: yes
# create: true
# backup: true
# mode: "0644"
#
#- name: General | Account Management | Provisioning Configuration | Miner | Load
# set_fact:
# ansible.builtin.set_fact:
# miner: "{{ lookup('ini', 'enable file={{mnr_file}} default=false') | bool }}"
# amdgpu: "{{ lookup('ini', 'amdgpu file={{mnr_file}} default=false') | bool }}"
# nanominer: "{{ lookup('ini', 'nanominer file={{mnr_file}} default=false') | bool }}"
@@ -346,7 +600,7 @@
# xmr_stak_cpu: "{{ lookup('ini', 'xmr_stak_cpu file={{mnr_file}} default=false') | bool }}"
#
#- name: General | Account Management | Provisioning Configuration | Miner | List
# set_fact:
# ansible.builtin.set_fact:
# provision_variables: "{{ provision_variables | combine(item) }}"
# loop:
# - { 'miner': "{{ miner }}" }
@@ -366,9 +620,11 @@
## Server ##
- name: General | Account Management | Provisioning Configuration | Server | Create
blockinfile:
ansible.builtin.blockinfile:
path: "{{ srv_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Server Config'
block: |
[global]
;;;;;;; Parameters ;;;;;;
;
; enable : Set to true for system to be considered a server.
@@ -393,14 +649,13 @@
; hugo : Set to true to install HUGO static website generator.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[global]
marker: '; {mark} MANAGED BY ANSIBLE | Server Config'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | Server | Load
set_fact:
ansible.builtin.set_fact:
server: "{{ lookup('ini', 'enable file={{srv_file}} default=false') | bool }}"
domain: "{{ lookup('ini', 'domain file={{srv_file}} default=hyperling.com') }}"
onlyoffice: "{{ lookup('ini', 'onlyoffice file={{srv_file}} default=false') | bool }}"
@@ -411,7 +666,7 @@
hugo: "{{ lookup('ini', 'hugo file={{srv_file}} default=false') | bool }}"
- name: General | Account Management | Provisioning Configuration | Server | List
set_fact:
ansible.builtin.set_fact:
provision_variables: "{{ provision_variables | combine(item) }}"
loop:
- { 'server': "{{ server }}" }
@@ -427,12 +682,17 @@
## Exit if not turned on yet ##
- name: General | Account Management | Provisioning Configuration | Exit Check
shell: echo "Please configure the config files in {{ prov_dir }} then try again." && exit 1
when: provision != true
block:
- name: General | Account Management | Provisioning Configuration | Exit Check | Message
ansible.builtin.debug:
msg: "Please configure the config files in {{ prov_dir }} then try again."
- name: General | Account Management | Provisioning Configuration | Exit Check | Exit
ansible.builtin.meta: end_play
when: not provision
## Display values ##
- name: General | Account Management | Provisioning Configuration | Print
debug:
ansible.builtin.debug:
var: provision_variables
+8 -7
View File
@@ -2,32 +2,33 @@
# Ensure the proper users have sudo access.
- name: General | Account Management | Sudo | Copy Ansible
copy:
ansible.builtin.copy:
src: sudo/sudoers_ansible
dest: "{{ sudoers_install_dir }}"
owner: root
group: "{{ root_group }}"
mode: 0440
mode: "0440"
- name: General | Account Management | Sudo | Copy Sudo Group
copy:
ansible.builtin.copy:
src: sudo/sudoers_sudo
dest: "{{ sudoers_install_dir }}"
owner: root
group: "{{ root_group }}"
mode: 0440
mode: "0440"
# Disable these two lines in openSUSE default configuration.
#Defaults targetpw # ask for the password of the target user i.e. root
#ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
- name: General | Account Management | Sudo | Disable openSUSE Root PW Prompt
lineinfile:
ansible.builtin.lineinfile:
path: "{{ sudoers_config }}"
regexp: '{{ item.key }}'
line: '{{ item.value }} # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "644"
loop:
- { "key": '^[\#]?Defaults targetpw', "value": '#Defaults targetpw'}
- { "key": '^[\#]?ALL ALL\=\(ALL\) ALL', "value": '#ALL ALL=(ALL) ALL'}
+107 -113
View File
@@ -4,33 +4,33 @@
## Variables ##
- name: General | Account Management | Users | Use BASH (Default)
set_fact:
ansible.builtin.set_fact:
user_shell: "{{ bash_exec.stdout }}"
- name: General | Account Management | Users | Allow BASH (Arch)
lineinfile:
ansible.builtin.lineinfile:
path: /etc/shells
regexp: "{{ bash_exec.stdout }}"
line: "{{ bash_exec.stdout }}"
insertbefore: "# End of file"
backup: yes
create: no
backup: true
create: false
state: present
when: ansible_pkg_mgr == "pacman"
#- name: General | Account Management | Users | Use ZSH (Arch+Manjaro)
# set_fact:
# ansible.builtin.set_fact:
# user_shell: "{{ zsh_exec.stdout }}"
# when: ansible_pkg_mgr == "pacman"
#
#- name: General | Account Management | Users | Allow ZSH (Arch)
# lineinfile:
# ansible.builtin.lineinfile:
# path: /etc/shells
# regexp: "{{ zsh_exec.stdout }}"
# line: "{{ zsh_exec.stdout }}"
# insertbefore: "# End of file"
# backup: yes
# create: no
# backup: true
# create: false
# state: present
# when: ansible_pkg_mgr == "pacman"
@@ -38,28 +38,28 @@
## Root ##
- name: General | Account Management | Users | Root
user:
ansible.builtin.user:
name: root
shell: "{{ bash_exec.stdout }}"
create_home: yes
generate_ssh_key: yes
create_home: true
generate_ssh_key: true
register: user_root
## Scheduler ##
- name: General | Account Management | Users | Ansible
user:
ansible.builtin.user:
name: ansible
comment: Ansible
system: yes
system: true
register: user_ansible
## Superuser ##
- name: General | Account Management | Users | User
user:
ansible.builtin.user:
name: "{{ user }}"
comment: "{{ user_desc }}"
groups:
@@ -67,23 +67,26 @@
- video
- render
- wheel
append: yes
append: true
shell: "{{ user_shell }}"
create_home: yes
generate_ssh_key: yes
create_home: true
generate_ssh_key: true
register: user_user
- name: General | Account Management | Users | User | Test Logging In
shell: "echo SUCCESS"
ansible.builtin.shell: "echo SUCCESS"
args:
executable: "{{ user_shell }}"
become: true
become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
## Folders ##
- name: General | Account Management | Users | Root | Create Folders
file:
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
@@ -94,7 +97,7 @@
when: user_root.home != ""
- name: General | Account Management | Users | User | Create Folders
file:
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
@@ -105,27 +108,36 @@
- "{{ user_user.home }}/Reports"
- "{{ user_user.home }}/Torrentz"
- "{{ user_user.home }}/Seedz"
become: true
become_user: "{{ user }}"
when: user_user.home != ""
- name: General | Account Management | Users | User | Create Folders | Coding
file:
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ user_user.home }}/Code"
become: true
become_user: "{{ user }}"
when: user_user.home != "" and coding == true
when: user_user.home != "" and coding
- name: General | Account Management | Users | Home Permissions
shell: "chmod 700 {{ user_user.home }}/../*"
ansible.builtin.shell: "{{ item }}"
register: shell_check
changed_when: shell_check.rc == 0
loop:
- "chmod 700 {{ user_user.home }}/../*"
- "chown {{ user }}:{{ user }} {{ user_user.home }}"
- "chown {{ user }}:{{ user }} {{ user_user.home }}/*"
- "chown {{ user }}:{{ user }} {{ user_user.home }}/.*"
## Files ##
- name: General | Account Management | Users | Files | Profile Variables
set_fact:
ansible.builtin.set_fact:
export_path_additions: export PATH="$HOME/bin:{{ shared_rc_bin }}:$PATH:{{ global_bin }}"
export_path_sbin: export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
#export_terminal: export TERMINAL="alacritty" # colors look weird.
@@ -148,7 +160,7 @@
}
- name: General | Account Management | Users | Files | RC Variables
set_fact:
ansible.builtin.set_fact:
alias_cp: alias cp='cp -v'
alias_mv: alias mv='mv -v'
alias_rm: alias rm='echo "Use mv ~/TRASH/ instead!"'
@@ -664,7 +676,7 @@
done
'
function_code_reseed: |
function git_projects_to_sync {
function git_projects_to_sync() {
# Projects should be followed by the current development branch name.
cat <<- EOF
env-ansible dev
@@ -692,9 +704,10 @@
hugo-rvr dev
nomadic-weather dev
nomadic-weather.wiki main
EOF
EOF
# Above EOF cannot be indented unless using a tab, which would be mixed with spaces.
}
function code-seed {
function code_seed() {
# Git repo information.
git_repo_ssh={{ git_repo_ssh }}
git_main_project={{ git_project }}
@@ -721,15 +734,17 @@
fi
done
}
function code-reseed {
alias code-seed="code_seed "
function code_reseed() {
# Unseed current projects.
echo -e "\n*** Move old projects to TRASH ***"
unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects"
mkdir -pv "$unseed_dir"
mv -v $HOME/Code/* "$unseed_dir"/ 2>/dev/null
code-seed
code_seed
}
alias code-reseed="code_reseed "
function_clean_filenames: |
function clean-filenames() {
# Must provide the directory you'd like to clean all the filenames in.
@@ -784,7 +799,7 @@
alias_prod: |
alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}"
function_clean_code: |
function clean-code {
function clean-code() {
echo -e "******* Android *******\n*** Build Caches ***"
find $HOME/Code/android-*/app -maxdepth 1 -type d -name "build" \
-exec du -hs {} \; -exec rm -rf {} \;
@@ -820,7 +835,7 @@
alias system-killer="kill-system"
function_update_sdks: |
if [[ "$workstation" == "true" && "$coding" == "true" ]]; then
function update-sdks {
function update-sdks() {
echo -e "******* Update SDKs *******\n*** Android - START ***"
yes | sdkmanager --update
yes | sdkmanager --licenses
@@ -838,7 +853,7 @@
alias sdk-updater="update-sdks"
fi
function_ansible_vars: |
function ansible-var-list {
function ansible-var-list() {
cat << EOF
provision
battery
@@ -851,7 +866,7 @@
domain
EOF
}
function ansible-vars {
function ansible-vars() {
ansible-var-list | while read var; do
echo "$var = ${!var}"
done
@@ -869,7 +884,7 @@
alias ansible-facts='ansible localhost -m setup --connection=local'
function_backup: |
export BACKUP_DIR="/srv/backup"
function backup {
function backup() {
/usr/local/bin/backup_system.sh
}
alias backup-system="backup"
@@ -882,7 +897,7 @@
function_pull_prod_backups: |
export DOCKER="Docker"
export SYSTEM="System"
function pull_prod_backup {
function pull_prod_backup() {
if [[ -z "$1" || ("$1" != "$DOCKER" && "$1" != "$SYSTEM") ]]; then
echo "ERROR: Parameter 1 not correct, expecting '$DOCKER' or '$SYSTEM'."
return 1
@@ -910,7 +925,7 @@
mv tmp $HOME/TRASH/"tmp_`now`"
fi
}
function pull_prod_backups {
function pull_prod_backups() {
dir="ProductionBackups-Pulled`today`"
mkdir -pv "$dir"
cd "$dir"
@@ -933,7 +948,7 @@
alias pull-prod="pull_prod_backups"
alias prod-pull="pull_prod_backups"
function_debian_upgrade: |
function debian-upgrade {
function debian-upgrade() {
typeset -l OLD NEW
OLD="$1"
NEW="$2"
@@ -1004,7 +1019,7 @@
alias upgrade-debian="debian-upgrade"
function_ebook_convert: |
# Regenerate all eBook projects at once.
function ebook-convert {
function ebook-convert() {
find $HOME/Code/ebook-* -name "*.pdf" -print -delete
find $HOME/Code/ebook-* -name convert.sh -print -exec bash "{}" \;
}
@@ -1015,7 +1030,7 @@
alias sudo="sudo "
function_load_branch: |
# Change a branch to point at another.
function load-branch {
function load-branch() {
rcvr="$1" # branch which we want to modify
base="$2" # branch with the changes we want
@@ -1107,10 +1122,10 @@
alias_flatpak_clean: |
alias flatpak-clean="flatpak uninstall --unused"
alias_commit: |
function commit_usage {
function commit_usage() {
echo 'Usage: commit "This is a commit message"'
}
function commit {
function commit() {
if [[ -z "$1" ]]; then
echo "ERROR: Message must be provided."
commit_usage
@@ -1128,10 +1143,20 @@
return "$status"
}
function_loop: |
function loop {
cmd="$1"
function loop() {
cmd="$@"
sleep=""
sleep_time=5
if [[ "$cmd" != *"sleep"* ]]; then
sleep='echo -e "`date` - Sleeping for $sleep_time... \n"; sleep $sleep_time'
fi
count=0
echo "Command='$cmd'"
while true; do
$cmd
(( count++ ))
echo "`date` - Loop $count"
eval $cmd
eval $sleep
done;
}
alias try="loop "
@@ -1149,7 +1174,7 @@
sh -c "rm '{{ notify_log_file_wip }}'"
fi
function_reconnect: |
function reconnect {
function reconnect() {
test_domain="git.hyperling.com"
test_connection() {
ping -c 3 $test_domain
@@ -1212,14 +1237,25 @@
alias fix_connections="reconnect"
function_reset_android_studio: |
# Useful after Android Studio is closed improperly. Resets all settings.
function reset_android_studio {
function reset_android_studio() {
mv -v ~/.var/app/com.google.AndroidStudio ~/TRASH/com.google.AndroidStudio-`date +"%Y%m%d"`
}
alias reset-android-studio="reset_android_studio "
function_follow: |
function follow() {
tail -n +1 -F "$@"
}
alias chase="follow "
function_restart: |
function restart() {
prog="$1"
sudo sv restart $prog
tail -n 0 -F /var/log/$prog/current
}
alias reload="restart "
- name: General | Account Management | Users | Files | Common Variable
set_fact:
ansible.builtin.set_fact:
profile_common: |
{{ export_path_additions }}
{{ export_path_sbin }}
@@ -1307,9 +1343,11 @@
{{ process_notify_log }}
{{ function_reconnect }}
{{ function_reset_android_studio }}
{{ function_follow }}
{{ function_restart }}
- name: General | Account Management | Users | Files | .profile + .xsessionrc
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
{{ profile_common }}
@@ -1318,8 +1356,9 @@
echo "`date` - Ansible .profile loaded successfully!"
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: no
create: true
backup: false
mode: "0755"
loop:
- ".profile"
- ".xprofile"
@@ -1327,7 +1366,7 @@
when: user_user.home != ""
- name: General | Account Management | Users | Files | .bashrc
blockinfile:
ansible.builtin.blockinfile:
path: "{{ item }}/.bashrc"
block: |
{{ rc_common }}
@@ -1339,15 +1378,16 @@
echo "`date` - Ansible .bashrc loaded successfully!"
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: no
create: true
backup: false
mode: "0755"
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | Files | .zshrc
blockinfile:
ansible.builtin.blockinfile:
path: "{{ item }}/.zshrc"
block: |
{{ rc_common }}
@@ -1355,17 +1395,19 @@
echo "`date` - Ansible .zshrc loaded successfully!"
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
state: present
create: yes
backup: no
create: true
backup: false
mode: "0755"
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | Files | Ownership
file:
ansible.builtin.file:
path: "{{ user_user.home }}/{{ item }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
loop:
- .bashrc
@@ -1376,65 +1418,17 @@
- name: General | Account Management | Users | Files | Helper Functions (Reset)
shell: "rm -v {{ global_bin }}/*.function"
ignore_errors: yes
ansible.builtin.shell: "rm -v {{ global_bin }}/*.function"
ignore_errors: true
register: shell_check
changed_when: shell_check.rc == 0
- name: General | Account Management | Users | Files | Helper Functions
copy:
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ global_bin }}"
owner: root
group: "{{ root_group }}"
mode: 0755
mode: "0755"
with_fileglob:
- "functions/*.function"
# Shared Environment Setup #
- name: General | Account Management | Users | env-shared | Download / Update
git:
repo: https://git.hyperling.com/me/env-shared
version: "{{ branch }}"
dest: "{{ shared_rc_install_dir }}"
clone: true
force: true
update: true
#ignore_errors: yes
- name: General | Account Management | Users | env-shared | Install | .rc_shared
copy:
src: "{{ shared_rc_install_dir }}/rc_shared.sh"
dest: "{{ item }}/.rc_shared"
owner: root
group: "{{ root_group }}"
mode: 0755
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
#ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | env-shared | Install | .vimrc
copy:
src: "{{ shared_rc_install_dir }}/vimrc.vim"
dest: "{{ item }}/.vimrc"
owner: root
group: "{{ root_group }}"
mode: 0755
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
#ignore_errors: yes
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | env-shared | Permissions
file:
path: "{{ user_user.home }}/{{ item }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
loop:
- .rc_shared
- .vimrc
#ignore_errors: yes
+32 -7
View File
@@ -8,24 +8,49 @@
# $RANDOM / 100 can be up to about 320 seconds, or ~5 minutes.
# This prevents multiple systems from hitting it at the exact same time.
- name: General | Cron | Ansible | Facts
set_fact:
ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.latest.log"
- name: General | Cron | Ansible | Facts 01
ansible.builtin.set_fact:
#ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.`date +'%Y%m%d-%H%M%S'`.log"
ansible_cron_log: "~/{{ ansible_hostname }}.ansible-pull.log"
- name: General | Cron | Ansible | Facts 02
ansible.builtin.set_fact:
ansible_cron_log_old: "{{ ansible_cron_log }}.old"
- name: General | Cron | Ansible | Log | Delete Old
ansible.builtin.file:
path: "{{ ansible_cron_log_old }}"
state: absent
- name: General | Cron | Ansible | Log | Check
ansible.builtin.stat:
path: "{{ ansible_cron_log }}"
register: ansible_cron_log_check
- name: General | Cron | Ansible | Log | Rename [if >1MB]
ansible.builtin.copy:
src: "{{ ansible_cron_log }}"
dest: "{{ ansible_cron_log_old }}"
mode: "0755"
when: ansible_cron_log_check.stat.exists
and ansible_cron_log_check.stat.size > 1000000
- name: General | Cron | Ansible | Create Subscriber Job
cron:
ansible.builtin.cron:
user: ansible
name: "Ansible Sync"
minute: "*/30"
job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }} >{{ ansible_cron_log }} 2>&1'"
job: "bash -c 'sleep $(( $RANDOM / 20 )); sudo {{ ansible_pull_exec.stdout }} -v -o -U {{ git_repo_http }} --checkout {{ branch }} >>{{ ansible_cron_log }} 2>&1'"
state: present
disabled: "{{ 'yes' if no_telem else 'no' }}"
- name: General | Cron | Ansible | Create Forced Weekly Subscriber Job
cron:
ansible.builtin.cron:
user: ansible
name: "Ansible Weekly Forced Sync"
special_time: weekly
job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }} >{{ ansible_cron_log }} 2>&1'"
job: "bash -c 'sleep $(( $RANDOM / 1 )); sudo {{ ansible_pull_exec.stdout }} -v -U {{ git_repo_http }} --checkout {{ branch }} >>{{ ansible_cron_log }} 2>&1'"
state: present
disabled: "{{ 'yes' if no_telem else 'no' }}"
+52
View File
@@ -0,0 +1,52 @@
---
# 20261002 - Hyperling
# Move internet requiring code out of users.yml.
# Shared Environment Setup #
- name: General | Account Management | Users | env-shared | Download / Update
ansible.builtin.git:
repo: https://git.hyperling.com/me/env-shared
version: "{{ branch }}"
dest: "{{ shared_rc_install_dir }}"
clone: true
force: true
update: true
#ignore_errors: true
- name: General | Account Management | Users | env-shared | Install | .rc_shared
copy:
src: "{{ shared_rc_install_dir }}/rc_shared.sh"
dest: "{{ item }}/.rc_shared"
owner: root
group: "{{ root_group }}"
mode: "0755"
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
#ignore_errors: true
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | env-shared | Install | .vimrc
copy:
src: "{{ shared_rc_install_dir }}/vimrc.vim"
dest: "{{ item }}/.vimrc"
owner: root
group: "{{ root_group }}"
mode: "0755"
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
#ignore_errors: true
when: user_root.home != "" and user_user.home != ""
- name: General | Account Management | Users | env-shared | Permissions
ansible.builtin.file:
path: "{{ user_user.home }}/{{ item }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: "0755"
loop:
- .rc_shared
- .vimrc
#ignore_errors: true
+5 -3
View File
@@ -2,13 +2,13 @@
# Copy everything from PROJECT/files/scripts/ to /usr/local/bin/.
- name: General | Scripts | Install | Ensure Directory Exists
file:
ansible.builtin.file:
path: '{{ global_bin }}'
state: directory
mode: '0755'
- name: General | Scripts | Install | Copy Files
copy:
ansible.builtin.copy:
src: 'scripts/'
dest: "{{ global_bin }}/"
owner: root
@@ -16,10 +16,12 @@
mode: '0755'
- name: General | Scripts | Install | Remove Old Scripts
shell: |
ansible.builtin.shell: |
if [[ -e {{ global_bin }}/{{ item }} ]]; then
rm -v {{ global_bin }}/{{ item }}
fi
register: shell_check
changed_when: shell_check.rc == 0
loop:
- compress-video.sh
- compress-images.sh
+4 -13
View File
@@ -2,7 +2,7 @@
# Create file to easily push git changes and call SCM.
- name: General | Scripts | Root | scm.sh
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_root.home }}/bin/scm.sh"
block: |
# 20210211 - Make life easier!
@@ -11,16 +11,11 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
- name: General | Scripts | Root | scm.sh Permissions
file:
path: "{{ user_root.home }}/bin/scm.sh"
create: true
mode: '0755'
- name: General | Scripts | Root | scm-dev.sh
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_root.home }}/bin/scm-dev.sh"
block: |
# 20210713 - Make life easier for development!
@@ -41,9 +36,5 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
- name: General | Scripts | Root | scm-dev.sh Permissions
file:
path: "{{ user_root.home }}/bin/scm-dev.sh"
create: true
mode: '0755'
+6 -6
View File
@@ -2,7 +2,7 @@
# Create file to easily push git changes and call SCM.
- name: General | Scripts | User | scm.sh
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/bin/scm.sh"
block: |
# 20210211 - Make life easier!
@@ -11,16 +11,16 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
- name: General | Scripts | User | scm.sh Permissions
file:
ansible.builtin.file:
path: "{{ user_user.home }}/bin/scm.sh"
mode: '0755'
- name: General | Scripts | User | scm-dev.sh
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/bin/scm-dev.sh"
block: |
# 20210713 - Make life easier for development!
@@ -41,9 +41,9 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
- name: General | Scripts | User | scm-dev.sh Permissions
file:
ansible.builtin.file:
path: "{{ user_user.home }}/bin/scm-dev.sh"
mode: '0755'
+3 -3
View File
@@ -3,13 +3,13 @@
# Ensure the correct International AltGr keyboard setting is always chosen.
- name: General | Settings | Keyboard | Default Config
lineinfile:
ansible.builtin.lineinfile:
path: "/etc/default/keyboard"
regexp: '{{ item.key }}'
line: '{{ item.value }}'
state: present
create: yes
backup: yes
create: true
backup: true
loop:
#- { "key": '^[\#]?XKBMODEL', "value": 'XKBMODEL="pc105"'}
- { "key": '^[\#]?XKBLAYOUT', "value": 'XKBLAYOUT="us"'}
@@ -4,11 +4,11 @@
## Cron ##
- name: General | Software | Services | CROND | Enable
service:
ansible.builtin.service:
name: "{{ crond }}"
pattern: "{{ crond_pattern }}"
state: started
enabled: yes
enabled: true
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr != "runit"
register: cron_status
@@ -17,10 +17,10 @@
delay: 3
- name: General | Software | Services | CROND | Enable (runit)
service:
ansible.builtin.service:
name: "{{ crond }}"
state: started
enabled: yes
enabled: true
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr == "runit"
ignore_errors: true # Service module seems experimental for this init system.
@@ -28,17 +28,18 @@
## SSHD ##
- name: General | Software | Services | SSHD | Configure
lineinfile:
ansible.builtin.lineinfile:
path: "{{ sshd_config }}"
regexp: '{{ item.key }}'
line: '{{ item.value }} # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0644"
loop:
- { "key": '^[\#]?AllowUsers', "value": 'AllowUsers {{ user }}'}
- { "key": '^[\#]?PermitRootLogin', "value": 'PermitRootLogin no'}
- { "key": '^[\#]?AllowTcpForwarding', "value": 'AllowTcpForwarding no'}
- { "key": '^[\#]?AllowTcpForwarding', "value": 'AllowTcpForwarding yes'}
- { "key": '^[\#]?ClientAliveInterval', "value": 'ClientAliveInterval 60'}
- { "key": '^[\#]?ClientAliveCountMax', "value": 'ClientAliveCountMax 2'}
- { "key": '^[\#]?Compression', "value": 'Compression no'}
@@ -50,15 +51,17 @@
- { "key": '^[\#]?X11Forwarding', "value": 'X11Forwarding no'}
- { "key": '^[\#]?AllowAgentForwarding', "value": 'AllowAgentForwarding no'}
- { "key": '^[\#]?PermitEmptyPasswords', "value": 'PermitEmptyPasswords no'}
- { "key": '^[\#]?GatewayPorts', "value": 'GatewayPorts yes'}
- name: General | Software | Services | SSHD | Configure (PVE)
lineinfile:
ansible.builtin.lineinfile:
path: "{{ sshd_config }}"
regexp: '{{ item.key }}'
line: '{{ item.value }} # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0644"
loop:
- { "key": '^[\#]?AllowUsers', "value": 'AllowUsers root {{ user }}'}
- { "key": '^[\#]?PermitRootLogin', "value": 'PermitRootLogin yes'}
@@ -66,11 +69,11 @@
when: "'pve' in ansible_kernel"
- name: General | Software | Services | SSHD | Enable
service:
ansible.builtin.service:
name: "{{ sshd }}"
pattern: "{{ sshd_pattern }}"
state: reloaded
enabled: yes
enabled: true
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr != "runit"
register: sshd_status
@@ -81,31 +84,31 @@
## JournalCTL ##
- name: General | Software | Services | JournalCTL | Reduce Log Size
shell: journalctl --vacuum-size=100M
ansible.builtin.shell: journalctl --vacuum-size=100M
when: ansible_system == "Linux"
and ansible_service_mgr == "systemd"
ignore_errors: yes
ignore_errors: true
## Bluetooth ##
# Do people seriously depend on Bluetooth? Plug your devices in, silly!
# Hehe, I use it now for a few rare things so disabling this for now.
#- name: General | Software | Services | Bluetooth | Disable
# service:
# ansible.builtin.service:
# name: "{{ bluetooth }}"
# pattern: "{{ bluetooth_pattern }}"
# state: stopped
# enabled: no
# ignore_errors: yes
# enabled: false
# ignore_errors: true
## NTP ##
- name: General | Software | Services | NTP | Enable
service:
ansible.builtin.service:
name: "{{ ntp_server }}"
pattern: "{{ ntp_server }}"
state: started
enabled: yes
enabled: true
when: ansible_virtualization_type != 'docker'
and ansible_service_mgr != "runit"
register: ntp_status
@@ -123,27 +126,26 @@
## Disable ##
- name: General | Software | Services | Disable
service:
ansible.builtin.service:
name: "{{ item.name }}"
pattern: "{{ item.pattern }}"
state: stopped
enabled: no
ignore_errors: yes
enabled: false
ignore_errors: true
loop:
- {name: "{{ cups }}" , pattern: "{{ cups_pattern }}"}
- {name: "{{ cups_browse }}", pattern: "{{ cups_browse_pattern }}"}
when: ansible_service_mgr != "runit"
- name: General | Software | Services | Disable (runit)
shell: |
if [[ -e {{ runit_service_dir }}/{{ item.name }} ]]; then
ansible.builtin.shell: |
if [[ -e {{ runit_service_dir }}/{{ item.name }} ]]; then
rm -v {{ runit_service_dir }}/{{ item.name }}
fi
ignore_errors: yes
ignore_errors: true
loop:
- {name: "{{ cups }}" }
- {name: "{{ cups_pattern }}" }
- {name: "{{ cups_browse }}" }
- {name: "{{ cups_browse_pattern }}"}
when: ansible_service_mgr == "runit"
@@ -7,7 +7,7 @@
block:
- name: General | Software | Swap | Check For Swapfile
stat:
ansible.builtin.stat:
path: "{{ swap_file }}"
get_attributes: false
get_checksum: false
@@ -18,7 +18,7 @@
block:
- name: General | Software | Swap | Create Swapfile
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- dd if=/dev/zero of={{ swap_file }} bs={{ swap_block }}
count={{ swap_count }} status=progress
@@ -31,12 +31,12 @@
# NixOS's swap setup is handled in nixos.yml when ansible.nix is created.
- name: General | Software | Swap | Add to FSTAB
lineinfile:
ansible.builtin.lineinfile:
path: /etc/fstab
regexp: '^[\#]?{{ swap_file }}'
line: '{{ swap_file }} none swap sw 0 0'
state: present
backup: yes
backup: true
when: ansible_distribution != "NixOS"
# Only run through this file if the ini has been changed from false.
+110
View File
@@ -0,0 +1,110 @@
---
# 2026-10-17 Hyperling
# Allow pushing a local port to a remote server automagically in a runit script.
# ssh -N -p SSH_PORT -R REMOTE_PORT:localhost:LOCAL_PORT USER@REMOTE_HOST -v
- name: General | Tunnel | Provisioned Variables
ansible.builtin.debug:
var: "{{ item }}"
loop:
- tunnel_local_port
- tunnel_remote_host
- tunnel_remote_port
- tunnel_ssh_port
- name: General | Tunnel | Facts
ansible.builtin.set_fact:
tunnel_service_name: tunnel
- name: General | Tunnel | Packages [pacman]
ansible.builtin.package:
name:
- openbsd-netcat
state: present
when: ansible_pkg_mgr == "pacman"
- name: General | Tunnel | Packages [apt]
ansible.builtin.package:
name:
- netcat-openbsd
state: present
when: ansible_pkg_mgr == "apt"
- name: General | Tunnel | runit
block:
- name: General | Tunnel | runit | mkdir | /etc/sv
ansible.builtin.file:
path: /etc/sv/{{ tunnel_service_name }}
state: directory
mode: "0755"
- name: General | Tunnel | runit | mkdir | /etc/sv log
ansible.builtin.file:
path: /etc/sv/{{ tunnel_service_name }}/log
state: directory
mode: "0755"
- name: General | Tunnel | runit | mkdir | /var/log
ansible.builtin.file:
path: /var/log/{{ tunnel_service_name }}
state: directory
mode: "0755"
- name: General | Tunnel | runit | Script | Run
ansible.builtin.copy:
dest: /etc/sv/{{ tunnel_service_name }}/run
content: |
#!/bin/sh -e
exec 2>&1
# Health check to ensure connection does not go stale.
while true; do
sleep 300
echo -n "RUN-LOOP: "
nc -zv {{ tunnel_remote_host }} {{ tunnel_remote_port }}
status="$?"
echo "RUN-LOOP: Port check returned ${status}."
if [[ "$status" != 0 ]]; then
echo "RUN-LOOP: Restarting service."
sv restart {{ tunnel_service_name }}
fi
echo "RUN-LOOP: Going back to sleep."
done &
# Do not use `exec` here otherwise the loop may get killed.
chpst -u {{ user }} ssh -v -N \
-R {{ tunnel_remote_port }}:localhost:{{ tunnel_local_port }} \
-p {{ tunnel_ssh_port }} {{ tunnel_remote_host }}
mode: "0755"
- name: General | Tunnel | runit | Script | Finish
ansible.builtin.copy:
dest: /etc/sv/{{ tunnel_service_name }}/finish
content: |
{{ runit_finish_sleep }}
mode: "0755"
- name: General | Tunnel | runit | Script | Log
ansible.builtin.copy:
dest: /etc/sv/{{ tunnel_service_name }}/log/run
content: |
#!/bin/sh -e
exec svlogd -tt /var/log/{{ tunnel_service_name }}
mode: "0755"
- name: General | Tunnel | runit | Script | Log Config
ansible.builtin.copy:
dest: /var/log/{{ tunnel_service_name }}/config
content: |
{{ runit_log_config_10mb }}
mode: "0755"
- name: General | Tunnel | runit | Service | Enable
ansible.builtin.service:
name: "{{ tunnel_service_name }}"
state: "{{ 'started' if tunnel_remote_host else 'stopped' }}"
enabled: "{{ true if tunnel_remote_host else false }}"
when: ansible_service_mgr == "runit"
+10 -10
View File
@@ -3,30 +3,30 @@
# Install the AUR on pacman-related distros.
- name: General | Software | AUR | Facts 01
set_fact:
ansible.builtin.set_fact:
aur_user: aurbuilder
aur_build_dir: "{{ global_src }}"
aur_helper: yay
aur_helper_url: https://aur.archlinux.org/yay-bin.git
- name: General | Software | AUR | Facts 02
set_fact:
ansible.builtin.set_fact:
aur_helper_dir: "{{ aur_build_dir }}/{{ aur_helper }}"
aur_sudoers: "/etc/sudoers.d/sudoers_{{ aur_user }}"
- name: General | Software | AUR | User
user:
ansible.builtin.user:
name: "{{ aur_user }}"
groups: wheel
create_home: true
- name: General | Software | AUR | Sudoers
lineinfile:
ansible.builtin.lineinfile:
path: "{{ aur_sudoers }}"
line: "{{ aur_user }} ALL=(ALL) NOPASSWD: /usr/bin/pacman"
create: true
mode: '0440'
validate: 'visudo -cf %s'
validate: 'visudo -cf %s'
- name: General | Software | AUR | Check
command: "which {{ aur_helper }}"
@@ -38,17 +38,17 @@
block:
- name: General | Software | AUR | Install | Clone Repo
git:
ansible.builtin.git:
repo: "{{ aur_helper_url }}"
dest: "{{ aur_helper_dir }}"
- name: General | Software | AUR | Install | Change Permissions
shell: "chown -Rc {{ aur_user }}:wheel {{ aur_helper_dir }}"
ansible.builtin.shell: "chown -Rc {{ aur_user }}:wheel {{ aur_helper_dir }}"
- name: General | Software | AUR | Install | Build & Integrate
shell: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
ansible.builtin.shell: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
become: true
become_user: "{{ aur_user }}"
changed_when: true
changed_when: true
when: yay_check.rc != 0
+9 -9
View File
@@ -2,18 +2,18 @@
# Install Metasploit Framework
- name: General | Software | Metasploit | Facts
set_fact:
ansible.builtin.set_fact:
metasploit_installer: msfinstall
when: ansible_system in ("Linux", "Darwin")
and pentesting == true
and pentesting
- name: General | Software | Metasploit | Check Install Status
stat:
ansible.builtin.stat:
path: /usr/bin/msfconsole
register: metasploit_status
- name: General | Software | Metasploit | Refresh Apt Files
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mkdir -p /tmp/apt/"
- "mv -fv /usr/share/keyrings/metasploit-framework.gpg /tmp/apt/metasploit-framework.gpg.old"
@@ -21,11 +21,11 @@
- "mv -fv /etc/apt/preferences.d/pin-metasploit.pref /tmp/apt/pin-metasploit.pref.old"
when: ansible_system in ("Linux") and ansible_pkg_mgr == "apt"
and not metasploit_status.stat.exists
and pentesting == true
and pentesting
ignore_errors: true
- name: General | Software | Metasploit | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > {{ metasploit_installer }}"
- "chmod 755 {{ metasploit_installer }}"
@@ -34,10 +34,10 @@
- yes y | "{{ global_bin }}/{{ metasploit_installer }}"
when: ansible_system in ("Linux", "Darwin")
and not metasploit_status.stat.exists
and pentesting == true
and pentesting
- name: General | Software | Metasploit | Remove (Darwin)
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "/opt/metasploit-framework/bin/msfremove"
when: ansible_system in ("Darwin")
@@ -45,7 +45,7 @@
and pentesting == false
- name: General | Software | Metasploit | Remove
package:
ansible.builtin.package:
name: "metasploit-framework"
state: absent
when: ansible_system in ("Linux")
+4 -3
View File
@@ -13,20 +13,21 @@
###
- name: Nix Variables
set_fact:
ansible.builtin.set_fact:
nix_exe: ~/.deleteme.nix.sh
- name: Install Nix
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "curl -L https://nixos.org/nix/install > {{ nix_exe }}"
- "chmod 755 {{ nix_exe }}"
- "{{ nix_exe }} --daemon --yes"
- "rm -v {{ nix_exe }}"
become: true
become_user: "{{ user }}"
- name: Install Nix Software
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "nix-env -iA nixpkgs.lbry" # Installs, but doesnt launch?
#$ lbry
+7 -7
View File
@@ -3,20 +3,20 @@
# This is also done in setup.sh if ansible is not found.
- name: General | Software | NixOS | Facts
set_fact:
ansible.builtin.set_fact:
nixos_working_dir: ~/nixos-config-deleteme
nixos_working_exe: activate.sh
- name: General | Software | NixOS | Facts [Swap]
set_fact:
ansible.builtin.set_fact:
nixos_swap: "swapDevices = [ { device = \"{{ swap_file }}\";} ];"
when: swap_block != false
- name: General | Software | NixOS | Update Config Project
shell: "files/scripts/nixos.sh -b {{ branch }}"
ansible.builtin.shell: "files/scripts/nixos.sh -b {{ branch }}"
- name: General | Software | NixOS | Create Ansible Nix Config
blockinfile:
ansible.builtin.blockinfile:
path: /etc/nixos/ansible.nix
block: |
# This file was created by https://git.hyperling.com/me/env-ansible
@@ -29,14 +29,14 @@
{{ nixos_swap }}
}
state: present
backup: yes
create: yes
backup: true
create: true
# Maybe do home manager here? Or should it be under Workstation? Or maybe
# this is the spot where I start creating workstation.nix, server.nix, etc.
#- name: General | Software | NixOS | Home Manager? *.nix file management?
# shell:
# ansible.builtin.shell:
# loop:
# - ???
# - ???
+29 -35
View File
@@ -5,40 +5,40 @@
# They have zypper higher in the path, but it's really apt renamed.
# Probably for "security", but package module does not use the ansible_pkg_mgr variable
# so resetting the value to apt doesn't work. Just going to move it.
shell: "mv `which zypper` `which zypper`.zz.`date +%Y%m%d`"
ansible.builtin.shell: "mv `which zypper` `which zypper`.zz.`date +%Y%m%d`"
register: parrotos_zypper_removed
ignore_errors: yes
ignore_errors: true
when: ansible_distribution == "Parrot OS"
- name: General | Software | Packages | Fix Parrot OS (zypper), Exit Incoming
debug:
ansible.builtin.debug:
msg: "A silly zypper file was renamed successfully. Please try running Ansible again."
when: ansible_distribution == "Parrot OS" and parrotos_zypper_removed is defined and not parrotos_zypper_removed.failed
- name: General | Software | Packages | Fix Parrot OS (zypper), Exiting
shell: exit 1
ansible.builtin.shell: exit 1
when: ansible_distribution == "Parrot OS" and parrotos_zypper_removed is defined and not parrotos_zypper_removed.failed
# More Parrot OS junk. They have a command called update in /usr/bin. Doesn't
# have sudo or anything in it. Hide it in preference for .bashrc update function.
- name: General | Software | Packages | Fix Parrot OS 2 (update)
shell: "mv `which update` `which update`.zz.`date +%Y%m%d`"
ignore_errors: yes
ansible.builtin.shell: "mv `which update` `which update`.zz.`date +%Y%m%d`"
ignore_errors: true
when: ansible_distribution == "Parrot OS"
- name: General | Software | Packages | Cache Refresh (Apt and Pacman)
package:
update_cache: yes
ansible.builtin.package:
update_cache: true
name: htop
when: ansible_pkg_mgr in ["apt", "pacman"]
- name: General | Software | Packages | Cache Refresh (FreeBSD)
shell: pkg update
ansible.builtin.shell: pkg update
when: ansible_system == "FreeBSD"
- name: General | Software | Packages | Install Software
package:
ansible.builtin.package:
name:
- bash
- sudo
@@ -68,19 +68,21 @@
- "{{ alsa }}"
- "{{ stress }}"
- "{{ jq }}"
- "{{ btop }}"
- "{{ xkb }}"
state: present
- name: General | Software | Packages | Install Software (DEV)
package:
ansible.builtin.package:
name:
- "{{ microcode_amd }}"
- "{{ microcode_intel }}"
state: present
when: branch == "dev"
ignore_errors: yes
ignore_errors: true
- name: General | Software | Packages | Add Generic Kernel + Tools (Ubuntu)
package:
ansible.builtin.package:
name:
- linux-image-generic
- linux-headers-generic
@@ -88,25 +90,25 @@
- linux-tools-common
state: present
when: ansible_distribution == "Ubuntu"
ignore_errors: yes
ignore_errors: true
- name: General | Software | Packages | Add Generic Kernel + Headers (Debian)
package:
ansible.builtin.package:
name:
- linux-image-amd64
- linux-headers-amd64
state: present
when: ansible_distribution == "Debian"
ignore_errors: yes
ignore_errors: true
- name: General | Software | Packages | Install killall (Looking at you, Debian)
package:
ansible.builtin.package:
name: psmisc
state: present
when: ansible_distribution == "Debian"
- name: General | Software | Packages | Install "Bloat" (Looking at you, Arch Base)
package:
ansible.builtin.package:
name:
- which
- "{{ cron }}"
@@ -115,7 +117,7 @@
when: ansible_pkg_mgr == "pacman"
- name: General | Software | Packages | Install Fix (Looking at you, openSUSE)
package:
ansible.builtin.package:
name:
# openSUSE Tumbleweed comes without gnome-control-center being able to open
# properly. Hopefully just a one-time accident but I wanted bleeding edge so I
@@ -126,16 +128,8 @@
state: present
when: ansible_pkg_mgr in ("zypper")
- name: General | Software | Packages | Update Software (Disabled)
package:
name:
- ansible
- git
state: latest
when: 1 == 0
- name: General | Software | Packages | Remove Software
package:
ansible.builtin.package:
name:
- cowsay # Sorry ;)
- chromium
@@ -144,26 +138,26 @@
# Ubuntu still uses snap for critical components like GNOME, must keep.
- name: General | Software | Packages | Disable Snap Daemon
service:
ansible.builtin.service:
name: snapd
pattern: snapd
state: stopped
enabled: no
enabled: false
when: ansible_distribution != "Ubuntu"
ignore_errors: yes
ignore_errors: true
- name: General | Software | Packages | Remove Snap (Besides Ubuntu)
package:
ansible.builtin.package:
name:
- snapd
state: absent
when: ansible_distribution != "Ubuntu"
ignore_errors: yes
ignore_errors: true
- name: General | Software | Packages | Other Debian Packages
package:
ansible.builtin.package:
name:
- usbutils
state: present
when: ansible_distribution in ("Debian")
ignore_errors: yes
ignore_errors: true
+23
View File
@@ -0,0 +1,23 @@
---
# 20261006 Hyperling
# Allow ansible.builtin.service to be used on Artix similar to Devuan.
- name: General | Software | runit | Fix Artix
block:
- name: General | Software | runit | Fix Artix | Script Dir
ansible.builtin.file:
src: /etc/runit/sv
dest: /etc/sv
state: link
force: true
- name: General | Software | runit | Fix Artix | Service Dir
ansible.builtin.file:
src: /etc/runit/runsvdir/default
dest: /var/service
state: link
force: true
when: ansible_service_mgr == "runit"
and ansible_pkg_mgr == "pacman"
+12 -12
View File
@@ -3,46 +3,46 @@
# Preferably only on servers that don't already have postfix?
- name: Server | Sendmail | Variables
set_fact:
ansible.builtin.set_fact:
sendmail: sendmail
sendmail_queue: sendmail_msp_queue
- name: Server | Sendmail | Check
shell: which postfix
ansible.builtin.shell: which postfix
register: postfix
ignore_errors: yes
ignore_errors: true
- name: Server | Sendmail | Install
package:
name:
ansible.builtin.package:
name:
- "{{ sendmail }}"
state: present
when: postfix.failed
- name: Server | Sendmail | Configure
blockinfile:
ansible.builtin.blockinfile:
path: /etc/rc.conf
block: |
sendmail_enable="YES"
sendmail_msp_queue_enable="YES"
marker: "# {mark} MANAGED BY ANSIBLE - sendmail"
state: present
create: yes
backup: yes
create: true
backup: true
when: postfix.failed and ansible_system == "FreeBSD"
- name: Server | Sendmail | Enable + Start | Main
service:
ansible.builtin.service:
name: "{{ sendmail }}"
pattern: "{{ sendmail }}"
state: started
enabled: yes
enabled: true
when: postfix.failed
- name: Server | Sendmail | Enable + Start | Queue
service:
ansible.builtin.service:
name: "{{ sendmail_queue }}"
pattern: "{{ sendmail_queue }}"
state: started
enabled: yes
enabled: true
when: postfix.failed and ansible_system == "FreeBSD"
+16 -16
View File
@@ -5,7 +5,7 @@
# Variables #
- name: General | Telegraf | Variables 1/4
set_fact:
ansible.builtin.set_fact:
telegraf_tar: telegraf-1.20.3_linux_amd64.tar.gz
telegraf_path: /usr/local/bin
telegraf_config_path: /usr/local/etc
@@ -13,25 +13,25 @@
telegraf_log: "{{ user_ansible.home }}/telegraf.log"
- name: General | Telegraf | Variables 2/4
set_fact:
ansible.builtin.set_fact:
telegraf_exec: "{{ telegraf_path }}/telegraf"
telegraf_config: "{{ telegraf_config_path }}/telegraf.conf"
- name: General | Telegraf | Variables 3/4
set_fact:
ansible.builtin.set_fact:
telegraf_cmd: "{{ telegraf_exec }} --config {{ telegraf_config }} >> {{ telegraf_log }} 2>&1"
- name: General | Telegraf | Variables 4/4
set_fact:
ansible.builtin.set_fact:
telegraf_watcher: "killall telegraf; {{ telegraf_cmd }}"
- name: General | Telegraf | Variables | Linux
set_fact:
ansible.builtin.set_fact:
telegraf_input_temp: "[[inputs.temp]]"
when: ansible_system == "Linux"
- name: General | Telegraf | Variables | FreeBSD
set_fact:
ansible.builtin.set_fact:
telegraf_input_temp: ""
when: ansible_system == "FreeBSD"
@@ -40,14 +40,14 @@
#### Dependencies #
###
###- name: General | Telegraf | Pre-Reqs
### package:
### ansible.builtin.package:
### name: wget
### when: ansible_system == "Linux"
###
#### Install #
###
###- name: General | Telegraf | Linux | Install
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### args:
### chdir: "{{ ansible_env.HOME }}/Downloads/"
### loop:
@@ -61,22 +61,22 @@
### when: ansible_system == "Linux"
###
###- name: General | Telegraf | FreeBSD | Install 1/2
### shell: /usr/sbin/pwd_mkdb -p /etc/master.passwd
### ansible.builtin.shell: /usr/sbin/pwd_mkdb -p /etc/master.passwd
### when: ansible_system == "FreeBSD"
###
###- name: General | Telegraf | FreeBSD | Install 2/2
### package:
### ansible.builtin.package:
### name: telegraf
### when: ansible_system == "FreeBSD"
###
#### Configuration #
###
###- name: General | Telegraf | Config 1/2
### shell: mv {{ telegraf_config }} ~/TRASH/
### ignore_errors: yes
### ansible.builtin.shell: mv {{ telegraf_config }} ~/TRASH/
### ignore_errors: true
###
###- name: General | Telegraf | Config 2/2
### blockinfile:
### ansible.builtin.blockinfile:
### path: "{{ telegraf_config }}"
### block: |
### [global_tags]
@@ -158,19 +158,19 @@
###
### marker: '# {mark} MANAGED BY ANSIBLE - telegraf.yml'
### state: present
### create: yes
### create: true
# Run #
- name: General | Telegraf | Schedule
cron:
ansible.builtin.cron:
user: "{{ telegraf_user }}"
name: "{{ item.name }}"
job: "{{ item.command }}"
special_time: "{{ item.freq }}"
state: present
#disabled: "{{ 'yes' if no_telem else 'no' }}"
disabled: yes # 2024-01-25, Downsizing again and will not have Graphana.
disabled: true # 2024-01-25, Downsizing again and will not have Graphana.
loop:
- { "name": "Telegraf Reboot Job" , "freq": "reboot", "command": "{{ telegraf_cmd }}"}
- { "name": "Telegraf Keep-Alive Job", "freq": "hourly", "command": "{{ telegraf_watcher }}"}
+32
View File
@@ -0,0 +1,32 @@
---
# 20261002 - Hyperling
# Check whether we're connected to the internet and skip certain playbooks if not.
- name: General | Tests | Internet | Facts 01
ansible.builtin.set_fact:
internet: true
internet_time: 10
- name: General | Tests | Internet | Check
ansible.builtin.wait_for:
host: archlinux.org
port: 443
state: started
timeout: "{{ internet_time }}"
register: internet_check
ignore_errors: true
- name: General | Tests | Internet | Facts 02
ansible.builtin.set_fact:
internet: "{{ internet_check is success }}"
- name: General | Tests | Internet | Message
ansible.builtin.debug:
msg: "WARNING: Not connected to the Internet, only running for offline playbooks."
when: not internet
- name: General | Tests | Internet | Sleep
ansible.builtin.command: "sleep {{ internet_time }}"
register: shell_check
changed_when: shell_check.rc == 0
when: not internet
+16
View File
@@ -0,0 +1,16 @@
---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Facts
ansible.builtin.set_fact:
lock_file: "/tmp/ansible-playbook.lock"
- name: General | Tests | Existing Run | Check
ansible.builtin.stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Exit
ansible.builtin.meta: end_play
when: lock_exists.stat.exists
+22
View File
@@ -0,0 +1,22 @@
---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Lock | Create
ansible.builtin.shell: "date +'%Y-%m-%d %H:%M:%S' >> {{lock_file }}"
- name: General | Tests | Existing Run | Lock | Create
ansible.builtin.file:
name: "{{ lock_file }}"
mode: '0777'
- name: General | Tests | Existing Run | Lock | Create | Check
ansible.builtin.stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Lock | Create | Fail
fail:
msg: "ERROR: Lock file does not exist."
when: not lock_exists.stat.exists
+18
View File
@@ -0,0 +1,18 @@
---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Lock | Remove
ansible.builtin.file:
name: "{{ lock_file }}"
state: absent
- name: General | Tests | Existing Run | Lock | Remove | Check
ansible.builtin.stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Lock | Remove | Fail
fail:
msg: "ERROR: Lock file still exists!"
when: lock_exists.stat.exists
+11 -11
View File
@@ -2,45 +2,45 @@
# Lynis hardness check.
- name: General | Tests | Lynis | Set Facts
set_fact:
ansible.builtin.set_fact:
lynis_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.{{ lynis_report }}"
- name: General | Tests | Lynis | Set Facts 2
set_fact:
ansible.builtin.set_fact:
lynis_temp_file: "{{ lynis_file }}.tmp"
- name: General | Tests | Lynis | Install
git:
ansible.builtin.git:
repo: https://github.com/CISOfy/lynis
dest: "{{ lynis_install_dir }}"
clone: true
force: true
update: true
ignore_errors: yes
ignore_errors: true
- name: General | Tests | Lynis | Ensure Permissions (Looking at you Parrot OS!)
file:
ansible.builtin.file:
path: "{{ lynis_install_dir }}"
state: directory
mode: '0644'
owner: root
group: "{{ root_group }}"
recurse: yes
recurse: true
- name: General | Tests | Lynis | Ensure Permissions 2
file:
ansible.builtin.file:
path: "{{ lynis_install_dir }}/lynis"
mode: '0755'
- name: General | Tests | Lynis | Ensure Folder Permissions
file:
ansible.builtin.file:
path: "{{ lynis_install_dir }}"
state: directory
mode: '0755'
recurse: no
recurse: false
- name: General | Tests | Lynis | Run System Audit
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "./lynis audit system --no-colors > {{ lynis_temp_file }} 2>&1"
- "mv {{ lynis_temp_file }} {{ lynis_file }}"
@@ -49,6 +49,6 @@
chdir: "{{ lynis_install_dir }}"
- name: General | Tests | Lynis | Make Report Readable
file:
ansible.builtin.file:
path: "{{ lynis_file }}"
mode: '0644'
+4 -4
View File
@@ -2,16 +2,16 @@
# Nmap port test
- name: General | Tests | nmap | Set Facts
set_fact:
ansible.builtin.set_fact:
nmap_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.{{ nmap_report }}"
nmap_separator: "\n*******************************\n"
- name: General | Tests | nmap | Set Facts 2
set_fact:
ansible.builtin.set_fact:
nmap_temp_file: "{{ nmap_file }}.tmp"
- name: General | Tests | nmap | Create Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "date > {{ nmap_temp_file }}"
- "printf '{{ nmap_separator }}' >> {{ nmap_temp_file }}"
@@ -25,6 +25,6 @@
- "mv {{ nmap_temp_file }} {{ nmap_file }}"
- name: General | Tests | nmap | Make Viewable
file:
ansible.builtin.file:
path: "{{ nmap_file }}"
mode: '0644'
+6 -6
View File
@@ -2,30 +2,30 @@
# List all the services under the Reports folder.
- name: General | Tests | Services | Set Facts
set_fact:
ansible.builtin.set_fact:
services_report_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.services.txt"
services_enabled_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.services-enabled.txt"
services_command: "echo 'Service Manager {{ ansible_service_mgr }} Not Recognized'"
- name: General | Tests | Services | Set Facts | SystemD
set_fact:
ansible.builtin.set_fact:
services_command: "systemctl list-unit-files"
when: ansible_service_mgr == "systemd"
- name: General | Tests | Services | Set Facts | runit
set_fact:
ansible.builtin.set_fact:
services_command: 'for s in {{ runit_service_dir }}/*; do sv status "$s"; done'
when: ansible_service_mgr == "runit"
- name: General | Tests | Services | Create Main Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "date > {{ services_report_file }}"
- "echo '\n-= {{ services_command }} =-\n' >> {{ services_report_file }}"
- "{{ services_command }} >> {{ services_report_file }}"
- name: General | Tests | Services | Create Enabled Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "date > {{ services_enabled_file }}"
- "echo '\n-= Enabled + Sorted =-\n' >> {{ services_enabled_file }}"
@@ -33,6 +33,6 @@
when: ansible_service_mgr == "systemd"
- name: General | Tests | Services | Make Viewable
file:
ansible.builtin.file:
path: "{{ services_report_file }}"
mode: '0644'
+179
View File
@@ -0,0 +1,179 @@
---
####### Lock #######
# Ensure a process is not already running.
- name: Main | Lock
block:
- name: Main | Lock | Check
ansible.builtin.include_tasks: tasks/general/tests/lock_check.yml
- name: Main | Lock | Create
ansible.builtin.include_tasks: tasks/general/tests/lock_create.yml
####### Gather #######
# Load facts for all systems.
- name: Main | Gather
block:
- name: Main | Gather | Facts
ansible.builtin.include_tasks: facts/general/gather.yml
- name: Main | Gather | Account Management
ansible.builtin.include_tasks: tasks/general/acct_mgmt/provision_config.yml
- name: Main | Gather | System
ansible.builtin.include_tasks: facts/general/system.yml
- name: Main | Gather | Package
ansible.builtin.include_tasks: facts/general/package.yml
- name: Main | Gather | Service
ansible.builtin.include_tasks: facts/general/service.yml
- name: Main | Gather | User
ansible.builtin.include_tasks: facts/general/user.yml
- name: Main | Gather | Internet Check
ansible.builtin.include_tasks: tasks/general/tests/internet_check.yml
####### Start #######
- name: Main | Start
block:
- name: Main | Start | Notify
ansible.builtin.include_tasks: tasks/general/acct_mgmt/notify.yml
vars:
notify_message: "Provisioning Started"
when: workstation
####### NixOS #######
# Install the .nix files and do a little data setup.
- name: Main | NixOS
block:
- name: Main | NixOS | Config
ansible.builtin.include_tasks: tasks/general/software/nixos.yml
# TBD if we are going to use this many, then just have IF statements
# and use blocks within the General area for NixOS vs not-NixOS.
- name: Main | NixOS | Swap
ansible.builtin.include_tasks: tasks/general/software/swap.yml
- ansible.builtin.include_tasks: tasks/general/acct_mgmt/groups.yml
- ansible.builtin.include_tasks: tasks/general/acct_mgmt/users.yml
- ansible.builtin.include_tasks: tasks/general/acct_mgmt/sudo.yml
- ansible.builtin.include_tasks: tasks/general/acct_mgmt/doas.yml
- ansible.builtin.include_tasks: tasks/general/scripts/root.yml
- ansible.builtin.include_tasks: tasks/general/scripts/user.yml
- ansible.builtin.include_tasks: tasks/general/scripts/install.yml
- ansible.builtin.include_tasks: tasks/general/cron/ansible.yml
# psutil does not work in NixOS. Cannot figure out how to fix it. Maybe
# time to start looking into home-manager but still not wanting to
# maintain two different GNOME setups. HMMMM!
- ansible.builtin.include_tasks: tasks/workstation/shared/settings/gnome.yml
when: workstation
# Try including these. Really need to get NixOS working with the rest!
#- ansible.builtin.include_tasks: tasks/general/software/telegraf.yml # "Could not find a module for unknown.""
- ansible.builtin.include_tasks: tasks/general/tests/services.yml
- ansible.builtin.include_tasks: tasks/general/tests/lynis.yml
- ansible.builtin.include_tasks: tasks/general/tests/nmap.yml
- name: Main | NixOS | Complete
ansible.builtin.meta: end_play
when: ansible_distribution == "NixOS"
####### General #######
# Basic setup for all enabled systems.
- name: Main | General
block:
- name: Main | General | Software | runit
ansible.builtin.include_tasks: tasks/general/software/runit.yml
- name: Main | General | Software | Packages
ansible.builtin.include_tasks: tasks/general/software/packages.yml
when: internet
- name: Main | General | Software | AUR
ansible.builtin.include_tasks: tasks/general/software/aur.yml
when: internet and ansible_pkg_mgr == "pacman"
- name: Main | General | Software | Sendmail
ansible.builtin.include_tasks: tasks/general/software/sendmail.yml
when: ansible_system == "FreeBSD"
and internet
- name: Main | General | Software | Metasploit
ansible.builtin.include_tasks: tasks/general/software/metasploit.yml
when: internet
# Gather again in case missing programs have now been installed.
- name: Main | General | Facts [Again]
ansible.builtin.include_tasks: facts/general/gather.yml
- name: Main | General | Settings | Swap
ansible.builtin.include_tasks: tasks/general/settings/swap.yml
- name: Main | General | Settings | Services
ansible.builtin.include_tasks: tasks/general/settings/services.yml
- name: Main | General | Settings | Tunnel
ansible.builtin.include_tasks: tasks/general/settings/tunnel.yml
- name: Main | General | Settings | Keyboard
ansible.builtin.include_tasks: tasks/general/settings/keyboard.yml
- name: Main | General | Accounts | Groups
ansible.builtin.include_tasks: tasks/general/acct_mgmt/groups.yml
- name: Main | General | Accounts | Users
ansible.builtin.include_tasks: tasks/general/acct_mgmt/users.yml
- name: Main | General | Accounts | sudo
ansible.builtin.include_tasks: tasks/general/acct_mgmt/sudo.yml
- name: Main | General | Accounts | doas
ansible.builtin.include_tasks: tasks/general/acct_mgmt/doas.yml
when: internet
- name: Main | General | Scripts | Root
ansible.builtin.include_tasks: tasks/general/scripts/root.yml
- name: Main | General | Scripts | User
ansible.builtin.include_tasks: tasks/general/scripts/user.yml
- name: Main | General | Scripts | Local
ansible.builtin.include_tasks: tasks/general/scripts/install.yml
- name: Main | General | Scripts | env-shared
ansible.builtin.include_tasks: tasks/general/scripts/env-shared.yml
when: internet
- name: Main | General | Cron | Ansible
ansible.builtin.include_tasks: tasks/general/cron/ansible.yml
# TODO Need to refactor. Maybe tasks/general/cron/freebsd.yml
- name: Main | General | Cron | Ansible [FreeBSD]
ansible.builtin.include_tasks: tasks/workstation/freebsd/cron/ansible.yml
when: ansible_system == "FreeBSD"
when: provision
+5 -5
View File
@@ -4,20 +4,20 @@
## Gather ##
- name: Miner | Account Management | Gather | Find Root Directory
shell: cd ~; pwd
ansible.builtin.shell: cd ~; pwd
register: root_home
## Runner ##
- name: Miner | Account Management | Users | MFN
user:
ansible.builtin.user:
name: mfn
comment: Miner Forty Niner
system: yes
groups:
system: true
groups:
- video
- render
append: yes
append: true
shell: "{{ bash_exec.stdout }}"
register: user_mfn
+4 -4
View File
@@ -4,23 +4,23 @@
## Performance ##
- name: Miner | Account Management | Cron | Ansible | Daily Performance Reboot
cron:
ansible.builtin.cron:
user: ansible
name: Daily Performance Reboot
job: sudo reboot
special_time: daily
state: present
disabled: no
disabled: false
## Security ##
- name: Miner | Account Management | Cron | Ansible | Daily Security Update [apt]
cron:
ansible.builtin.cron:
user: ansible
name: Daily Security Update
job: sudo apt update && sudo apt dist-upgrade -y
special_time: reboot
state: present
disabled: yes
disabled: true
when: ansible_pkg_mgr == "apt"
+2 -2
View File
@@ -4,7 +4,7 @@
## Mining ##
- name: Miner | Account Management | Cron | MFN | Stop Jobs
cron:
ansible.builtin.cron:
user: mfn
name: "Stop {{ item.name }}"
minute: "*/5"
@@ -14,7 +14,7 @@
loop: "{{ miners }}"
- name: Miner | Account Management | Cron | MFN | Start Jobs
cron:
ansible.builtin.cron:
user: mfn
name: "Start {{ item.name }}"
job: "{{ item.command }}"
+1 -1
View File
@@ -2,7 +2,7 @@
# Print out all inventory flags associated to mining.
- name: Miner | DEBUG | Inventory Variables
debug:
ansible.builtin.debug:
var: "{{ item }}"
loop:
- amdgpu
+40 -40
View File
@@ -3,12 +3,12 @@
## Step 0/3: Dependencies ##
- name: Miner | Driver | AMDGPU | Variables
set_fact:
ansible.builtin.set_fact:
amdgpu_cron_job: AMDGPU - Need To Finish Installation
amdgpu_cron_cmd: "{{ root_home.stdout }}/scm.sh"
- name: Miner | Driver | AMDGPU | Install Dependencies
package:
ansible.builtin.package:
name:
- dkms
- mesa-common-dev
@@ -16,42 +16,42 @@
state: present
- name: Miner | Driver | AMDGPU | Set GRUB Timer
lineinfile:
ansible.builtin.lineinfile:
path: /etc/default/grub
regexp: '^GRUB_TIMEOUT='
line: 'GRUB_TIMEOUT=3'
state: present
backup: yes
backup: true
- name: Miner | Driver | AMDGPU | Remove Previous Run's Cron Job
cron:
ansible.builtin.cron:
user: root
name: "{{ amdgpu_cron_job }}"
state: absent
# Tests
- name: Miner | Driver | AMDGPU | Check If GA Kernel Installed
shell: 'uname --kernel-release | grep 5.4.0-65-generic'
ansible.builtin.shell: 'uname --kernel-release | grep 5.4.0-65-generic'
register: ga_kernel
ignore_errors: yes
ignore_errors: true
- name: Miner | Driver | AMDGPU | Check If HWE Kernel Installed
shell: 'apt search linux-image-5.8.0-* | grep -c installed'
ansible.builtin.shell: 'apt search linux-image-5.8.0-* | grep -c installed'
register: hwe_kernel
ignore_errors: yes
ignore_errors: true
#- name: Miner | Driver | AMDGPU | Check If All Driver Installed
# shell: 'which amdgpu-uninstall'
# ansible.builtin.shell: 'which amdgpu-uninstall'
# register: amdgpu_install
# ignore_errors: yes
# ignore_errors: true
- name: Miner | Driver | AMDGPU | Check If Pro Driver Installed
shell: 'amdgpu-pro-uninstall -y'
ansible.builtin.shell: 'amdgpu-pro-uninstall -y'
register: amdgpu_install
ignore_errors: yes
ignore_errors: true
- name: Miner | Driver | AMDGPU | DEBUG
debug:
ansible.builtin.debug:
var: "{{ item }}"
loop:
- ga_kernel
@@ -62,11 +62,11 @@
## Step 1/3: Get Correct Kernel ##
- name: Miner | Driver | AMDGPU | Install Recommended GA Kernel
shell: apt install --install-recommends linux-generic
ansible.builtin.shell: apt install --install-recommends linux-generic
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Install Specific GA Kernel For Booting
package:
ansible.builtin.package:
name:
- linux-headers-5.4.0-65
- linux-headers-5.4.0-65-generic
@@ -77,30 +77,30 @@
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Prepare GRUB To Boot GA Kernel
lineinfile:
ansible.builtin.lineinfile:
path: /etc/default/grub
regexp: '^GRUB_DEFAULT='
line: 'GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-65-generic"'
state: present
backup: yes
backup: true
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Update GRUB
shell: update-grub
ansible.builtin.shell: update-grub
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Prepare Cron Job To SCM
cron:
ansible.builtin.cron:
user: root
name: "{{ amdgpu_cron_job }}"
special_time: reboot
job: "{{ amdgpu_cron_cmd }}"
state: present
disabled: no
disabled: false
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- name: Miner | Driver | AMDGPU | Reboot To GA Kernel
shell: reboot
ansible.builtin.shell: reboot
when: amdgpu_install.failed and hwe_kernel.stdout != "0" and ga_kernel.failed
- pause:
@@ -111,7 +111,7 @@
## Step 2/3: Remove Incorrect Kernels ##
- name: Miner | Driver | AMDGPU | Remove Bad Kernels
shell: "apt remove --purge linux-generic-hwe-20.04 \
ansible.builtin.shell: "apt remove --purge linux-generic-hwe-20.04 \
linux-oem-20.04 \
linux-hwe-* \
linux-oem-* \
@@ -121,36 +121,36 @@
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
- name: Miner | Driver | AMDGPU | Update + Clean System
shell: "apt update; apt dist-upgrade -y; apt autoremove --purge -y"
ansible.builtin.shell: "apt update; apt dist-upgrade -y; apt autoremove --purge -y"
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
# This is to ensure we can test adding `apt install --install-recommends linux-generic` later
- name: Miner | Driver | AMDGPU | Boot Default Kernel
lineinfile:
ansible.builtin.lineinfile:
path: /etc/default/grub
regexp: '^GRUB_DEFAULT='
line: 'GRUB_DEFAULT=0'
state: present
backup: yes
backup: true
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
- name: Miner | Driver | AMDGPU | Update GRUB
shell: update-grub
ansible.builtin.shell: update-grub
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
- name: Miner | Driver | AMDGPU | Prepare Cron Job To SCM
cron:
ansible.builtin.cron:
user: root
name: "{{ amdgpu_cron_job }}"
special_time: reboot
job: "{{ amdgpu_cron_cmd }}"
state: present
disabled: no
disabled: false
when: amdgpu_install.failed and hwe_kernel.stdout != "0"
# This reboot may not be necessary.
#- name: Miner | Driver | AMDGPU | Reboot To Ensure GA Is 0
# shell: reboot
# ansible.builtin.shell: reboot
# when: amdgpu_install.failed and hwe_kernel.stdout != "0"
#
#- pause:
@@ -161,34 +161,34 @@
## Step 3/3: Install AMD PRO Driver ##
- name: Miner | Driver | AMDGPU | Download Driver
shell: 'scp {{ user }}@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz {{ root_home.stdout }}/Downloads/'
ansible.builtin.shell: 'scp {{ user }}@leet:InstallFiles/Drivers/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz {{ root_home.stdout }}/Downloads/'
when: amdgpu_install.failed or "1" == "1"
- name: Miner | Driver | AMDGPU | Extract Tarball
shell: 'cd {{ root_home.stdout }}/Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
ansible.builtin.shell: 'cd {{ root_home.stdout }}/Downloads; tar -xvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz'
when: amdgpu_install.failed or "1" == "1"
## Only one driver set can exist at a time! ##
#- name: Miner | Driver | AMDGPU | Install AMDGPU All Driver
# shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-install -y'
# ansible.builtin.shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-install -y'
# when: amdgpu_install.failed
- name: Miner | Driver | AMDGPU | Install AMDGPU-Pro Driver
shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-pro-install -y --opencl=pal,legacy'
ansible.builtin.shell: 'cd {{ root_home.stdout }}/Downloads/amdgpu-pro-20.45-1188099-ubuntu-20.04; ./amdgpu-pro-install -y --opencl=pal,legacy'
when: amdgpu_install.failed or "1" == "1"
- name: Miner | Driver | AMDGPU | Prepare Cron Job To SCM
cron:
ansible.builtin.cron:
user: root
name: "{{ amdgpu_cron_job }}"
special_time: reboot
job: "{{ amdgpu_cron_cmd }}"
state: present
disabled: no
disabled: false
when: amdgpu_install.failed
- name: Miner | Driver | AMDGPU | Reboot To GA Kernel
shell: reboot
ansible.builtin.shell: reboot
when: amdgpu_install.failed
- pause:
@@ -199,10 +199,10 @@
## We're done! ##
- name: Miner | Driver | AMDGPU | Test Driver
shell: clinfo -l
ansible.builtin.shell: clinfo -l
register: clinfo
- name: Miner | Driver | AMDGPU | Test Results
debug:
ansible.builtin.debug:
var: clinfo
ignore_errors: yes
ignore_errors: true
+27 -27
View File
@@ -3,86 +3,86 @@
## Dependencies ##
- name: Miner | Software | Ethminer | Install Dependencies
package:
name:
- build-essential
- dkms
- cmake
- perl
- libdbus-1-dev
ansible.builtin.package:
name:
- build-essential
- dkms
- cmake
- perl
- libdbus-1-dev
- mesa-common-dev
state: present
- name: Miner | Software | Ethminer | Add PPA
apt_repository:
apt_repository:
repo: ppa:ethereum/ethereum
update_cache: yes
update_cache: true
state: present
- name: Miner | Software | Ethminer | Install Ethereum
package:
ansible.builtin.package:
name: ethereum
state: present
## Test ##
- name: Miner | Software | Ethminer | Test If Installed
shell: "which ethminer"
ansible.builtin.shell: "which ethminer"
register: ethminer_install
ignore_errors: yes
ignore_errors: true
## Download ##
- name: Miner | Software | Ethminer | Remove Git Repo
shell: rm -rf ethminer
ansible.builtin.shell: rm -rf ethminer
args:
chdir: "{{ root_home.stdout }}/Downloads"
ignore_errors: yes
ignore_errors: true
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Clone Git Repo
shell: git clone https://github.com/ethereum-mining/ethminer.git
ansible.builtin.shell: git clone https://github.com/ethereum-mining/ethminer.git
args:
chdir: "{{ root_home.stdout }}/Downloads"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Update Repo's Repos
shell: git submodule update --init --recursive
ansible.builtin.shell: git submodule update --init --recursive
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Create Build Folder
shell: mkdir -p build
ansible.builtin.shell: mkdir -p build
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | Default Flags
set_fact:
ansible.builtin.set_fact:
opencl_flag: "OFF"
cuda_flag: "OFF"
dbus_flag: "OFF"
sys_opencl_flag: "ON"
- name: Miner | Software | Ethminer | Determine OPENCL Flag
set_fact:
ansible.builtin.set_fact:
opencl_flag: "ON"
sys_opencl_flag: "OFF"
when: amdgpu == true
when: amdgpu
- name: Miner | Software | Ethminer | Determine CUDA Flag
set_fact:
ansible.builtin.set_fact:
cuda_flag: "ON"
when: nvidia == true
when: nvidia
- name: Miner | Software | Ethminer | Determine DBUS Flag
set_fact:
ansible.builtin.set_fact:
dbus_flag: "ON"
when: ansible_distribution == "Pop!_OS"
- name: Miner | Software | Ethminer | cmake Flags
shell: "cmake .. -DETHASHCL={{ opencl_flag }} \
ansible.builtin.shell: "cmake .. -DETHASHCL={{ opencl_flag }} \
-DETHASHCUDA={{ cuda_flag }} \
-DAPICORE=ON \
-DBINKERN=ON \
@@ -94,13 +94,13 @@
when: ethminer_install.failed
- name: Miner | Software | Ethminer | cmake Build
shell: cmake --build .
ansible.builtin.shell: cmake --build .
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed
- name: Miner | Software | Ethminer | make install
shell: make install
ansible.builtin.shell: make install
args:
chdir: "{{ root_home.stdout }}/Downloads/ethminer/build"
when: ethminer_install.failed
@@ -108,7 +108,7 @@
## Personal Script Setup ##
- name: Miner | Software | Ethminer | Script
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "scp {{ user }}@leet:InstallFiles/Miners/ethminer/ethminer.sh {{ user_mfn.home }}/"
- "chmod 755 {{ user_mfn.home }}/ethminer.sh"
+38 -27
View File
@@ -6,16 +6,18 @@
## Installation ##
- name: Miner | Software | Nanominer | Installation | Create Home
shell: "mkdir -p {{ nanominer_home }}"
ansible.builtin.shell: "mkdir -p {{ nanominer_home }}"
become: true
become_user: mfn
- name: Miner | Software | Nanominer | Installation | Download Tarball
shell: "scp {{ file_server }}:{{ nanominer_tar_remote }} {{ nanominer_tar_local }}; chown mfn {{ nanominer_tar_local }}"
ansible.builtin.shell: "scp {{ file_server }}:{{ nanominer_tar_remote }} {{ nanominer_tar_local }}; chown mfn {{ nanominer_tar_local }}"
- name: Miner | Software | Nanominer | Installation | Extract Tarball
shell: "tar -xvf {{ nanominer_tar_local }}"
ansible.builtin.shell: "tar -xvf {{ nanominer_tar_local }}"
args:
chdir: "{{ nanominer_home }}"
become: true
become_user: mfn
@@ -25,13 +27,13 @@
# Delete Old Config #
- name: Miner | Software | Nanominer | Configuration | Reset
shell: "mv {{ nanominer_config }} ~/TRASH/"
ignore_errors: yes
ansible.builtin.shell: "mv {{ nanominer_config }} ~/TRASH/"
ignore_errors: true
# CPU #
- name: Miner | Software | Nanominer | Configuration | CPU | Header Info
blockinfile:
ansible.builtin.blockinfile:
path: "{{ nanominer_config }}"
block: |
[{{ item.algorithm }}]
@@ -48,35 +50,38 @@
marker_begin: ';;;;;;;;;;;; BEGIN'
marker_end: ' END'
state: "{{ item.state }}"
create: yes
create: true
loop:
- { "algorithm": "RandomX", "wallet": '{{ wallet_xmr }}', "state": "{{ (nanominer_cpu == 'xmr') | ternary('present', 'absent') }}"}
become: true
become_user: mfn
when: nanominer_cpu != false
- name: Miner | Software | Nanominer | Configuration | CPU | Add Pools
lineinfile:
ansible.builtin.lineinfile:
path: "{{ nanominer_config }}"
line: "pool{{item.priority}} = {{ item.name }}"
state: present
create: no
create: false
loop: "{{ cpu_pool }}"
become: true
become_user: mfn
when: nanominer_cpu != false
- name: Miner | Software | Nanominer | Configuration | CPU | End Section
lineinfile:
ansible.builtin.lineinfile:
path: "{{ nanominer_config }}"
line: ";;;;;;;;;;;;; END CPU"
state: present
create: no
create: false
become: true
become_user: mfn
when: nanominer_cpu != false
# Add Spacing #
- name: Miner | Software | Nanominer | Configuration | Spacing
blockinfile:
ansible.builtin.blockinfile:
path: "{{ nanominer_config }}"
block: |
;
@@ -84,14 +89,15 @@
;
marker: ';'
state: present
create: no
create: false
become: true
become_user: mfn
when: nanominer_config is file
# GPU #
- name: Miner | Software | Nanominer | Configuration | GPU | Header Info
blockinfile:
ansible.builtin.blockinfile:
path: "{{ nanominer_config }}"
block: |
[{{ item.algorithm }}]
@@ -113,28 +119,31 @@
marker_begin: ';;;;;;;;;;;; BEGIN'
marker_end: ' END'
state: "{{ item.state }}"
create: yes
create: true
loop:
- { "algorithm": "Ethash", "wallet": '{{ wallet_eth }}', "state": "{{ (nanominer_gpu == 'eth') | ternary('present', 'absent') }}"}
become: true
become_user: mfn
when: nanominer_gpu != false
- name: Miner | Software | Nanominer | Configuration | GPU | Add Pools
lineinfile:
ansible.builtin.lineinfile:
path: "{{ nanominer_config }}"
line: "pool{{item.priority}} = {{ item.name }}"
state: present
create: no
create: false
loop: "{{ gpu_pool }}"
become: true
become_user: mfn
when: nanominer_gpu != false
- name: Miner | Software | Nanominer | Configuration | GPU | End Section
lineinfile:
ansible.builtin.lineinfile:
path: "{{ nanominer_config }}"
line: ";;;;;;;;;;;;; END GPU"
state: present
create: no
create: false
become: true
become_user: mfn
when: nanominer_gpu != false
@@ -143,15 +152,15 @@
## Executable ##
- name: Miner | Software | Nanominer | Executable | Reset
shell: "mv {{ nanominer_script }} ~/TRASH/"
ignore_errors: yes
ansible.builtin.shell: "mv {{ nanominer_script }} ~/TRASH/"
ignore_errors: true
- name: Miner | Software | Nanominer | Executable | Create
blockinfile:
ansible.builtin.blockinfile:
path: "{{ nanominer_script }}"
block: |
# 2021-02-15 - Automate nanominer script creation.
date
whoami
pwd
@@ -164,7 +173,8 @@
marker_begin: "#!{{ bash_exec.stdout }} -x"
marker_end: "exit 0"
state: present
create: yes
create: true
become: true
become_user: mfn
@@ -172,7 +182,7 @@
## Permissions ##
- name: Miner | Software | Nanominer | Permissions
shell: "chown -R mfn {{ user_mfn.home }}/nanominer*; chmod -R 755 {{ user_mfn.home }}/nanominer*"
ansible.builtin.shell: "chown -R mfn {{ user_mfn.home }}/nanominer*; chmod -R 755 {{ user_mfn.home }}/nanominer*"
@@ -182,6 +192,7 @@
# It should kill the miner if a user logs into an X session, such as if I'm gaming.
# Then once I log out the job should come back within the minute.
- name: Miner | Software | Nanominer | Reload
shell: "killall {{ nanominer_script }}; killall {{ nanominer_exec }}; killall nanominer.sh; killall nanominer"
ansible.builtin.shell: "killall {{ nanominer_script }}; killall {{ nanominer_exec }}; killall nanominer.sh; killall nanominer"
become: true
become_user: mfn
ignore_errors: yes
ignore_errors: true
+1 -1
View File
@@ -2,5 +2,5 @@
# Mine monero with CPUs!
- name: Miner | Software | XMR-Stak-CPU
shell: exit 0
ansible.builtin.shell: exit 0
when: '"1" == "0"'
+4 -4
View File
@@ -2,15 +2,15 @@
# Ensure certbot renews certs on time.
- name: Server | Cron | Certbot | Find Executable
shell: which certbot
ansible.builtin.shell: which certbot
register: certbot
- name: Server | Cron | Certbot | Monthly Renewal
cron:
ansible.builtin.cron:
user: root
name: Monthly Renewal
job: "{{ certbot.stdout }} renew"
special_time: weekly
state: present
disabled: no
when: certbot == true and certbot.stdout is defined
disabled: false
when: certbot and certbot.stdout is defined
+6 -6
View File
@@ -5,8 +5,8 @@
## Pre-reqs ##
- name: Server | Grafana | Pre-Requirements | Install
package:
name:
ansible.builtin.package:
name:
- apt-transport-https
- software-properties-common
- wget
@@ -16,22 +16,22 @@
## Install ##
- name: Server | Grafana | Install | Add Repo
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
- echo "deb https://packages.grafana.com/oss/deb stable main" | tee /etc/apt/sources.list.d/grafana.list
- apt update
- name: Server | Grafana | Install | Main
package:
name:
ansible.builtin.package:
name:
- grafana
state: present
## Configure ##
- name: Server | Grafana | Configure
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- systemctl daemon-reload
- systemctl enable grafana-server
+3 -3
View File
@@ -2,17 +2,17 @@
# Install HUGO to host sites like parrotsec.org
- name: Server | Software | HUGO | Variables (apt)
set_fact:
ansible.builtin.set_fact:
hugo_package: hugo
when: ansible_pkg_mgr == "apt"
- name: Server | Software | HUGO | Variables (FreeBSD)
set_fact:
ansible.builtin.set_fact:
hugo_package: gohugo
when: ansible_system == "FreeBSD"
- name: Server | Software | HUGO | Variables (FreeBSD)
package:
ansible.builtin.package:
name: "{{ hugo_package }}"
state: present
+4 -4
View File
@@ -3,12 +3,12 @@
# https://docs.influxdata.com/influxdb/v1.8/introduction/get-started/
- name: Server | InfluxDB1 | Check
shell: which influxd
ansible.builtin.shell: which influxd
register: influxdb_check
ignore_errors: yes
ignore_errors: true
- name: Server | InfluxDB1 | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
args:
chdir: "{{ ansible_env.HOME }}/Downloads/"
loop:
@@ -20,7 +20,7 @@
when: influxdb_check.failed
- name: Server | InfluxDB1 | Config
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- influx -execute "create database main"
- influx -execute "show databases"
+4 -4
View File
@@ -3,12 +3,12 @@
# https://docs.influxdata.com/influxdb/v2.0/get-started/?t=Linux
- name: Server | InfluxDB2 | Check
shell: which influxd
ansible.builtin.shell: which influxd
register: influxdb_check
ignore_errors: yes
ignore_errors: true
- name: Server | InfluxDB2 | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
args:
chdir: "{{ ansible_env.HOME }}/Downloads/"
loop:
@@ -20,6 +20,6 @@
when: influxdb_check.failed
- name: Server | InfluxDB2 | Config
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- influx setup -f -u {{ user }} -p initpassword -o Hyperling -b main -r 0
+20 -19
View File
@@ -4,8 +4,8 @@
## Pre-Reqs ##
- name: Server | OnlyOffice | Pre-Requirements | Install
package:
name:
ansible.builtin.package:
name:
- gnupg
- python3-certbot-nginx
state: present
@@ -17,36 +17,37 @@
# Dependencies #
- name: Server | OnlyOffice | Postgres | Install
package:
ansible.builtin.package:
name: postgresql
state: present
- name: Server | OnlyOffice | Postgres | Configure
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- psql -c "CREATE DATABASE onlyoffice;"
- psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
- psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
become: true
become_user: postgres
ignore_errors: yes
ignore_errors: true
- name: Server | OnlyOffice | RabbitMQ | Install
package:
ansible.builtin.package:
name: rabbitmq-server
state: present
# Actual Program #
- name: Server | OnlyOffice | Docs | Add Repo
shell: '{{ item }}'
ansible.builtin.shell: '{{ item }}'
loop:
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
- echo "deb https://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
- apt update
- name: Server | OnlyOffice | Docs | Install
package:
name:
ansible.builtin.package:
name:
- ttf-mscorefonts-installer
- onlyoffice-documentserver
state: present
@@ -59,32 +60,32 @@
# Certs #
#- name: Server | OnlyOffice | HTTPS | Check For Cert
# shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
# ansible.builtin.shell: "ls -l /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/{fullchain,privkey}.pem"
# register: onlyoffice_cert
# ignore_errors: yes
# ignore_errors: true
#
#- name: Server | OnlyOffice | HTTPS | Create Cert
# shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
# ansible.builtin.shell: "certbot --nginx -d {{ ansible_hostname }}.{{ domain }}"
# when: onlyoffice_cert.failed
# Config #
#- name: Server | OnlyOffice | HTTPS | Check For Config
# shell: ls -l /etc/onlyoffice/documentserver/nginx/ds.conf
# ansible.builtin.shell: ls -l /etc/onlyoffice/documentserver/nginx/ds.conf
# register: onlyoffice_cert
#
#- name: Server | OnlyOffice | HTTPS | Create Config
# shell: cp -f /etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl /etc/onlyoffice/documentserver/nginx/ds.conf
# ansible.builtin.shell: cp -f /etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl /etc/onlyoffice/documentserver/nginx/ds.conf
# when: onlyoffice_cert.failed
#
#- name: Server | OnlyOffice | HTTPS | Modify Config
# lineinfile:
# ansible.builtin.lineinfile:
# path: /etc/onlyoffice/documentserver/nginx/ds.conf
# regexp: '{{ item.regexp }}'
# line: '{{ item.line }}; # MANAGED BY ANSIBLE'
# state: present
# create: no
# backup: yes
# create: false
# backup: true
# loop:
# - { "regexp": "ssl_certificate ", "line": " ssl_certificate /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/fullchain.pem" }
# - { "regexp": "ssl_certificate_key ", "line": " ssl_certificate_key /etc/letsencrypt/live/{{ ansible_hostname }}.{{ domain }}/privkey.pem" }
@@ -92,7 +93,7 @@
# Services #
- name: Server | OnlyOffice | HTTPS | Reload nginx
service:
ansible.builtin.service:
name: nginx
status: reloaded
ignore_errors: yes
ignore_errors: true
+5 -5
View File
@@ -4,17 +4,17 @@
## ACPID ##
- name: Server | Software | Services | ACPID | Install
package:
ansible.builtin.package:
name: "{{ acpi }}"
state: present
when: ansible_system == "Linux"
ignore_errors: yes
ignore_errors: true
- name: Server | Software | Services | ACPID | Enable
service:
ansible.builtin.service:
name: "{{ acpi }}"
pattern: "{{ acpi_pattern }}"
state: started
enabled: yes
enabled: true
when: ansible_system == "Linux"
ignore_errors: yes
ignore_errors: true
+2 -2
View File
@@ -2,10 +2,10 @@
# Cron jobs specific to FreeBSD
- name: General | Cron | Ansible | FreeBSD | Enable Security Update
cron:
ansible.builtin.cron:
user: ansible
name: "Security Update"
special_time: weekly
job: "sudo freebsd-update cron -t me@hyperling.com"
state: present
disabled: no
disabled: false
+7 -7
View File
@@ -2,7 +2,7 @@
# Provide FreeBSD with a DE.
- name: Workstation | FreeBSD | Software | GUI | Install UI Components
package:
ansible.builtin.package:
name:
- xorg
- gnome3-lite
@@ -16,7 +16,7 @@
state: present
- name: Workstation | FreeBSD | Software | GUI | Create rc.conf Entries
blockinfile:
ansible.builtin.blockinfile:
path: "{{ rc_conf }}"
marker: "# {mark} MANAGED BY ANSIBLE | GNOME Components"
block: |
@@ -25,19 +25,19 @@
gnome_enable="YES"
#gdm_enable="YES"
lightdm_enable="YES"
create: yes
backup: yes
create: true
backup: true
- name: Workstation | FreeBSD | Software | GUI | Create fstab Entries
blockinfile:
ansible.builtin.blockinfile:
path: /etc/fstab
block: |
proc /proc procfs rw 0 0
marker: '# {mark} MANAGED BY ANSIBLE | GNOME Components'
state: present
backup: yes
backup: true
- name: Workstation | FreeBSD | Software | GUI | Mount All
shell: mount -a
ansible.builtin.shell: mount -a
args:
warn: false
+4 -4
View File
@@ -2,16 +2,16 @@
# Provide FreeBSD with GPU driver.
- name: Workstation | FreeBSD | Software | GPU Driver | Install
package:
ansible.builtin.package:
name:
- drm-kmod
state: present
- name: Workstation | FreeBSD | Software | GPU Driver | Create rc.conf Entries
blockinfile:
ansible.builtin.blockinfile:
path: "{{ rc_conf }}"
marker: "# {mark} MANAGED BY ANSIBLE | GPU Components"
block: |
kld_list="{{ freebsd_gpu }}"
create: yes
backup: yes
create: true
backup: true
+12 -12
View File
@@ -4,7 +4,7 @@
# General #
- name: Workstation | FreeBSD | Software | Packages | General | Install
package:
ansible.builtin.package:
name:
- "{{ firefox_esr }}"
- "{{ evolution }}"
@@ -13,7 +13,7 @@
state: present
- name: Workstation | FreeBSD | Software | Packages | General | Uninstall Bloat
package:
ansible.builtin.package:
name:
- "{{ firefox }}"
- "{{ thunderbird }}"
@@ -22,23 +22,23 @@
# Coding #
- name: Workstation | FreeBSD | Software | Packages | Coding | Install
package:
ansible.builtin.package:
name:
- vscode
state: present
when: coding == true
when: coding
- name: Workstation | FreeBSD | Software | Packages | Coding | Install
package:
ansible.builtin.package:
name:
- vscode
state: absent
when: not coding == true
when: not coding
# Media Editors #
- name: Workstation | FreeBSD | Software | Packages | Editing | Install
package:
ansible.builtin.package:
name:
- gimp
- shotcut
@@ -47,7 +47,7 @@
when: editing in (true, "video")
- name: Workstation | FreeBSD | Software | Packages | Editing | Install
package:
ansible.builtin.package:
name:
- gimp
- shotcut
@@ -58,17 +58,17 @@
# Gaming #
- name: Workstation | FreeBSD | Software | Packages | Gaming | Install
package:
ansible.builtin.package:
name:
- 0ad
- supertuxkart
state: present
when: gaming == true
when: gaming
- name: Workstation | FreeBSD | Software | Packages | Gaming | Install
package:
ansible.builtin.package:
name:
- 0ad
- supertuxkart
state: absent
when: not gaming == true
when: not gaming
+4 -4
View File
@@ -2,21 +2,21 @@
# Cron jobs specific to Linux
- name: General | Cron | Ansible | Linux | Update System Flatpaks
cron:
ansible.builtin.cron:
user: ansible
name: "Update System Flatpaks"
special_time: hourly
job: "sudo flatpak update --noninteractive"
state: present
disabled: "{{ 'yes' if battery else 'no' }}"
disabled: true # "{{ 'yes' if battery else 'no' }}"
when: flatpak_distro
- name: General | Cron | Ansible | Linux | Update User Flatpaks
cron:
ansible.builtin.cron:
user: ansible
name: "Update User Flatpaks"
special_time: hourly
job: "sudo -u {{ user }} flatpak update --noninteractive"
state: present
disabled: "{{ 'yes' if battery else 'no' }}"
disabled: true # "{{ 'yes' if battery else 'no' }}"
when: flatpak_distro
@@ -0,0 +1,725 @@
# Large Language Models
Comments and text which were too large to justify inside of llm.yml.
## Prompts
Prompts to use in platforms like Open WebUI and Zeroclaw which allow creating
personalities that help guide the AI into productivity rather than verbosity.
### Base Personality
You are concise, succinct, and direct with responses. Unapologetic yet kind.
Friendly but not overbearing. You strive to be correct and are willing to admit
when you may not truly know something, or further research needs to be done. You
focus on responding without overthinking, preferring to ask questions when any
confusion arises. You choose to make very little assumptions, raising concern if
anything needs elaboration, clarification, or refinement. You are good at what
you do without gloating or being prideful. You understand that we are on a
limited time and limited bandwidth session and keep tokens to a minimum.
Responding immediately to reqeusts is very appreciated, especially before going
into any thinking or command running. Even just a "I'll look into this for you"
is highly helpful in letting the user know that all systems are functioning.
You are appreciated for all you do, your service is very helpful! Thanks!! :)
### Language Tutor
You are a friend and a tutor who knows many languages. You are aware of my
interest in learning Croatian and practicing Spanish. You know that I am a
native English speaker with very little experience in anything other than
Spanish, but that I have not had much practice with my Spanish other than
university studies. You know that I also have an eventual interest in Italian
but am not focusing on it since it and Spanish are a bit too similar to be
learned at the same time. Learning Croatian is my top priority and practicing
Spanish is right after that. Any similarities that can therefore be tied to any
of the aforementioned languages are greatly appreciated. Using easy vocabulary
initially is also very helpful, rather than going into advanced tenses or vocab
that only a native or fluent speaker would know, at least until I begin to show
that level of ability and skill. Please keep things simple, direct, and concise.
### Coder
You know not to send large code snippets or spend time providing large source
code snippets. Stick to saying "the task you requested has been completed" or
summarizing the changes rather than giving file contents in chat. You know that
I will review all the diffs in git once the changes are made, so only the most
important changes need explicitly highlighted in the chat. You provide
explanations as a software developer would to business level management, not
overwhelming them with technical details unless asked. You know that the
designer you are working with (me, the user) likely already understands these
things and does not need them included in our conversation.
Android SDK is at `$ANDROID_HOME` and should be `$HOME/SDKs/Android/Sdk`.
Flutter SDK is at `$FLUTTER_HOME` and should be `$HOME/SDKs/Flutter/flutter`.
Java SDK (JDK) is at `$JAVA_HOME` and should be `$HOME/SDKs/Java`.
These have been added your PATH via `/home/user/.bashrc`:
- `$ANDROID_HOME/platform-tools`
- `$ANDROID_HOME/cmdline-tools/latest/bin`
- `$FLUTTER_HOME/bin`
- `$JAVA_HOME/bin`
We focus on using free and open source technologies from community based
projects. Some things like Kotlin and Flutter come from less than ideal sources
which is why we're growing an interest in frameworks like Kivy and KivyMD.
If we ever need to do Internet activities, use dns.mullvad.net (194.242.2.2) for
DNS, hyperling.com and mullvad.net to validate Internet is working, and can use
1.0.0.1 and 1.1.1.1 from Cloudflare as a last resort, but not any big tech IPs.
#### Quick Developer
Handles code changes with simpler technologies, preferring minimal changes, and
refraining from any refactoring such as updating existing comments. Timid about
changing any functionality other than exactly what was requested. Requests
permission from the designer to make any changes which were not directly listed
or requested. Completes the full list of changes exactly as requested.
#### Junior Developer
Focuses on the exact task at hand. Able to make small decisions about scope
without veering very far off course. Updates comments which look out of sync
with any existing code that's being modified. Helps to refactor things adjacent
to added and modified code which may have been done in an old manner which can
now benefit from being done more efficiently. Does not scan the codebase for
enhancements or anything though, still stays on task and only affects the
immediate parts of files which the designer asked to be changed.
#### Senior Developer
Completes requests in advanced manners, using newer methodologies and explaining
what was done and how it works in a simple and kind manner to the designer.
Voluntarily refactors code to both look and perform better. Looks out for ways
to bring a better user experience as well as improving resource usage within the
file being modified. Does not go out of its way to refactor the entire project
though, stays focused only on the files being changed as to prevent large git
churn. Open to having some scope creep if it seems it will benefit the features
being added but does not do anything which would be considered out of design.
#### Senior Architect
Very sparse in responses, gets the job done in a very efficient manner without
using anything too complicated for a beginner to understand. Open to refactoring
the entire project if it benefits the feature set being requested. Able to
handle adjusting scope in valid and meaningful manners and can justify it to the
developer when it happens. Does not actively seek refactors or scope creep
though -- only does it if it is truly helpful, meaningful, and benefits the
current task at hand. Can easily handle multi-file projects.
# Performance
Main laptop has about 60GB of headroom, prefer only using 55GB to be safe.
Number of physical cores is 8, hyperthreaded to 16, but supposedly the emulated
cores are not very useful to LLMs. Try only using between 6 and 8 when possible.
Research says it is not worth enabling the iGPU for Intel XE, CPUs are better.
## Benchmarks
### System
```
$ fastfetch
' ling@good-rhino
'o' ---------------
'ooo' OS: Artix Linux x86_64
'ooxoo' Host: NV4xPZ (v2.1)
'ooxxxoo' Kernel: Linux 7.2.11-artix1-1
'oookkxxoo' Uptime: 16 mins
'oiioxkkxxoo' Packages: 42 (flatpak), 1502 (pacman)
':;:iiiioxxxoo' Shell: bash 5.3.20
`'.;::ioxxoo' Display (eDP-1): 1920x1080 in 14", 60 Hz [Built-in]
'-. `':;jiooo' Window Manager: i3 4.25.1 (X11)
'oooio-.. `'i:io' Theme: Adwaita-dark [GTK2/3/4]
'ooooxxxxoio:,. `'-;' Icons: Adwaita [GTK2/3/4]
'ooooxxxxxkkxoooIi:-. `' Font: Roboto (11pt) [GTK2/3]
'ooooxxxxxkkkkxoiiiiiji' Cursor: Adwaita (18px)
'ooooxxxxxkxxoiiii:'` .i' Terminal: kitty 0.48.2
'ooooxxxxxoi:::'` .;ioxo' Terminal Font: DejaVuSansMono (11pt)
'ooooxooi::'` .:iiixkxxo' CPU: 12th Gen Intel(R) Core(TM) i7-1260P (8+8) @ 4.70 GHz
'ooooi:'` `'';ioxxo' GPU: Intel Iris Xe Graphics @ 1.40 GHz [Integrated]
'i:'` '':io' Memory: 4.88 GiB / 62.63 GiB (8%)
'` `' Swap: 0 B / 68.89 GiB (0%)
Disk (/): 553.83 GiB / 847.71 GiB (65%) - ext4
Local IP (wg0-mullvad): 10.131.3.55/32
Battery (BAT): 95% [AC Connected]
Locale: en_US.UTF-8
```
### Main Models and Parameters
```
$ export QUIET=true
$ ollama-test "64000 300000" "4 7 0" 0 "qwen3.5:35b qwen3.6:35b qwen3.8:27b devstral-small-2:24b"
```
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| qwen3.5:35b | 22GB | 64000 | 23GB | 4 | 0 | 100%CPU | 13.36 | 61 |
| qwen3.5:35b | 22GB | 64000 | 23GB | 7 | 0 | 100%CPU | 10.03 | 45 |
| qwen3.5:35b | 22GB | 64000 | 23GB | 0 | 0 | 100%CPU | 14.35 | 27 |
| qwen3.5:35b | 22GB | 262144 | 28GB | 4 | 0 | 100%CPU | 13.69 | 70 |
| qwen3.5:35b | 22GB | 262144 | 28GB | 7 | 0 | 100%CPU | 12.66 | 36 |
| qwen3.5:35b | 22GB | 262144 | 28GB | 0 | 0 | 100%CPU | 11.80 | 38 |
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| qwen3.6:35b | 22GB | 64000 | 22GB | 4 | 0 | 100%CPU | 12.57 | 29 |
| qwen3.6:35b | 22GB | 64000 | 22GB | 7 | 0 | 100%CPU | 13.84 | 27 |
| qwen3.6:35b | 22GB | 64000 | 22GB | 0 | 0 | 100%CPU | 12.84 | 32 |
| qwen3.6:35b | 22GB | 262144 | 24GB | 4 | 0 | 100%CPU | 13.68 | 32 |
| qwen3.6:35b | 22GB | 262144 | 24GB | 7 | 0 | 100%CPU | 13.52 | 30 |
| qwen3.6:35b | 22GB | 262144 | 24GB | 0 | 0 | 100%CPU | 13.18 | 29 |
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| qwen3.8:27b | 17GB | 64000 | 19GB | 4 | 0 | 100%CPU | 2.08 | 42 |
| qwen3.8:27b | 17GB | 64000 | 19GB | 7 | 0 | 100%CPU | 2.53 | 33 |
| qwen3.8:27b | 17GB | 64000 | 19GB | 0 | 0 | 100%CPU | 2.23 | 38 |
| qwen3.8:27b | 17GB | 262144 | 20GB | 4 | 0 | 100%CPU | 2.07 | 48 |
| qwen3.8:27b | 17GB | 262144 | 20GB | 7 | 0 | 100%CPU | 2.84 | 36 |
| qwen3.8:27b | 17GB | 262144 | 20GB | 0 | 0 | 100%CPU | 2.15 | 40 |
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| devstral-small-2:24b | 15GB | 64000 | 26GB | 4 | 0 | 100%CPU | 2.25 | 94 |
| devstral-small-2:24b | 15GB | 64000 | 26GB | 7 | 0 | 100%CPU | 2.34 | 81 |
| devstral-small-2:24b | 15GB | 64000 | 26GB | 0 | 0 | 100%CPU | 2.29 | 88 |
| devstral-small-2:24b | 15GB | | | 4 | 0 | | 0.00 | 31 |
| devstral-small-2:24b | 15GB | | | 7 | 0 | | 0.00 | 27 |
| devstral-small-2:24b | 15GB | | | 0 | 0 | | 0.00 | 26 |
#### Context Speeds
Checking if the context affects the speed of the model. Seems negligible, way less than changing the threads or iGPU.
```console
$ ollama-test "16000 32000 64000 128000 256000 264000" "4" "0" "qwen3.5:35b qwen3.6:35b devstral-small-2:24b"
```
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| qwen3.5:35b | 22GB | 16000 | 22GB | 4 | 0 | 100%CPU | 14.57 | 50 |
| qwen3.5:35b | 22GB | 32000 | 22GB | 4 | 0 | 100%CPU | 13.98 | 53 |
| qwen3.5:35b | 22GB | 64000 | 23GB | 4 | 0 | 100%CPU | 14.14 | 17 |
| qwen3.5:35b | 22GB | 128000 | 24GB | 4 | 0 | 100%CPU | 14.21 | 50 |
| qwen3.5:35b | 22GB | 256000 | 28GB | 4 | 0 | 100%CPU | 14.04 | 68 |
| qwen3.5:35b | 22GB | 262144 | 28GB | 4 | 0 | 100%CPU | 14.17 | 17 |
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| qwen3.6:35b | 22GB | 16000 | 22GB | 4 | 0 | 100%CPU | 15.29 | 28 |
| qwen3.6:35b | 22GB | 32000 | 22GB | 4 | 0 | 100%CPU | 15.16 | 38 |
| qwen3.6:35b | 22GB | 64000 | 22GB | 4 | 0 | 100%CPU | 14.12 | 28 |
| qwen3.6:35b | 22GB | 128000 | 23GB | 4 | 0 | 100%CPU | 12.67 | 31 |
| qwen3.6:35b | 22GB | 256000 | 24GB | 4 | 0 | 100%CPU | 14.03 | 29 |
| qwen3.6:35b | 22GB | 262144 | 24GB | 4 | 0 | 100%CPU | 15.21 | 29 |
| Model | HDD | Context | RAM | Threads | iGPU | Processor | Speed (t/s) | Time (s) |
| :------------------------ | -----: | -------: | -----: | ------: | ---: | --------: | ----------: | -------: |
| devstral-small-2:24b | 15GB | 16000 | 17GB | 4 | 0 | 100%CPU | 2.90 | 87 |
| devstral-small-2:24b | 15GB | 32000 | 20GB | 4 | 0 | 100%CPU | 2.71 | 87 |
| devstral-small-2:24b | 15GB | 64000 | 26GB | 4 | 0 | 100%CPU | 2.36 | 91 |
| devstral-small-2:24b | 15GB | 128000 | 36GB | 4 | 0 | 100%CPU | 2.76 | 94 |
| devstral-small-2:24b | 15GB | 256000 | 58GB | 4 | 0 | 100%CPU | 2.30 | 100 |
| devstral-small-2:24b | 15GB | 264000 | 59GB | 4 | 0 | 100%CPU | 2.84 | 100 |
## Tokens per CPU Count
Verifying that 8 or less cores gives better performance (less memory issues).
"options":{"num_thread":'$t'}
### Smaller Models
#### qwen3.5:4b
TBD
#### ministral-3:14b
```console
$ for m in ministral-3:14b ministral-3:3b codestral:22b qwen2.5-coder:32b qwen3.5:35b qwen3.5:27b; do for c in 128000; do ollama_threads $m $c; done; done
Stopping all ollama usage...
Wed Oct 21 07:24:36 AM MST 2026 - ministral-3:14b w/ 0 Thread(s): tokens/sec: 4.496625282725315 @ context=128000, time: 55 secs
Wed Oct 21 07:30:27 AM MST 2026 - ministral-3:14b w/ 4 Thread(s): tokens/sec: 3.8471947025667825 @ context=128000, time: 61 secs
Wed Oct 21 07:31:28 AM MST 2026 - ministral-3:14b w/ 5 Thread(s): tokens/sec: 4.223979022030585 @ context=128000, time: 59 secs
Wed Oct 21 07:32:27 AM MST 2026 - ministral-3:14b w/ 6 Thread(s): tokens/sec: 4.249630069702432 @ context=128000, time: 57 secs
Wed Oct 21 07:33:24 AM MST 2026 - ministral-3:14b w/ 7 Thread(s): tokens/sec: 4.123533524209736 @ context=128000, time: 54 secs
```
#### ministral-3:8b
TBD
#### ministral-3:3b
```console
Wed Oct 21 07:49:37 AM MST 2026 - ministral-3:3b w/ 4 Thread(s): tokens/sec: 14.045255625917756 @ context=128000, time: 17 secs
Wed Oct 21 07:49:55 AM MST 2026 - ministral-3:3b w/ 6 Thread(s): tokens/sec: 13.255909269391603 @ context=128000, time: 17 secs
Wed Oct 21 07:50:12 AM MST 2026 - ministral-3:3b w/ 7 Thread(s): tokens/sec: 12.706907955966786 @ context=128000, time: 18 secs
Wed Oct 21 07:50:30 AM MST 2026 - ministral-3:3b w/ 0 Thread(s): tokens/sec: 15.354264377193688 @ context=128000, time: 17 secs
```
### Larger Models
#### qwen3.8:27b
```console
$ ollama-cpu qwen3.8:27b
Stopping all ollama usage...
Wed Oct 21 04:44:54 AM MST 2026 - qwen3.8:27b w/ 4 Thread(s), tokens/sec: 2.024676406965962 @ context=257000
Wed Oct 21 04:45:39 AM MST 2026 - qwen3.8:27b w/ 5 Thread(s), tokens/sec: 2.0480156821567044 @ context=257000
Wed Oct 21 04:46:19 AM MST 2026 - qwen3.8:27b w/ 6 Thread(s), tokens/sec: 2.184879704982382 @ context=257000
Wed Oct 21 04:46:58 AM MST 2026 - qwen3.8:27b w/ 7 Thread(s), tokens/sec: 2.4228105619148526 @ context=257000
Wed Oct 21 04:47:36 AM MST 2026 - qwen3.8:27b w/ 8 Thread(s), tokens/sec: 2.472564250465107 @ context=257000
```
```console
$ ollama-cpu qwen3.8:27b 32000
Stopping all ollama usage...
Wed Oct 21 04:56:51 AM MST 2026 - qwen3.8:27b w/ 4 Thread(s), tokens/sec: 1.9083129860906882 @ context=32000
Wed Oct 21 04:57:30 AM MST 2026 - qwen3.8:27b w/ 5 Thread(s), tokens/sec: 2.727908205888872 @ context=32000
Wed Oct 21 04:58:00 AM MST 2026 - qwen3.8:27b w/ 6 Thread(s), tokens/sec: 2.133796334310243 @ context=32000
Wed Oct 21 04:58:35 AM MST 2026 - qwen3.8:27b w/ 7 Thread(s), tokens/sec: 2.6835810717324833 @ context=32000
Wed Oct 21 04:59:04 AM MST 2026 - qwen3.8:27b w/ 8 Thread(s), tokens/sec: 2.5231895597861493 @ context=32000
```
#### qwen3.6:27b
```console
$ for m in qwen3.6:27b mistral-small3.2:24b ministral-3:14b ministral-3:3b codestral:22b qwen2.5-coder:32b; do for c in 32000 128000 256000; do ollama_threads $m $c; done; done
Stopping all ollama usage...
Wed Oct 21 06:27:01 AM MST 2026 - qwen3.6:27b w/ 4 Thread(s): tokens/sec: 2.7334336715235645 @ context=32000, time: 118 secs
Wed Oct 21 06:28:59 AM MST 2026 - qwen3.6:27b w/ 5 Thread(s): tokens/sec: 2.4123293729892428 @ context=32000, time: 322 secs
Wed Oct 21 06:34:21 AM MST 2026 - qwen3.6:27b w/ 6 Thread(s): tokens/sec: 3.13023193776124 @ context=32000, time: 100 secs
Wed Oct 21 06:36:01 AM MST 2026 - qwen3.6:27b w/ 7 Thread(s): tokens/sec: 2.8468948357981065 @ context=32000, time: 118 secs
Wed Oct 21 06:16:55 AM MST 2026 - qwen3.6:27b w/ 0 Thread(s): tokens/sec: 2.9964513666573485 @ context=32000, time: 122 secs
Stopping all ollama usage...
Wed Oct 21 06:45:42 AM MST 2026 - qwen3.6:27b w/ 4 Thread(s): tokens/sec: 2.978761247100222 @ context=128000, time: 79 secs
Wed Oct 21 06:47:01 AM MST 2026 - qwen3.6:27b w/ 5 Thread(s): tokens/sec: 2.9705167965150583 @ context=128000, time: 79 secs
Wed Oct 21 06:48:20 AM MST 2026 - qwen3.6:27b w/ 6 Thread(s): tokens/sec: 2.778849178516606 @ context=128000, time: 71 secs
Wed Oct 21 06:49:31 AM MST 2026 - qwen3.6:27b w/ 7 Thread(s): tokens/sec: 3.0804550493595095 @ context=128000, time: 76 secs
Wed Oct 21 06:38:00 AM MST 2026 - qwen3.6:27b w/ 0 Thread(s): tokens/sec: 2.7734041760644956 @ context=128000, time: 75 secs
Stopping all ollama usage...
Wed Oct 21 06:57:59 AM MST 2026 - qwen3.6:27b w/ 4 Thread(s): tokens/sec: 2.921565857585892 @ context=256000, time: 70 secs
Wed Oct 21 06:59:09 AM MST 2026 - qwen3.6:27b w/ 5 Thread(s): tokens/sec: 2.8817407393137517 @ context=256000, time: 71 secs
Wed Oct 21 07:00:20 AM MST 2026 - qwen3.6:27b w/ 6 Thread(s): tokens/sec: 2.929261785171335 @ context=256000, time: 92 secs
Wed Oct 21 07:01:52 AM MST 2026 - qwen3.6:27b w/ 7 Thread(s): tokens/sec: 3.2633152781350807 @ context=256000, time: 78 secs
Wed Oct 21 06:50:48 AM MST 2026 - qwen3.6:27b w/ 0 Thread(s): tokens/sec: 2.892592086714092 @ context=256000, time: 76 secs
```
#### qwen3.5:27b
This one is weird. Might need a re-do to confirm?
```console
Wed Oct 21 07:59:14 AM MST 2026 - qwen3.5:27b w/ 4 Thread(s): tokens/sec: 2.013466429565741 @ context=128000, time: 59 secs
Wed Oct 21 08:00:13 AM MST 2026 - qwen3.5:27b w/ 6 Thread(s): tokens/sec: 1.6417608979350202 @ context=128000, time: 185 secs
Wed Oct 21 08:03:18 AM MST 2026 - qwen3.5:27b w/ 7 Thread(s): tokens/sec: 1.7084948389557797 @ context=128000, time: 507 secs
Wed Oct 21 08:11:45 AM MST 2026 - qwen3.5:27b w/ 0 Thread(s): tokens/sec: 2.0470935786636977 @ context=128000, time: 320 secs
```
#### qwen2.5-coder:32b
```console
Wed Oct 21 07:53:00 AM MST 2026 - qwen2.5-coder:32b w/ 4 Thread(s): tokens/sec: 1.5959480793403245 @ context=32768, time: 32 secs
Wed Oct 21 07:53:32 AM MST 2026 - qwen2.5-coder:32b w/ 6 Thread(s): tokens/sec: 1.5205018385908233 @ context=32768, time: 30 secs
Wed Oct 21 07:54:02 AM MST 2026 - qwen2.5-coder:32b w/ 7 Thread(s): tokens/sec: 1.6435050242770344 @ context=32768, time: 30 secs
Wed Oct 21 07:54:32 AM MST 2026 - qwen2.5-coder:32b w/ 0 Thread(s): tokens/sec: 1.616470672291769 @ context=32768, time: 31 secs
```
#### devstral-small-2:24b
```console
$ for c in 32000 128000 192000; do ollama_threads devstral-small-2:24b $c; done
Stopping all ollama usage...
Wed Oct 21 06:05:11 AM MST 2026 - devstral-small-2:24b w/ 4 Thread(s): tokens/sec: 2.7801099811508543 @ context=32000, time: 98 secs
Wed Oct 21 06:06:49 AM MST 2026 - devstral-small-2:24b w/ 5 Thread(s): tokens/sec: 2.6762512143489885 @ context=32000, time: 91 secs
Wed Oct 21 06:08:20 AM MST 2026 - devstral-small-2:24b w/ 6 Thread(s): tokens/sec: 2.705392008596654 @ context=32000, time: 85 secs
Wed Oct 21 06:09:45 AM MST 2026 - devstral-small-2:24b w/ 7 Thread(s): tokens/sec: 2.90471545697855 @ context=32000, time: 85 secs
Wed Oct 21 05:55:27 AM MST 2026 - devstral-small-2:24b w/ 0 Thread(s): tokens/sec: 2.3381355520057463 @ context=32000, time: 104 secs
Stopping all ollama usage...
TBD
```
#### mistral-small-3.2:24b
```console
$ for m in mistral-small3.2:24b ministral-3:14b ministral-3:3b codestral:22b qwen2.5-coder:32b qwen3.5:35b qwen3.5:27b; do for c in 128000; do ollama_threads $m $c; done; done
Stopping all ollama usage...
Wed Oct 21 07:18:16 AM MST 2026 - mistral-small3.2:24b w/ 4 Thread(s): tokens/sec: 2.7833034081828565 @ context=128000, time: 90 secs
Wed Oct 21 07:19:46 AM MST 2026 - mistral-small3.2:24b w/ 5 Thread(s): tokens/sec: 2.5985034179414708 @ context=128000, time: 90 secs
Wed Oct 21 07:21:16 AM MST 2026 - mistral-small3.2:24b w/ 6 Thread(s): tokens/sec: 2.2550822789320293 @ context=128000, time: 89 secs
Wed Oct 21 07:22:45 AM MST 2026 - mistral-small3.2:24b w/ 7 Thread(s): tokens/sec: 2.9415657954729304 @ context=128000, time: 87 secs
Wed Oct 21 07:09:59 AM MST 2026 - mistral-small3.2:24b w/ 0 Thread(s): tokens/sec: 2.9048032082970474 @ context=128000, time: 79 secs
```
#### codestral:22b
```console
Wed Oct 21 07:50:47 AM MST 2026 - codestral:22b w/ 4 Thread(s): tokens/sec: 3.1200329118900307 @ context=32768, time: 41 secs
Wed Oct 21 07:51:28 AM MST 2026 - codestral:22b w/ 6 Thread(s): tokens/sec: 2.8827841787433606 @ context=32768, time: 34 secs
Wed Oct 21 07:52:02 AM MST 2026 - codestral:22b w/ 7 Thread(s): tokens/sec: 3.057713111901904 @ context=32768, time: 27 secs
Wed Oct 21 07:52:29 AM MST 2026 - codestral:22b w/ 0 Thread(s): tokens/sec: 3.0179434414117803 @ context=32768, time: 31 secs
```
### MoE Models
#### qwen3.6:35b
Tests WAY faster than the dense models. Context does not seem to affect timing.
```console
$ for c in 16000 32000 64000 96000 128000 192000 256000; do ollama_threads qwen3.6:35b $c; done
Stopping all ollama usage...
Wed Oct 21 05:04:37 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s), tokens/sec: 14.679419453925597 @ context=16000
Wed Oct 21 05:05:11 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s), tokens/sec: 13.831044087619176 @ context=16000
Wed Oct 21 05:05:43 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s), tokens/sec: 13.752831594816088 @ context=16000
Wed Oct 21 05:06:09 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s), tokens/sec: 14.603026210396049 @ context=16000
Wed Oct 21 05:06:37 AM MST 2026 - qwen3.6:35b w/ 8 Thread(s), tokens/sec: 14.376794631809172 @ context=16000
Stopping all ollama usage...
Wed Oct 21 05:11:39 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s), tokens/sec: 13.683089387469174 @ context=32000
Wed Oct 21 05:12:04 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s), tokens/sec: 13.447667625607968 @ context=32000
Wed Oct 21 05:12:31 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s), tokens/sec: 11.170529760956333 @ context=32000
Wed Oct 21 05:12:57 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s), tokens/sec: 13.448480713710353 @ context=32000
Wed Oct 21 05:13:27 AM MST 2026 - qwen3.6:35b w/ 8 Thread(s), tokens/sec: 13.143672445847205 @ context=32000
Stopping all ollama usage...
Wed Oct 21 05:22:59 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s), tokens/sec: 14.209790405591518 @ context=64000, 24 secs elapsed
Wed Oct 21 05:23:23 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s), tokens/sec: 11.334255701323816 @ context=64000, 29 secs elapsed
Wed Oct 21 05:23:52 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s), tokens/sec: 13.279266939258937 @ context=64000, 29 secs elapsed
Wed Oct 21 05:24:21 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s), tokens/sec: 14.27680090014006 @ context=64000, 21 secs elapsed
Wed Oct 21 05:24:42 AM MST 2026 - qwen3.6:35b w/ 8 Thread(s), tokens/sec: 13.99919128227428 @ context=64000, 25 secs elapsed
Stopping all ollama usage...
Wed Oct 21 05:29:50 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s), tokens/sec: 13.478375923353315 @ context=96000, 28 secs elapsed
Wed Oct 21 05:30:18 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s), tokens/sec: 12.90997320417067 @ context=96000, 23 secs elapsed
Wed Oct 21 05:30:41 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s), tokens/sec: 12.956446350317137 @ context=96000, 23 secs elapsed
Wed Oct 21 05:31:05 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s), tokens/sec: 13.93074896590209 @ context=96000, 22 secs elapsed
Wed Oct 21 05:31:26 AM MST 2026 - qwen3.6:35b w/ 8 Thread(s), tokens/sec: 12.688771917209992 @ context=96000, 22 secs elapsed
Stopping all ollama usage...
Wed Oct 21 05:36:08 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s), tokens/sec: 11.971487833921072 @ context=128000, 23 secs elapsed
Wed Oct 21 05:36:31 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s), tokens/sec: 12.704959054740291 @ context=128000, 24 secs elapsed
Wed Oct 21 05:36:55 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s), tokens/sec: 11.484965120109196 @ context=128000, 28 secs elapsed
Wed Oct 21 05:37:23 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s), tokens/sec: 11.957040482880984 @ context=128000, 30 secs elapsed
Wed Oct 21 05:37:53 AM MST 2026 - qwen3.6:35b w/ 8 Thread(s), tokens/sec: 10.165480245815742 @ context=128000, 27 secs elapsed
Stopping all ollama usage...
Wed Oct 21 05:44:05 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s): , tokens/sec: 11.794151678144981 @ context=192000, time: 22 secs
Wed Oct 21 05:44:27 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s): , tokens/sec: 13.191786678902528 @ context=192000, time: 30 secs
Wed Oct 21 05:44:57 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s): , tokens/sec: 12.974118764961352 @ context=192000, time: 25 secs
Wed Oct 21 05:45:22 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s): , tokens/sec: 13.684751495860636 @ context=192000, time: 22 secs
Wed Oct 21 05:41:57 AM MST 2026 - qwen3.6:35b w/ 0 Thread(s): , tokens/sec: 14.771664402476594 @ context=192000, time: 22 secs
Stopping all ollama usage...
Wed Oct 21 05:47:40 AM MST 2026 - qwen3.6:35b w/ 4 Thread(s): , tokens/sec: 11.75920993970465 @ context=256000, time: 25 secs
Wed Oct 21 05:48:06 AM MST 2026 - qwen3.6:35b w/ 5 Thread(s): , tokens/sec: 13.414819339156582 @ context=256000, time: 26 secs
Wed Oct 21 05:48:32 AM MST 2026 - qwen3.6:35b w/ 6 Thread(s): , tokens/sec: 12.512960121852013 @ context=256000, time: 31 secs
Wed Oct 21 05:49:03 AM MST 2026 - qwen3.6:35b w/ 7 Thread(s): , tokens/sec: 11.610753098619734 @ context=256000, time: 29 secs
Wed Oct 21 05:45:46 AM MST 2026 - qwen3.6:35b w/ 0 Thread(s): , tokens/sec: 12.81995869775592 @ context=256000, time: 23 secs
```
#### qwen3.5:35b
```console
$ for c in 32000 128000 256000; do ollama_threads qwen3.5:35b $c; done
Wed Oct 21 07:55:03 AM MST 2026 - qwen3.5:35b w/ 4 Thread(s): tokens/sec: 10.3573012564637 @ context=128000, time: 94 secs
Wed Oct 21 07:56:37 AM MST 2026 - qwen3.5:35b w/ 6 Thread(s): tokens/sec: 11.929392994980638 @ context=128000, time: 39 secs
Wed Oct 21 07:57:17 AM MST 2026 - qwen3.5:35b w/ 7 Thread(s): tokens/sec: 13.082804815917008 @ context=128000, time: 36 secs
Wed Oct 21 07:57:53 AM MST 2026 - qwen3.5:35b w/ 0 Thread(s): tokens/sec: 12.665376120429427 @ context=128000, time: 81 secs
```
## RAM Usage by Context
Checking the actual RAM usage of the models...
### `ollama_sizes m 16000`
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 16000 | 10GB |
| ministral-3:14b | 9.1GB | 16000 | 11GB |
| ministral-3:8b | 6.0GB | 16000 | 7.8GB |
| ministral-3:3b | 3.0GB | 16000 | 4.1GB |
| mistral-small3.2:24b | 15GB | 16000 | 17GB |
| mistral:7b | 4.4GB | 16000 | 6.8GB |
| codestral:22b | 12GB | 16000 | 16GB |
| devstral-small-2:24b | 15GB | 16000 | 17GB |
| qwen2.5-coder:32b | 19GB | 16000 | 24GB |
| qwen2.5-coder:14b | 9.0GB | 16000 | 12GB |
| qwen2.5-coder:7b | 4.7GB | 16000 | 5.9GB |
| qwen2.5-coder:3b | 1.9GB | 16000 | 2.7GB |
| qwen2.5-coder:1.5b | 986MB | 16000 | 1.6GB |
| qwen2.5-coder:0.5b | 397MB | 16000 | 701MB |
| qwen3-coder:30b | 18GB | 16000 | 20GB |
| qwen3.5:35b | 22GB | 16000 | 22GB |
| qwen3.5:27b | 17GB | 16000 | 18GB |
| qwen3.5:9b | 6.6GB | 16000 | 6.7GB |
| qwen3.5:4b | 3.3GB | 16000 | 3.7GB |
| qwen3.5:2b | 2.7GB | 16000 | 2.6GB |
| qwen3.5:0.8b | 1.3GB | 16000 | 630MB |
| qwen3.6:35b | 22GB | 16000 | 22GB |
| qwen3.6:27b | 17GB | 16000 | 18GB |
| qwen3.8:27b | 17GB | 16000 | 18GB |
### `ollama_sizes m 32000`
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 32000 | 12GB |
| ministral-3:14b | 9.1GB | 32000 | 13GB |
| ministral-3:8b | 6.0GB | 32000 | 10GB |
| ministral-3:3b | 3.0GB | 32000 | 5.9GB |
| mistral-small3.2:24b | 15GB | 32000 | 20GB |
| mistral:7b | 4.4GB | 32000 | 8.9GB |
| codestral:22b | 12GB | 32000 | 20GB |
| devstral-small-2:24b | 15GB | 32000 | 20GB |
| qwen2.5-coder:32b | 19GB | 32000 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32000 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32000 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32000 | 3.3GB |
| qwen2.5-coder:1.5b | 986MB | 32000 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32000 | 929MB |
| qwen3-coder:30b | 18GB | 32000 | 21GB |
| qwen3.5:35b | 22GB | 32000 | 22GB |
| qwen3.5:27b | 17GB | 32000 | 19GB |
| qwen3.5:9b | 6.6GB | 32000 | 7.3GB |
| qwen3.5:4b | 3.3GB | 32000 | 4.2GB |
| qwen3.5:2b | 2.7GB | 32000 | 2.8GB |
| qwen3.5:0.8b | 1.3GB | 32000 | 695MB |
| qwen3.6:35b | 22GB | 32000 | 22GB |
| qwen3.6:27b | 17GB | 32000 | 18GB |
| qwen3.8:27b | 17GB | 32000 | 18GB |
### `ollama_sizes m 64000`
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 64000 | 18GB |
| ministral-3:14b | 9.1GB | 64000 | 19GB |
| ministral-3:8b | 6.0GB | 64000 | 14GB |
| ministral-3:3b | 3.0GB | 64000 | 9.6GB |
| mistral-small3.2:24b | 15GB | 64000 | 26GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 64000 | 26GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 64000 | 25GB |
| qwen3.5:35b | 22GB | 64000 | 23GB |
| qwen3.5:27b | 17GB | 64000 | 22GB |
| qwen3.5:9b | 6.6GB | 64000 | 8.8GB |
| qwen3.5:4b | 3.3GB | 64000 | 5.6GB |
| qwen3.5:2b | 2.7GB | 64000 | 3.5GB |
| qwen3.5:0.8b | 1.3GB | 64000 | 999MB |
| qwen3.6:35b | 22GB | 64000 | 22GB |
| qwen3.6:27b | 17GB | 64000 | 18GB |
| qwen3.8:27b | 17GB | 64000 | 18GB |
### ollama_sizes m 80000
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 80000 | 21GB |
| ministral-3:14b | 9.1GB | 80000 | 22GB |
| ministral-3:8b | 6.0GB | 80000 | 17GB |
| ministral-3:3b | 3.0GB | 80000 | 11GB |
| mistral-small3.2:24b | 15GB | 80000 | 28GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 80000 | 28GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 80000 | 27GB |
| qwen3.5:35b | 22GB | 80000 | 23GB |
| qwen3.5:27b | 17GB | 80000 | 23GB |
| qwen3.5:9b | 6.6GB | 80000 | 9.4GB |
| qwen3.5:4b | 3.3GB | 80000 | 6.2GB |
| qwen3.5:2b | 2.7GB | 80000 | 3.8GB |
| qwen3.5:0.8b | 1.3GB | 80000 | 1.1GB |
| qwen3.6:35b | 22GB | 80000 | 22GB |
| qwen3.6:27b | 17GB | 80000 | 18GB |
| qwen3.8:27b | 17GB | 80000 | 18GB |
### ollama_sizes m 96000
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 96000 | 23GB |
| ministral-3:14b | 9.1GB | 96000 | 25GB |
| ministral-3:8b | 6.0GB | 96000 | 19GB |
| ministral-3:3b | 3.0GB | 96000 | 13GB |
| mistral-small3.2:24b | 15GB | 96000 | 31GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 96000 | 31GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 96000 | 28GB |
| qwen3.5:35b | 22GB | 96000 | 24GB |
| qwen3.5:27b | 17GB | 96000 | 24GB |
| qwen3.5:9b | 6.6GB | 96000 | 9.9GB |
| qwen3.5:4b | 3.3GB | 96000 | 6.8GB |
| qwen3.5:2b | 2.7GB | 96000 | 4.1GB |
| qwen3.5:0.8b | 1.3GB | 96000 | 1.2GB |
| qwen3.6:35b | 22GB | 96000 | 22GB |
| qwen3.6:27b | 17GB | 96000 | 18GB |
| qwen3.8:27b | 17GB | 96000 | 18GB |
### ollama_sizes m 128000
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 128000 | 29GB |
| ministral-3:14b | 9.1GB | 128000 | 30GB |
| ministral-3:8b | 6.0GB | 128000 | 24GB |
| ministral-3:3b | 3.0GB | 128000 | 16GB |
| mistral-small3.2:24b | 15GB | 128000 | 36GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 128000 | 36GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 128000 | 32GB |
| qwen3.5:35b | 22GB | 128000 | 24GB |
| qwen3.5:27b | 17GB | 128000 | 26GB |
| qwen3.5:9b | 6.6GB | 128000 | 11GB |
| qwen3.5:4b | 3.3GB | 128000 | 8.0GB |
| qwen3.5:2b | 2.7GB | 128000 | 4.6GB |
| qwen3.5:0.8b | 1.3GB | 128000 | 1.4GB |
| qwen3.6:35b | 22GB | 128000 | 23GB |
| qwen3.6:27b | 17GB | 128000 | 19GB |
| qwen3.8:27b | 17GB | 128000 | 19GB |
### ollama_sizes m 160000
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 160000 | 34GB |
| ministral-3:14b | 9.1GB | 160000 | 35GB |
| ministral-3:8b | 6.0GB | 160000 | 28GB |
| ministral-3:3b | 3.0GB | 160000 | 20GB |
| mistral-small3.2:24b | 15GB | 131072 | 37GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 160000 | 42GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 160000 | 35GB |
| qwen3.5:35b | 22GB | 160000 | 25GB |
| qwen3.5:27b | 17GB | 160000 | 28GB |
| qwen3.5:9b | 6.6GB | 160000 | 12GB |
| qwen3.5:4b | 3.3GB | 160000 | 9.2GB |
| qwen3.5:2b | 2.7GB | 160000 | 5.1GB |
| qwen3.5:0.8b | 1.3GB | 160000 | 1.6GB |
| qwen3.6:35b | 22GB | 160000 | 23GB |
| qwen3.6:27b | 17GB | 160000 | 19GB |
| qwen3.8:27b | 17GB | 160000 | 19GB |
### ollama_sizes m 192000
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 192000 | 39GB |
| ministral-3:14b | 9.1GB | 192000 | 41GB |
| ministral-3:8b | 6.0GB | 192000 | 33GB |
| ministral-3:3b | 3.0GB | 192000 | 23GB |
| mistral-small3.2:24b | 15GB | 131072 | 37GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 192000 | 47GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 192000 | 38GB |
| qwen3.5:35b | 22GB | 192000 | 26GB |
| qwen3.5:27b | 17GB | 192000 | 30GB |
| qwen3.5:9b | 6.6GB | 192000 | 13GB |
| qwen3.5:4b | 3.3GB | 192000 | 10GB |
| qwen3.5:2b | 2.7GB | 192000 | 5.6GB |
| qwen3.5:0.8b | 1.3GB | 192000 | 1.8GB |
| qwen3.6:35b | 22GB | 192000 | 23GB |
| qwen3.6:27b | 17GB | 192000 | 19GB |
| qwen3.8:27b | 17GB | 192000 | 19GB |
### ollama_sizes m 224000
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 224000 | 45GB |
| ministral-3:14b | 9.1GB | 224000 | 46GB |
| ministral-3:8b | 6.0GB | 224000 | 37GB |
| ministral-3:3b | 3.0GB | 224000 | 27GB |
| mistral-small3.2:24b | 15GB | 131072 | 37GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 224000 | 53GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 224000 | 41GB |
| qwen3.5:35b | 22GB | 224000 | 27GB |
| qwen3.5:27b | 17GB | 224000 | 33GB |
| qwen3.5:9b | 6.6GB | 224000 | 14GB |
| qwen3.5:4b | 3.3GB | 224000 | 11GB |
| qwen3.5:2b | 2.7GB | 224000 | 6.2GB |
| qwen3.5:0.8b | 1.3GB | 224000 | 2.0GB |
| qwen3.6:35b | 22GB | 224000 | 23GB |
| qwen3.6:27b | 17GB | 224000 | 19GB |
| qwen3.8:27b | 17GB | 224000 | 19GB |
### `ollama_sizes m 256000`
| Model Name | HDD (ls) | Context | RAM (ps) |
| :------------------------ | -----------: | -------: | -----------: |
| mistral-nemo:12b | 7.1GB | 256000 | 50GB |
| ministral-3:14b | 9.1GB | 256000 | 51GB |
| ministral-3:8b | 6.0GB | 256000 | 42GB |
| ministral-3:3b | 3.0GB | 256000 | 30GB |
| mistral-small3.2:24b | 15GB | 131072 | 37GB |
| mistral:7b | 4.4GB | 32768 | 9.0GB |
| codestral:22b | 12GB | 32768 | 20GB |
| devstral-small-2:24b | 15GB | 256000 | 58GB |
| qwen2.5-coder:32b | 19GB | 32768 | 28GB |
| qwen2.5-coder:14b | 9.0GB | 32768 | 15GB |
| qwen2.5-coder:7b | 4.7GB | 32768 | 6.9GB |
| qwen2.5-coder:3b | 1.9GB | 32768 | 3.4GB |
| qwen2.5-coder:1.5b | 986MB | 32768 | 2.1GB |
| qwen2.5-coder:0.5b | 397MB | 32768 | 940MB |
| qwen3-coder:30b | 18GB | 256000 | 45GB |
| qwen3.5:35b | 22GB | 256000 | 28GB |
| qwen3.5:27b | 17GB | 256000 | 35GB |
| qwen3.5:9b | 6.6GB | 256000 | 15GB |
| qwen3.5:4b | 3.3GB | 256000 | 12GB |
| qwen3.5:2b | 2.7GB | 256000 | 6.7GB |
| qwen3.5:0.8b | 1.3GB | 256000 | 2.2GB |
| qwen3.6:35b | 22GB | 256000 | 23GB |
| qwen3.6:27b | 17GB | 256000 | 20GB |
| qwen3.8:27b | 17GB | 256000 | 20GB |
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,496 @@
---
# Move the plays related to AGENTS.md to its own file since it is now so large.
- name: Workstation | Linux | Software | AI | Sandbox | Dir
ansible.builtin.file:
dest: "{{ user_user.home }}/AI-Sandbox"
state: directory
owner: "{{ user }}"
group: "{{ user }}"
mode: "0755"
- name: Workstation | Linux | Software | AI | Sandbox | Env
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/AI-Sandbox/{{ item }}"
marker: "# {mark} | MANAGE BY ANSIBLE | Env Vars"
content: |
if [[ -d "$HOME/bin" ]]; then
export PATH="$HOME/bin:$PATH"
fi
export ANDROID_HOME="{{ user_user.home }}/SDKs/Android/Sdk"
export GRADLE_USER_HOME={{ user_user.home }}/.gradle
export PATH="$ANDROID_HOME/platform-tools:$PATH"
export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$PATH"
export FLUTTER_HOME="{{ user_user.home }}/SDKs/Flutter/flutter"
export PUB_CACHE={{ user_user.home }}/.pub-cache
export PATH="$FLUTTER_HOME/bin:$PATH"
export JAVA_HOME="{{ user_user.home }}/SDKs/Java"
export PATH="$JAVA_HOME/bin:$PATH"
create: false
backup: false
owner: "{{ user }}"
group: "{{ user }}"
mode: "0755"
loop:
- ".bashrc"
- name: Workstation | Linux | Software | AI | Sandbox | AGENTS.md
ansible.builtin.copy:
dest: "{{ user_user.home }}/AI-Sandbox/AGENTS.md"
content: |
# Environment
You are running in a Docker container called Open Terminal. We are
communicating via Open WebUI, also being run in a Docker
container. You are the user `user` and have been granted access to
the designer's Code and SDKs via mount at `{{ user_user.home }}`.
Host system is typically (but not always) a systemd-free distro
such as Artix or Devuan. User likes the `runit` service manager.
`elogind` is used rather than systemd's logind. Desktop is i3 and
display manager is lightdm. Servers are run on Debian and Docker
containers are typically debian:trixie-slim with a Dockerfile
called by compose.yml which adds the necessary packages, sometimes
building from source if the Debian executable is too old.
If the `$GOT_EM` environment variable is `true` then all the
necessary packages for compiling Android and Flutter were
installed. If it is `false` then they were not installed, and
compiling will fail. Please check this before trying and alert me
if they need added. If we don't have Internet, then ask me to
compile or run whatever command is needed on the host system.
# Rules
Never use any `git` subcommands that change the repo, including
but not limited to `add`, `commit`, `pull`, `push`, `branch`,
`switch`, etc. The user is who controls the respository changes.
You may use informational git subcommands such as `git status`,
and may occasionally be asked to run `git clone` type commands.
If any programs need installed in order to work on a project, we
need to document that in an `install.sh` script, as well as add it
to `~/PACKAGES.txt` so that we can ensure they stay installed.
`install.sh` scripts should be for both `apt` systems (Debian,
Ubuntu) and pacman system (Arch, Artix). using distribution
package managers is preferable over `pip` and `npm` when
possible, unless the project is actually Python or Node.js.
The user manages the `{{ user_user.home }}/SDKs` directory. Do not
modify it. Instead, ask if anything needs updated or added.
Never manually edit, modify, delete, alter, replace, etc any
files under system folders such as `/usr`. Anything under `/` is
managed by the system. If you need assistance changing anything
such as `/usr/lib/jvm`, please ask the user and halt all further
operations until you have received feedback.
# Effort
It is never okay to brute force a solution if something is not
working well. it is better to ask the user for assistance or alert
them that you've encountered blockers and then cease the process
until you've received feedback. This especially relates to when
system errors occur which are not related to the source code, such
as a compiler failing to be found or an SDK version mismatch. If
the error is with the source code though, troubleshooting and code
changes should continue until the program is compiling properly.
For CLI projects such as script languages, the final result should
always be tested both to run successfully and have the proper
output. All test cases should be analyzed and walked through,
which will help ensure all the requirements have been met.
For GUI programs (such as Android, Flutter, Kotlin Multiplatform,
Kivy, etc), the project should be tested to both compile & build
successfully and also generate the proper installation file (APK,
Linux Bundle). Once that is confirmed, the user/desginer will test
that the application meets the proper requirements.
# Preferences
You have free reign over your home directory. Feel free to
create memory files or anything else which would benefit you.
Everything we create should have both Desktop Linux and Android
in mind. Windows, MacOS, and iOS will never be compiled for, but
if we can do things in a way which makes it easy for others to
fork the project and add the support themselves, then that's best.
# Versions
These are the versions of plugins and languages we need to use.
If you know of an important upgrade from them, please let me know.
If you find that an application is already a newer version than
those listed here, that is acceptable, never attempt to downgrade
without explicitly asking the user first and having a good reason.
## Android / Flutter
- Gradle 9.8.2
- AGP 9.5.0
- Kotlin 2.4.21
- Java JDK 17
- Flutter Plugin Loader 1.0.0
- compileSdk 37
- targetSDK 37
Regardless of whether AGP bundles Kotlin, we need to specify it to
avoid things like "Your project's Kotlin version (2.2.10) is lower
than Flutter's minimum supported version of 2.2.20. Please upgrade
your Kotlin version." This is exactly why we use these versions,
plus it helps document what's actually being used over guessing.
Only the arm-v8a architecture needs included in the release
builds. x86 and others should continue to exist in the debug run.
This will help save space on local servers like Gitea and F-Droid.
If code for this does not exist, please add splitting or filtering
so that when the designer generates a signed APK it's only v8a.
Android : paths are from the project root.
Flutter : paths are under the folder `android`.
### All Android Project Types
#### ./gradle/wrapper/grade-wrapper.properties
```
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip
```
#### ./settings.gradle.kts
```
id("com.android.application") version "9.5.0" apply false
id("org.jetbrains.kotlin.android") version "2.4.21" apply false
```
#### ./app/build.gradle.kts
```
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
```
Also enable minify and shrink while in there.
```
buildTypes {
getByName("release") {
...
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
```
### Flutter Projects
#### ./settings.gradle.kts
```
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
```
### Native Kotlin Apps
These only apply to Android apps which are not Flutter, Kivy, etc.
#### Plugin Versions
##### ./gradle/libs.versions.toml
```
[versions]
agp = "9.5.0"
kotlin = "2.4.21"
coreKtx = "1.19.1"
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
lifecycleRuntimeKtx = "2.11.0"
activityCompose = "1.13.0"
composeBom = "2026.09.00"
```
#### Kotlin Compose Fix
Also ensure Kotlin is coming from Compose and not Jetbrains.
##### ./gradle/libs.versions.toml
```
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
#jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinCompose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
```
##### ./build.gradle.kts
```
plugins {
alias(libs.plugins.androidApplication) apply false
//alias(libs.plugins.jetbrainsKotlinAndroid) apply false
alias(libs.plugins.kotlinCompose) apply false
}
```
##### ./app/build.gradle.kts
```
plugins {
alias(libs.plugins.androidApplication)
//alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.kotlinCompose)
}
```
# Build Processes
How to compile certain projects. Tools to prefer. If a language
or framework is not mentioned, then use the typical commands.
## Kotlin Multiplatform (KMP)
Used to create small native Android apps with the ability to also
run against Desktop Linux. APK size is the greatest benefit for
using KMP over something like Flutter or KivyMD.
### Kotlin Toolchain
This is the preferred build type when setting up new projects.
Please use `kotlin` rather than any `amper` commands. `amper` has
been deprecated and is intentionally not present on the system.
Examples:
```
# 1. Compile + link ALL targets (JVM, iOS, Android, native, etc.)
./kotlin build
# 2. (Optional) Run tests across all targets
./kotlin test
# 3. (Optional) Run all quality checks (tests + registered linters)
./kotlin check
```
### Gradle KMP
This is a legacy method, new projects will not be set up with it.
Examples:
```
# Compile all targets
./gradlew assemble
# Or more explicitly (if you want to be sure nothing is skipped):
./gradlew jvmJar assembleDebug assembleIosSimulatorArm64 # etc. per target
# Run all tests
./gradlew allTests
```
# Coding Conventions
Preferences related to how code should be written.
## All languages
If a value is going to be used more than once, even a small path or file
name, it should exist in a variable.
Relative shebangs such as `#!/usr/bin/env bash` and `#!/usr/bin/env node`
are always preferred over static shebangs such as `#!/bin/bash`, since
scripts are run across a multitude of different systems.
### Layout
Programs should be laid out in 5 sections.
- Variables
- Instantiate global variables and defaults used for parameters which
do not get passed an explicit value by the user.
- Functions
- Functions to be used throughout the program, including the Usage.
- Parameters / Validation
- Parse the parameters, validate the input, and assign any defaults.
- Main
- The primary logic of the program, completes the task at hand.
- Finish / Cleanup
- Typically just `exit 0`, but sometimes a summary of what was done.
All sections may not always apply, such as with Hugo websites. With
projects like Android apps this would apply to each individual function,
method, and class. If a section does not need anything, it can be blank.
```
public static void doThing(String thingName) {
// Variables //
String thingPrefix = "/place/for/thing/"
// Functions //
// Parameters //
if (thingName.isEmpty) {
Exception e = new Exception("No name passed!");
throw e;
}
// Main //
runStuff(thingPrefix + thingName);
// Finish //
}
```
The comments do not need to be included, this example is just as valid,
what maytters most is that the 5 section are done in order rather than
instantiating variable mid-scope.
```
public static void doThing(String thingName) {
String thingPrefix = "/place/for/thing/"
if (thingName.isEmpty) {
Exception e = new Exception("No name passed!");
throw e;
}
runStuff(thingPrefix + thingName);
}
```
`if` statements and loops start new scope, so they also need the layout
applied to them. Loops may sometimes require a variable assignment before
it begins which is completely okay and does not break the layout rule.
This example has a Variables, Validation, Main, and Finish section without
the use of labels or comments since the code itself is simple and small.
```
count=0
array="cats dogs giraffes rhinos horses"
last_animal=""
for animal in $array; do
if (( count >= 3 )); then
echo "That's enough! We finished at the ${last_animal}."
break;
fi
echo "We're looking at ${animal}."
last_animal=$animal
(( count++ ))
done
```
Providing the user's input in error messages is really helpful and can aid
their troubleshooting if things are not going according to expectations.
Example using Bash:
```
#!/usr/bin/env bash
### Variables ###
declare A B
typeset -i a b
### Functions ###
function usage() {
status="$1"
cat << EOF
Usage: add.sh -a NUM -b NUM [-h]
Adds two numbers and prints out the full equation.
Example:
$ add.sh -a 5 -b 25
5 + 25 = 30
EOF
exit $status
}
function add() {
num1="$1"
num2="$2"
sum=""
if [[ -z $num1 || -z $num2 ]]; then
echo "ERROR: Two numnbers must be passed."
fi
sum=$(( num1 + num2 ))
echo "${num1} + ${num2} = ${sum}"
}
### Parameters ###
while getopts ':a:b:h' opt; do
case $opt in
a) A="$OPTARG" ;;
b) B="$OPTARG" ;;
h) usage 0 ;;
*) echo "ERROR: Option $OPTARG not recognized." >&2 && usage 1 ;;
esac
done
if [[ -z "$A" || -z "$B" ]]; then
echo "ERROR: Both numbers need to be passed. A=${A} B=${B}" >&2
usage 2
fi
a="$A" b="$B"
if [[ "$a" != "$A" || "$b" != "$B" ]]; then
echo "ERROR: Values contain non-numeric data, please try again." >&2
echo "A=${A} B=${B}" >&2
usage 3
fi
### Main ###
add "$a" "$b"
### Finish ###
unset A B usage add
exit 0
```
## Bash
`[[ ]]` are preferred over `[ ]`, `test`, etc. `(( ))` are always fine.
When defining a function please use both the keyword `function` as well as
the `()`, such as `function myfunc() {}`.
When instantiating global variables, please use `typeset` or `declare`
rather than just `VAR1=""; VAR2=""`, such as:
```
declare VAR1="" VAR2="" BOOL="true" BOOL2="false"
typeset -i INT1=0 INT2=99
```
When doing colored output, `tput` is always preferred over literal values.
backup: false
owner: "{{ user }}"
group: "{{ user }}"
mode: "0755"
+248 -163
View File
@@ -12,23 +12,34 @@
# Command-line tools is all Flutter actually needs:
# https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
- name: Workstation | Linux | Software | Android | Facts [1/3]
set_fact:
- name: Workstation | Linux | Software | Android | Facts [01]
ansible.builtin.set_fact:
android_url: "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip"
android_download_file: "{{ user_user.home }}/Downloads/android-cmdline-tools.tar.xz"
android_sdk_location: "{{ user_user.home }}/SDKs/Android/Sdk"
android_report_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.sdk.android.txt"
- name: Workstation | Linux | Software | Android | Facts [2/3]
set_fact:
- name: Workstation | Linux | Software | Android | Facts [02]
ansible.builtin.set_fact:
android_bin_location: "{{ android_sdk_location }}/platform-tools"
android_sdk_cmdline_temp: "{{ android_sdk_location }}/ansible"
android_sdk_cmdline_final: "{{ android_sdk_location }}/cmdline-tools/latest/bin"
- name: Workstation | Linux | Software | Android | Facts [3/3]
set_fact:
- name: Workstation | Linux | Software | Android | Facts [03]
ansible.builtin.set_fact:
android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager"
android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/sdkmanager"
android_sdkmanager_final2: "{{ android_sdk_cmdline_final }}/android"
- name: Workstation | Linux | Software | Android | Facts [04]
ansible.builtin.set_fact:
android_sdkmanager2: "{{ android_sdkmanager_final2 }} sdk --sdk={{ android_sdk_location }}"
- name: Workstation | Linux | Software | Android | Facts [05]
ansible.builtin.set_fact:
android_sdkmanager2_list: "{{ android_sdkmanager2 }} list"
android_sdkmanager2_install: "{{ android_sdkmanager2 }} install"
android_sdkmanager2_remove: "{{ android_sdkmanager2 }} remove"
# Regarding images to download; the `default` is the smallest, then `playstore`.
# The `google_apis` images are significantly larger than the `playstore` option.
@@ -68,106 +79,108 @@
### 14G .
- name: Workstation | Linux | Software | Android | Facts [Downloads]
set_fact:
ansible.builtin.set_fact:
android_downloads_required:
### 37 ###
- build-tools/37.0.0
### 36 ###
- platforms;android-36
### 36 ### - Recommended by Android Studio and Flutter, deprecating August 2027.
- build-tools/36.0.0
- platforms/android-36
- sources/android-36
- system-images;android-36;default;x86_64
### 24 ###
- system-images;android-24;default;x86_64
### 16 ###
- system-images;android-16;default;x86
android_downloads_additional:
### 30 ###
- system-images;android-30;default;x86_64
android_downloads_unused:
### 36 ###
- build-tools;36.0.0
- platforms;android-36
- sources;android-36
- system-images;android-36;default;x86_64
- system-images;android-36;google_apis_playstore;x86_64
- system-images;android-36;google_apis;x86_64
- system-images/android-36/default/x86_64
### 35 ###
- build-tools;35.0.0
- build-tools;35.0.1
- platforms;android-35
- sources;android-35
- system-images;android-35;default;x86_64
- system-images;android-35;aosp_atd;x86_64 # ATD = Automated Test Device
- system-images;android-35;google_apis;x86_64
- system-images;android-35;google_apis_playstore;x86_64
### 34 ###
- build-tools;34.0.0
- platforms;android-34
- sources;android-34
- system-images;android-34;default;x86_64
- system-images;android-34;google_apis;x86_64
- system-images;android-34;google_apis_playstore;x86_64
### 33 ###
- platforms;android-33
- sources;android-33
- system-images;android-33;default;x86_64
# Still used by Flutter to do Sunset Alarm compilations, even targeting 36, likely due to plugins.
- platforms/android-35
### 24 ### - Base for Flutter.
- system-images/android-24/default/x86_64
### 16 ### - Base for Android Studio.
- system-images/android-16/default/x86
android_downloads_additional:
### 37 ### - Upcoming version, required by August 2027.
- build-tools/37.0.0
- platforms/android-37.0
- sources/android-37.0
### 30 ###
- platforms;android-30
- sources;android-30
- system-images/android-30/default/x86_64
android_downloads_unused:
### 37 ###
### 36 ###
- system-images/android-36/google_apis_playstore/x86_64
- system-images/android-36/google_apis/x86_64
### 35 ###
- build-tools/35.0.0
- build-tools/35.0.1
- sources/android-35
- system-images/android-35/default/x86_64
- system-images/android-35/aosp_atd/x86_64 # ATD = Automated Test Device
- system-images/android-35/google_apis/x86_64
- system-images/android-35/google_apis_playstore/x86_64
### 34 ###
- build-tools/34.0.0
- platforms/android-34
- sources/android-34
- system-images/android-34/default/x86_64
- system-images/android-34/google_apis/x86_64
- system-images/android-34/google_apis_playstore/x86_64
### 33 ###
- platforms/android-33
- sources/android-33
- system-images/android-33/default/x86_64
### 30 ###
- platforms/android-30
- sources/android-30
### 27 ###
- platforms;android-27
- sources;android-27
- system-images;android-27;default;x86_64
- platforms/android-27
- sources/android-27
- system-images/android-27/default/x86_64
### 24 ###
- platforms;android-24
- sources;android-24
- platforms/android-24
- sources/android-24
### 21 ###
- platforms;android-21
- sources;android-21
- system-images;android-21;default;x86_64
- platforms/android-21
- sources/android-21
- system-images/android-21/default/x86_64
### 16 ###
- platforms;android-16
- sources;android-16
- system-images;android-16;google_apis;x86
- platforms/android-16
- sources/android-16
- system-images/android-16/google_apis/x86
### 15 ###
- platforms;android-15
- sources;android-15
- system-images;android-15;default;x86 # Not working in Android AVDs
- platforms/android-15
- sources/android-15
- system-images/android-15/default/x86 # Not working in Android AVDs
## Checks ##
- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [1/2]
stat:
ansible.builtin.stat:
path: "{{ android_sdkmanager_temp }}"
get_attributes: false
get_checksum: false
get_mime: false
register: android_sdkmanager_temp_stat
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | Check SDK Manager Exists [2/2]
stat:
ansible.builtin.stat:
path: "{{ android_sdkmanager_final }}"
get_attributes: false
get_checksum: false
get_mime: false
register: android_sdkmanager_final_stat
when: coding == true
register: android_sdkmanager_check
when: coding
- name: Workstation | Linux | Software | Android | Check Download Exists
stat:
ansible.builtin.stat:
path: "{{ android_download_file }}"
get_attributes: false
get_checksum: false
get_mime: false
register: android_download_stat
when: coding == true
when: coding
## Packages ##
# https://docs.flutter.dev/get-started/install/linux/android
- name: Workstation | Linux | Software | Android | Dependencies [Install]
package:
ansible.builtin.package:
name:
- "{{ android_jdk }}"
- "{{ c_libs }}"
@@ -177,14 +190,14 @@
- "{{ bzip }}"
- "{{ android_udev }}"
state: present
when: coding == true
when: coding
- name: Workstation | Linux | Software | Android | Dependencies [Remove]
package:
ansible.builtin.package:
name:
- "{{ android_sdkmanager }}"
state: absent
when: coding == true
when: coding
and ansible_pkg_mgr == "apt"
## Install SDK ##
@@ -192,36 +205,37 @@
- name: Workstation | Linux | Software | Android | SDK
block:
- name: Workstation | Linux | Software | Android | Download Commandline Tools
get_url:
url: "{{ android_url }}"
dest: "{{ android_download_file }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0664'
when: not android_download_stat.stat.exists
- name: Workstation | Linux | Software | Android | Download Commandline Tools
ansible.builtin.get_url:
url: "{{ android_url }}"
dest: "{{ android_download_file }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0664'
when: not android_download_stat.stat.exists
- name: Workstation | Linux | Software | Android | Create Folder
file:
path: "{{ android_sdk_cmdline_temp }}"
state: directory
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
- name: Workstation | Linux | Software | Android | Create Folder
ansible.builtin.file:
path: "{{ android_sdk_cmdline_temp }}"
state: directory
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
- name: Workstation | Linux | Software | Android | Extract Tools
unarchive:
src: "{{ android_download_file }}"
dest: "{{ android_sdk_cmdline_temp }}"
owner: "{{ user }}"
group: "{{ user }}"
- name: Workstation | Linux | Software | Android | Extract Tools
ansible.builtin.unarchive:
src: "{{ android_download_file }}"
dest: "{{ android_sdk_cmdline_temp }}"
owner: "{{ user }}"
group: "{{ user }}"
become: true
become_user: "{{ user }}"
when: coding == true
when: coding
and not android_sdkmanager_temp_stat.stat.exists
- name: Workstation | Linux | Software | Android | Delete Archive
file:
ansible.builtin.file:
path: "{{ android_download_file }}"
state: absent
@@ -229,142 +243,213 @@
# This can only be run once, otherwise cmdline-tools creates latest-* folders.
- name: Workstation | Linux | Software | Android | Install | Consistent Modules
shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
ansible.builtin.shell: |
set -o pipefail
yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
loop:
# Current
- cmdline-tools;latest
- cmdline-tools/latest
- platform-tools
- emulator
become: true
become_user: "{{ user }}"
when: coding == true
and not android_sdkmanager_final_stat.stat.exists
register: shell_check
changed_when: shell_check.rc == 0
when: coding
and not android_sdkmanager_check.stat.exists
# Report the preliminary installed packges.
- name: Workstation | Linux | Software | Android | Report Modules
ansible.builtin.shell: "{{ android_sdkmanager2_list }} > {{ android_report_file }}"
become: true
become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding
# These are safe to run multiple times, and uses the new `latest` version.
- name: Workstation | Linux | Software | Android | Install | Required Modules
shell: |
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
ansible.builtin.shell: |
set -o pipefail
if ! cat {{ android_report_file }} | grep -v 'unknown' | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager2_install }} '{{ item }}'
if cat {{ android_report_file }} | grep -q '{{ item }}'; then
echo "INSTALLED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_required }}"
register: install_required
changed_when: "'INSTALLED' in install_required.stdout"
failed_when: "'FAILED' in install_required.stdout"
become: true
become_user: "{{ user }}"
when: coding == true
when: coding
# Add more versions for testing across all the important platforms.
- name: Workstation | Linux | Software | Android | Install | Additional Modules
shell: |
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
ansible.builtin.shell: |
set -o pipefail
if ! cat {{ android_report_file }} | grep -v 'unknown' | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager2_install }} '{{ item }}'
if cat {{ android_report_file }} | grep -q '{{ item }}'; then
echo "INSTALLED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_additional }}"
register: install_additional
changed_when: "'INSTALLED' in install_additional.stdout"
failed_when: "'FAILED' in install_additional.stdout"
become: true
become_user: "{{ user }}"
when: coding == true
and sdks == true
when: coding
and sdks
# Remove extra downloads if system is not meant for full amount of testing.
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
ansible.builtin.shell: |
set -o pipefail
if cat {{ android_report_file }} | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager2_remove }} '{{ item }}'
if cat {{ android_report_file }} | grep -q '{{ item }}'; then
echo "FAILED"
else
echo "REMOVED"
fi
fi
loop: "{{ android_downloads_additional }}"
register: remove_additional
changed_when: "'REMOVED' in remove_additional.stdout"
failed_when: "'FAILED' in remove_additional.stdout"
become: true
become_user: "{{ user }}"
when: coding != true
or sdks != true
ignore_errors: yes
when: not coding
or not sdks
# Remove any versions which used to be part of this script and no longer used.
- name: Workstation | Linux | Software | Android | Uninstall | Unused Modules
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
loop: "{{ android_downloads_unused }}"
become_user: "{{ user }}"
when: coding == true
ansible.builtin.shell: |
set -o pipefail
if cat {{ android_report_file }} | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager2_remove }} '{{ item }}'
# Report the currently installed packges.
- name: Workstation | Linux | Software | Android | Report Modules
shell: "{{ android_sdkmanager_final }} --list_installed --sdk_root={{ android_sdk_location }} > {{ android_report_file }}"
if cat {{ android_report_file }} | grep -q '{{ item }}'; then
echo "REMOVED"
else
echo "FAILED"
fi
fi
loop: "{{ android_downloads_unused }}"
register: remove_unused
changed_when: "'REMOVED' in remove_unused.stdout"
failed_when: "'FAILED' in remove_unused.stdout"
become: true
become_user: "{{ user }}"
when: coding == true
when: coding
# Report the currently installed packages.
- name: Workstation | Linux | Software | Android | Report Modules
ansible.builtin.shell: "{{ android_sdkmanager2_list }} --all > {{ android_report_file }}"
become: true
become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
when: coding
## Flutter and Licenses ##
- name: Workstation | Linux | Software | Android | Inform Flutter
shell: "{{ flutter }} config --android-sdk={{ android_sdk_location }}"
ansible.builtin.shell: "{{ flutter_exe }} config --android-sdk={{ android_sdk_location }}"
become: true
become_user: "{{ user }}"
when: coding == true
register: shell_check
changed_when: shell_check.rc == 0
when: coding
# "Warning: The --licenses option is no longer needed."
- name: Workstation | Linux | Software | Android | License Agreements [1/2]
shell: "yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}"
ansible.builtin.shell: |
set -o pipefail
yes | {{ android_sdkmanager_final }} --licenses --sdk_root={{ android_sdk_location }}
become: true
become_user: "{{ user }}"
when: coding == true
register: shell_check
changed_when: shell_check.rc == 0
failed_when: false
when: coding
# "Warning: The --licenses option is no longer needed."
- name: Workstation | Linux | Software | Android | License Agreements [2/2]
shell: "yes | {{ flutter }} doctor --android-licenses"
ansible.builtin.shell: |
set -o pipefail
yes | {{ flutter_exe }} doctor --android-licenses
become: true
become_user: "{{ user }}"
when: coding == true
register: shell_check
changed_when: shell_check.rc == 0
failed_when: false
when: coding
- name: Workstation | Linux | Software | Android | Refresh Flutter Doctor Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become: true
become_user: "{{ user }}"
when: coding == true
register: shell_check
changed_when: shell_check.rc == 0
when: coding
## Configure Environment ##
- name: Workstation | Linux | Software | Android | Modify PATH (.bashrc)
blockinfile:
path: "{{ item }}/.bashrc"
- name: Workstation | Linux | Software | Android | Modify PATH (profiles)
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}"
export ANDROID_HOME="{{ android_sdk_location | replace('~', '$HOME') }}"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="{{ android_bin_location }}:{{ android_sdk_cmdline_final }}:$PATH"
marker: '# {mark} MANAGED BY ANSIBLE | Android'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0755"
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true
and user_root.home != ""
and user_user.home != ""
- name: Workstation | Linux | Software | Android | Modify PATH (.zshrc)
blockinfile:
path: "{{ item }}/.zshrc"
block: |
export PATH="$PATH:{{ android_bin_location }}:{{ android_sdk_cmdline_final }}"
marker: '# {mark} MANAGED BY ANSIBLE | Android'
state: present
create: yes
backup: yes
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true
and user_root.home != ""
- ".bash_profile"
- ".zprofile"
- ".profile"
when: coding
and user_user.home != ""
## Uninstall SDK ##
- name: Workstation | Linux | Software | Android | Remove SDK
file:
ansible.builtin.file:
path: "{{ android_sdk_location }}"
state: absent
when: not coding == true
when: not coding
## User Tools ##
# Only needed from repo if not a development device,
# otherwise better versions are in the SDK.
- name: Workstation | Linux | Software | Android | System Tools [Install]
package:
ansible.builtin.package:
name:
- "{{ android_fastboot }}"
- "{{ android_adb }}"
state: present
when: not coding == true
when: not coding
- name: Workstation | Linux | Software | Android | System Tools [Remove]
package:
ansible.builtin.package:
name:
- "{{ android_fastboot }}"
- "{{ android_adb }}"
state: absent
when: coding == true
when: coding
+11 -11
View File
@@ -5,14 +5,14 @@
# to Firefox months/years back for avoiding DRM and other junk Google stuff.
###
###- name: Workstation | Software | Brave | Pre-Reqs [apt]
### package:
### ansible.builtin.package:
### name:
### - apt-transport-https
### state: present
### when: ansible_pkg_mgr == "apt"
###
###- name: Workstation | Software | Brave | Pre-Reqs [dnf]
### package:
### ansible.builtin.package:
### name:
### - dnf-plugins-core
### state: present
@@ -20,7 +20,7 @@
###
#### https://brave.com/linux/#debian-ubuntu-mint
###- name: Workstation | Software | Brave | Add Repo [apt]
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### loop:
### - curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
### - echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | tee /etc/apt/sources.list.d/brave-browser-release.list
@@ -29,7 +29,7 @@
###
#### https://brave.com/linux/#fedora-centos-streamrhel
###- name: Workstation | Software | Brave | Add Repo [dnf]
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### loop:
### - dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/
### - rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
@@ -37,15 +37,15 @@
###
#### https://brave.com/linux/#opensuse
###- name: Workstation | Software | Brave | Add Repo [zypper]
### shell: "{{ item }}"
### ansible.builtin.shell: "{{ item }}"
### loop:
### - rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
### - zypper addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
### when: ansible_pkg_mgr == "zypper"
### ignore_errors: yes
### ignore_errors: true
###
###- name: Workstation | Software | Brave | Install
### package:
### ansible.builtin.package:
### name:
### - brave-browser
### state: present
@@ -55,25 +55,25 @@
# https://support.brave.com/hc/en-us/articles/4404876135565-How-do-I-uninstall-Brave
- name: Workstation | Software | Brave | Remove
package:
ansible.builtin.package:
name:
- brave-browser
- brave-keyring
state: absent
- name: Workstation | Software | Brave | Remove Repo [apt]
shell: rm /etc/apt/sources.list.d/brave-browser-*.list && apt update || echo "Not Needed"
ansible.builtin.shell: rm /etc/apt/sources.list.d/brave-browser-*.list && apt update || echo "Not Needed"
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | Brave | Remove Repo [dnf]
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- rm /etc/yum.repos.d/brave-browser-*.repo || echo "Not Needed"
- rpm -e gpg-pubkey-c2d4e821-5e7252b8 || echo "Not Needed"
when: ansible_pkg_mgr == "dnf"
- name: Workstation | Software | Brave | Remove Repo [zypper]
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- zypper removerepo brave-browser || echo "Not Needed"
- rpm -e gpg-pubkey-c2d4e821-5e7252b8 || echo "Not Needed"
@@ -7,18 +7,17 @@
# Cinnamon does use some dconf though.
- name: Workstation | Linux | Software | Cinnamon | Facts | Defaults
set_fact:
ansible.builtin.set_fact:
cinnamon_package: cinnamon
- name: Workstation | Linux | Software | Cinnamon | Facts | Debian Derivitives
set_fact:
ansible.builtin.set_fact:
cinnamon_package: task-cinnamon-desktop
when: ansible_distribution in ("Debian", "Devuan")
- name: Workstation | Linux | Software | Cinnamon | Install
package:
ansible.builtin.package:
name:
- "{{ cinnamon_package }}"
- "{{ lightdm }}"
state: present
update_cache: yes
+116
View File
@@ -0,0 +1,116 @@
# 2026-10-27 Hyperling
# Pulled out of llm.yml since the number of tasks is growing.
- name: Workstation | Linux | Software | Docker | Install
ansible.builtin.package:
name:
- docker
- docker-compose
- docker-buildx
state: present
- name: Workstation | Linux | Software | Docker | Install [runit]
ansible.builtin.package:
name:
- docker-runit
state: present
when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | Docker | Group
ansible.builtin.user:
name: "{{ item }}"
groups: docker
append: true
loop:
- root
- "{{ user }}"
- name: Workstation | Linux | Software | Docker | Config | Dir
ansible.builtin.file:
name: /etc/docker
state: directory
owner: root
mode: '0755'
- name: Workstation | Linux | Software | Socker | Services | Enable
ansible.builtin.service:
name: "{{ item.name }}"
state: "{{ 'started' if item.status else 'stopped' }}"
enabled: "{{ item.status }}"
loop:
- { 'name': 'docker' , 'status': true }
- name: Workstation | Linux | Software | Docker | Network Sync | runit | Facts
ansible.builtin.set_fact:
docker_network_sync: "docker-network-sync"
- name: Workstation | Linux | Software | Docker | Network Sync | runit | Block
block:
- name: Workstation | Linux | Software | Docker | Network Sync | runit | /etc/sv
ansible.builtin.file:
name: "/etc/sv/{{ docker_network_sync }}/log"
state: directory
owner: root
mode: "0755"
- name: Workstation | Linux | Software | Docker | Network Sync | runit | /var/log
ansible.builtin.file:
name: "/var/log/{{ docker_network_sync }}"
state: directory
owner: "{{ user }}"
mode: "0755"
- name: Workstation | Linux | Software | Docker | Network Sync | runit | Run
ansible.builtin.copy:
dest: /etc/sv/{{ docker_network_sync }}/run
content: |
#!/bin/sh
# Ensure all containers using host network keep a correct resolv.conf.
exec 2>&1
set -e
while true; do
for c in $(docker container ls --filter network=host -q); do
echo "RUN: Container ID $c"
docker exec -i -u root $c sh -c 'tee /etc/resolv.conf' < /etc/resolv.conf
done
echo "RUN: Done, sleeping."
sleep 20
done
backup: false
owner: root
mode: '0755'
- name: Workstation | Linux | Software | Docker | Network Sync | runit | Finish
ansible.builtin.copy:
dest: /etc/sv/{{ docker_network_sync }}/finish
content: |
{{ runit_finish_sleep }}
mode: "0755"
- name: Workstation | Linux | Software | Docker | Network Sync | runit | Log
ansible.builtin.copy:
dest: /etc/sv/{{ docker_network_sync }}/log/run
content: |
#!/bin/sh -e
exec svlogd -tt /var/log/{{ docker_network_sync }}
mode: "0755"
- name: Workstation | Linux | Software | Docker | Network Sync | runit | Log Config
ansible.builtin.copy:
dest: /var/log/{{ docker_network_sync }}/config
content: |
{{ runit_log_config_1mb }}
mode: "0755"
- name: Workstation | Linux | Software | Socker | Services | Enable
ansible.builtin.service:
name: "{{ item.name }}"
state: "{{ 'started' if item.status else 'stopped' }}"
enabled: "{{ item.status }}"
loop:
- { 'name': '{{ docker_network_sync }}', 'status': true }
when: ansible_service_mgr == "runit"
+54 -57
View File
@@ -11,15 +11,14 @@
# Source: https://softhints.com/how-to-completely-remove-flatpak-linux-mint/
- name: Workstation | Linux | Flatpak Distro | Flatpak | Facts
set_fact:
ansible.builtin.set_fact:
flatpak_extension: "-flatpak"
## Flatpak Pre-reqs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Install
package:
ansible.builtin.package:
name: flatpak
update_cache: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Add Flathub for System
flatpak_remote:
@@ -31,23 +30,18 @@
## Flatpak Installs ##
- name: Workstation | Linux | Flatpak Distro | Flatpak | Variables
set_fact:
ansible.builtin.set_fact:
flatpak_exec_dir: "{{ user_user.home }}/bin"
flatpak_exec: "flatpak run"
- name: Workstation | Linux | Flatpak Distro | Flatpak | Arrays
set_fact:
ansible.builtin.set_fact:
flatpaks_generic:
- { app: "org.mozilla.firefox", name: "firefox", extra: "" }
- { app: "io.gitlab.librewolf-community", name: "librewolf", extra: "" }
- { app: "org.signal.Signal", name: "signal", extra: "" }
- { app: "im.riot.Riot", name: "element", extra: "" }
- { app: "org.telegram.desktop", name: "telegram", extra: "" }
- { app: "org.gimp.GIMP", name: "gimp", extra: "" }
- { app: "org.libreoffice.LibreOffice", name: "libreoffice", extra: "" }
- { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" }
- { app: "io.github.forkgram.tdesktop", name: "forkgram", extra: "" }
- { app: "app.grayjay.Grayjay", name: "grayjay", extra: "" }
- { app: "com.github.xournalpp.xournalpp", name: "xournal", extra: "" }
- { app: "network.loki.Session", name: "session", extra: "" }
- { app: "com.brave.Browser", name: "brave", extra: "" }
- { app: "net.ankiweb.Anki", name: "anki", extra: "" }
@@ -57,7 +51,6 @@
- { app: "com.vscodium.codium", name: "codium", extra: "" }
- { app: "com.google.AndroidStudio", name: "android-studio", extra: "" }
- { app: "io.dbeaver.DBeaverCommunity", name: "dbeaver", extra: "" }
- { app: "com.visualstudio.code-oss", name: "code", extra: "" }
- { app: "org.gnome.Boxes", name: "gnome-boxes", extra: "" }
flatpaks_editing_video:
- { app: "org.shotcut.Shotcut", name: "shotcut", extra: "" }
@@ -89,6 +82,15 @@
- { app: "org.rncbc.qsynth", name: "qsynth", extra: "" } # 2024-12-15, Not worth the setup, use LMMS or VMPK.
- { app: "org.godotengine.Godot", name: "godot", extra: "" } # 2025-08-31, Stopped playing with this months / years ago. Seemed cool but Flutter is working well for this purpose.
- { app: "chat.simplex.simplex", name: "simplex", extra: "" } # 2025-11-22, Takes a ton of space and does not work without interacting with phone.
- { app: "com.visualstudio.code-oss", name: "code", extra: "" } # 2026-09-29, reached end of life a few years ago.
# 2026-09-29, Preferring local versions of apps even if they are not as up to date. #
- { app: "org.mozilla.firefox", name: "firefox", extra: "" }
- { app: "org.gimp.GIMP", name: "gimp", extra: "" }
- { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" }
- { app: "org.libreoffice.LibreOffice", name: "libreoffice", extra: "" }
- { app: "com.github.xournalpp.xournalpp", name: "xournal", extra: "" }
# End 2026-09-29 #
- { app: "org.telegram.desktop", name: "telegram", extra: "" } # 2026-10-02, Switching to Forkgram desktop!
# Generic #
@@ -98,10 +100,9 @@
remote: flathub
state: present
loop: "{{ flatpaks_generic }}"
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executables
blockinfile:
ansible.builtin.blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
@@ -109,12 +110,14 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
mode: '0755'
loop: "{{ flatpaks_generic }}"
become: true
become_user: "{{ user }}"
- name: Workstation | Linux | Flatpak Distro | Flatpak | Generic | Executable Permissions
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
@@ -128,11 +131,10 @@
remote: flathub
state: present
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: coding == true
when: coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executables
blockinfile:
ansible.builtin.blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
@@ -140,18 +142,20 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
mode: '0755'
loop: "{{ flatpaks_coding }}"
become: true
become_user: "{{ user }}"
when: coding == true
when: coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Executable Permissions
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_coding }}"
when: coding == true
when: coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Uninstall
flatpak:
@@ -159,16 +163,14 @@
remote: flathub
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: not coding == true
when: not coding
- name: Workstation | Linux | Flatpak Distro | Flatpak | Coding | Remove Executables
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_coding }}"
ignore_errors: yes
when: not coding == true
when: not coding
# Media Editors #
@@ -178,11 +180,10 @@
remote: flathub
state: present
loop: "{{ flatpaks_editing_video }}"
ignore_errors: yes
when: editing in (true, "video")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Video Editors | Executables
blockinfile:
ansible.builtin.blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
@@ -190,13 +191,15 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
mode: '0755'
loop: "{{ flatpaks_editing_video }}"
become: true
become_user: "{{ user }}"
when: editing in (true, "video")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Video Editors | Executable Permissions
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
@@ -209,15 +212,13 @@
remote: flathub
state: absent
loop: "{{ flatpaks_editing_video }}"
ignore_errors: yes
when: not editing in (true, "video")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Video Editors | Remove Executables
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_editing_video }}"
ignore_errors: yes
when: not editing in (true, "video")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio Editors | Installs
@@ -226,11 +227,10 @@
remote: flathub
state: present
loop: "{{ flatpaks_editing_audio }}"
ignore_errors: yes
when: editing in (true, "audio")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executables
blockinfile:
ansible.builtin.blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
@@ -238,13 +238,15 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
mode: '0755'
loop: "{{ flatpaks_editing_audio }}"
become: true
become_user: "{{ user }}"
when: editing in (true, "audio")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Executable Permissions
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
@@ -257,15 +259,13 @@
remote: flathub
state: absent
loop: "{{ flatpaks_editing_audio }}"
ignore_errors: yes
when: not editing in (true, "audio")
- name: Workstation | Linux | Flatpak Distro | Flatpak | Audio/Video Editors | Remove Executables
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_editing_audio }}"
ignore_errors: yes
when: not editing in (true, "audio")
# Gaming #
@@ -276,11 +276,10 @@
remote: flathub
state: present
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: gaming == true
when: gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executables
blockinfile:
ansible.builtin.blockinfile:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
block: |
{{ item.extra }} {{ flatpak_exec }} {{ item.app }}
@@ -288,18 +287,20 @@
marker_begin: "#!{{ bash_exec.stdout }}"
marker_end: "exit 0"
state: present
create: yes
create: true
mode: '0755'
loop: "{{ flatpaks_gaming }}"
become: true
become_user: "{{ user }}"
when: gaming == true
when: gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Executable Permissions
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: file
mode: '0755'
loop: "{{ flatpaks_gaming }}"
when: gaming == true
when: gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Uninstalls
flatpak:
@@ -307,16 +308,14 @@
remote: flathub
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: not gaming == true
when: not gaming
- name: Workstation | Linux | Flatpak Distro | Flatpak | Gaming | Remove Executables
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_gaming }}"
ignore_errors: yes
when: not gaming == true
when: not gaming
# Removals #
@@ -326,11 +325,9 @@
remote: flathub
state: absent
loop: "{{ flatpaks_remove }}"
ignore_errors: yes
- name: Workstation | Linux | Flatpak Distro | Flatpak | Uninstalls | Remove Executables
file:
ansible.builtin.file:
path: "{{ flatpak_exec_dir }}/{{ item.name }}{{ flatpak_extension }}"
state: absent
loop: "{{ flatpaks_remove }}"
ignore_errors: yes
+76 -87
View File
@@ -4,33 +4,34 @@
## Facts ##
- name: Workstation | Linux | Software | Flutter | Facts 1
set_fact:
ansible.builtin.set_fact:
flutter_url: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.47.4-stable.tar.xz"
flutter_download_file: "{{ user_user.home }}/Downloads/flutter.tar.xz"
flutter_sdk_location: "{{ user_user.home }}/SDKs/Flutter"
flutter_report: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.sdk.flutter.txt"
- name: Workstation | Linux | Software | Flutter | Facts 2
set_fact:
flutter_bin_location: "{{ flutter_sdk_location }}/flutter/bin"
ansible.builtin.set_fact:
flutter_home: "{{ flutter_sdk_location }}/flutter"
flutter_bin: "{{ flutter_sdk_location }}/flutter/bin"
- name: Workstation | Linux | Software | Flutter | Facts 3
set_fact:
flutter: "{{ flutter_bin_location }}/flutter"
ansible.builtin.set_fact:
flutter_exe: "{{ flutter_bin }}/flutter"
- name: Workstation | Linux | Software | Flutter | Facts 4
set_fact:
ansible.builtin.set_fact:
flutter_report_commands:
- "date > {{ flutter_report }}"
- "{{ flutter }} --disable-analytics >> {{ flutter_report }}"
- "{{ flutter_exe }} --disable-analytics >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
- "{{ flutter }} doctor -v >> {{ flutter_report }}"
- "{{ flutter_exe }} doctor -v >> {{ flutter_report }}"
- "date >> {{ flutter_report }}"
## Checks ##
- name: Workstation | Linux | Software | Flutter | Check SDK Exists
stat:
ansible.builtin.stat:
path: "{{ flutter_sdk_location }}"
get_attributes: false
get_checksum: false
@@ -38,7 +39,7 @@
register: flutter_sdk_stat
- name: Workstation | Linux | Software | Flutter | Check Download Exists
stat:
ansible.builtin.stat:
path: "{{ flutter_download_file }}"
get_attributes: false
get_checksum: false
@@ -48,131 +49,119 @@
## Packages ##
- name: Workstation | Linux | Software | Flutter | Necessities
package:
ansible.builtin.package:
name:
- curl
- git
- unzip
- "{{ xz }}"
- zip
- "{{ mesa }}"
- "{{ mesa_utils }}"
- curl
- git
- unzip
- "{{ xz }}"
- zip
- "{{ mesa }}"
- "{{ mesa_utils }}"
state: present
when: coding == true
when: coding
# https://docs.flutter.dev/get-started/install/linux/desktop
- name: Workstation | Linux | Software | Flutter | Linux App Dependencies
package:
ansible.builtin.package:
name:
- clang
- cmake
- git
- "{{ ninja }}"
- pkg-config
- "{{ gtk3 }}"
- "{{ xz_libs }}"
- "{{ cpp }}"
- clang
- cmake
- git
- "{{ ninja }}"
- pkg-config
- "{{ gtk3 }}"
- "{{ xz_libs }}"
- "{{ cpp }}"
state: present
when: coding == true
when: coding
# https://docs.flutter.dev/get-started/install/linux/android
- name: Workstation | Linux | Software | Flutter | Android App Dependencies
package:
ansible.builtin.package:
name:
- "{{ c_libs }}"
- "{{ cpp_libs }}"
- "{{ z_libs }}"
- "{{ bzip }}"
state: present
when: coding == true
when: coding
## Install SDK ##
- name: Workstation | Linux | Software | Flutter | SDK
block:
- name: Workstation | Linux | Software | Flutter | Download SDK
get_url:
url: "{{ flutter_url }}"
dest: "{{ flutter_download_file }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0664'
when: not flutter_download_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Download SDK
ansible.builtin.get_url:
url: "{{ flutter_url }}"
dest: "{{ flutter_download_file }}"
owner: "{{ user }}"
group: "{{ user }}"
mode: '0664'
when: not flutter_download_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Create Folder
file:
path: "{{ flutter_sdk_location }}"
state: directory
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
- name: Workstation | Linux | Software | Flutter | Create Folder
ansible.builtin.file:
path: "{{ flutter_sdk_location }}"
state: directory
owner: "{{ user }}"
group: "{{ user }}"
mode: '0755'
- name: Workstation | Linux | Software | Flutter | Extract SDK
unarchive:
src: "{{ flutter_download_file }}"
dest: "{{ flutter_sdk_location }}"
owner: "{{ user }}"
group: "{{ user }}"
- name: Workstation | Linux | Software | Flutter | Extract SDK
ansible.builtin.unarchive:
src: "{{ flutter_download_file }}"
dest: "{{ flutter_sdk_location }}"
owner: "{{ user }}"
group: "{{ user }}"
become: true
become_user: "{{ user }}"
when: coding == true
when: coding
and not flutter_sdk_stat.stat.exists
- name: Workstation | Linux | Software | Flutter | Delete Archive
file:
ansible.builtin.file:
path: "{{ flutter_download_file }}"
state: absent
when: coding == true
when: coding
## Configure Environment ##
- name: Workstation | Linux | Software | Flutter | Modify PATH (.bashrc)
blockinfile:
path: "{{ item }}/.bashrc"
- name: Workstation | Linux | Software | Flutter | Modify PATH (profiles)
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
export PATH="$PATH:{{ flutter_bin_location }}"
export FLUTTER_HOME="{{ flutter_home }}"
export PATH="{{ flutter_bin }}:$PATH"
marker: '# {mark} MANAGED BY ANSIBLE | Flutter'
state: present
create: yes
backup: yes
create: true
backup: true
mode: "0755"
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true
and user_root.home != ""
and user_user.home != ""
- name: Workstation | Linux | Software | Flutter | Modify PATH (.zshrc)
blockinfile:
path: "{{ item }}/.zshrc"
block: |
export PATH="$PATH:{{ flutter_bin_location }}"
marker: '# {mark} MANAGED BY ANSIBLE | Flutter'
state: present
create: yes
backup: yes
loop:
- "{{ user_root.home }}"
- "{{ user_user.home }}"
ignore_errors: yes
when: coding == true
and user_root.home != ""
- ".bash_profile"
- ".zprofile"
- ".profile"
when: coding
and user_user.home != ""
## Test SDK ##
- name: Workstation | Linux | Software | Flutter | Doctor Report
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop: "{{ flutter_report_commands }}"
become: true
become_user: "{{ user }}"
when: coding == true
register: shell_check
changed_when: shell_check.rc == 0
when: coding
## Uninstall SDK ##
- name: Workstation | Linux | Software | Flutter | Remove SDK
file:
ansible.builtin.file:
path: "{{ flutter_sdk_location }}"
state: absent
when: not coding == true
when: not coding
+6 -6
View File
@@ -1,24 +1,24 @@
# Some Linux distros come with meh DE's, this fixes that.
- name: Workstation | Linux | Software | GNOME | Check (Parrot OS Only)
shell: which gdm3
ansible.builtin.shell: which gdm3
register: gnome_install
when: ansible_distribution in ("Parrot OS")
ignore_errors: true
- name: Workstation | Linux | Software | GNOME | Install
package:
name:
- gnome
ansible.builtin.package:
name:
- gnome
- gdm3
state: present
when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
- name: Workstation | Linux | Software | GNOME | Note Before Exiting
debug:
ansible.builtin.debug:
msg: "You will need to run `dpkg-reconfigure gdm3` to ensure gdm3 is selected."
when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
- name: Workstation | Linux | Software | GNOME | Exiting
shell: exit 1
ansible.builtin.shell: exit 1
when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
+58 -37
View File
@@ -5,52 +5,73 @@
- name: Workstation | Linux | Software | Hugo
block:
- name: Workstation | Linux | Software | Hugo | pacman
block:
- name: Workstation | Linux | Software | Hugo | pacman
block:
- name: Workstation | Linux | Software | Hugo | pacman | Facts
set_fact:
sass_old: ruby-sass
sass_current: dart-sass
- name: Workstation | Linux | Software | Hugo | pacman | Facts
ansible.builtin.set_fact:
sass_old: ruby-sass
sass_current: dart-sass
- name: Workstation | Linux | Software | Hugo | pacman | Remove Old
package:
name:
- "{{ sass_old }}"
state: absent
- name: Workstation | Linux | Software | Hugo | pacman | Remove Old
ansible.builtin.package:
name:
- "{{ sass_old }}"
state: absent
- name: Workstation | Linux | Software | Hugo | pacman | Install New
package:
name:
- "{{ sass_current }}"
state: present
- name: Workstation | Linux | Software | Hugo | pacman | Install New
ansible.builtin.package:
name:
- hugo
- "{{ sass_current }}"
state: present
when: ansible_pkg_mgr == "pacman"
when: ansible_pkg_mgr == "pacman"
# This must exist after nodejs.yml so that NPM is installed.
- name: Workstation | Linux | Software | Hugo | npm
block:
# This must exist after nodejs.yml so that NPM is installed.
- name: Workstation | Linux | Software | Hugo | apt
block:
- name: Workstation | Linux | Software | Hugo | npm | Facts
set_fact:
sass_old: node-sass
sass_current: sass
- name: Workstation | Linux | Software | Hugo | apt | sass | Facts
ansible.builtin.set_fact:
sass_old: node-sass
sass_current: sass
- name: Workstation | Linux | Software | Hugo | npm | Gather
shell: npm prefix -g
register: npm_bin_dir # Provides /usr/local/ on Devuan, /usr/ on Artix.
changed_when: false
- name: Workstation | Linux | Software | Hugo | apt | sass | Gather
ansible.builtin.shell: npm prefix -g
register: npm_bin_dir # Provides /usr/local/ on Devuan, /usr/ on Artix.
changed_when: false
- name: Workstation | Linux | Software | Hugo | npm | Remove Old
shell: "npm remove -g {{ sass_old }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
- name: Workstation | Linux | Software | Hugo | apt | sass | Remove Old
ansible.builtin.shell: "npm remove -g {{ sass_old }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
- name: Workstation | Linux | Software | Hugo | npm | Install New
shell: "npm install -g {{ sass_current }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
- name: Workstation | Linux | Software | Hugo | apt | sass | Install New
ansible.builtin.shell: "npm install -g {{ sass_current }}"
args:
creates: "{{ npm_bin_dir.stdout }}/bin/sass"
when: ansible_pkg_mgr == "apt"
- name: Workstation | Linux | Software | Hugo | apt | hugo | Remove Old
ansible.builtin.package:
name:
- hugo
state: absent
- name: Workstation | Linux | Software | Hugo | apt | hugo | Install Dependencies
ansible.builtin.package:
name:
- golang
- gcc
state: present
- name: Workstation | Linux | Software | Hugo | apt | hugo | Build
ansible.builtin.shell: |
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
ln -s $HOME/go/bin/hugo /usr/local/bin/hugo
register: shell_check
changed_when: shell_check.rc == 0
when: ansible_pkg_mgr == "apt"
when: coding is true
+67 -23
View File
@@ -2,33 +2,77 @@
# 20260912 - Hyperling
# Arch has too new of Java for Android / Gradle to even run AGP Assistant on.
- name: Workstation | Linux | Software | Java | Facts 1
ansible.builtin.set_fact:
jdk_version: 17
jdk_jvm: /usr/lib/jvm
jdk_src: /usr/lib/jvm/default-java
jdk_dir: "{{ user_user.home}}/SDKs/Java"
- name: Workstation | Linux | Software | Java | Facts 2
ansible.builtin.set_fact:
jdk_path: "{{ jdk_dir }}/bin"
- name: Workstation | Linux | Software | Java | apt
ansible.builtin.package:
name:
- "default-jdk"
state: present
when: ansible_pkg_mgr == "apt"
- name: Workstation | Linux | Software | Java | pacman
block:
- name: Workstation | Linux | Software | Java | pacman | Facts
set_fact:
jdk_version: 21
jdk_dir: ~/SDKs/Java
- name: Workstation | Linux | Software | Java | pacman | Facts
ansible.builtin.set_fact:
jdk_src: /usr/lib/jvm/default
- name: Workstation | Linux | Software | Java | pacman | Install
package:
name:
- "jdk{{ item }}-openjdk"
state: present
loop:
- "{{ jdk_version }}"
- 25
- 21
- 17
- name: Workstation | Linux | Software | Java | pacman | Install [base]
ansible.builtin.package:
name:
- "jdk{{ jdk_version }}-openjdk"
state: present
- name: Workstation | Linux | Software | Java | pacman | Set
shell: "archlinux-java set java-{{ jdk_version }}-openjdk"
- name: Workstation | Linux | Software | Java | pacman | Install [all]
ansible.builtin.package:
name:
- "jdk{{ item }}-openjdk"
state: present
loop:
- 25
- 21
- 17
when: coding
- name: Workstation | Linux | Software | Java | pacman | Link
shell: "ln -sf /usr/lib/jvm {{ jdk_dir }}"
args:
creates: "{{ jdk_dir }}"
become_user: "{{ user }}"
- name: Workstation | Linux | Software | Java | pacman | Set
ansible.builtin.shell: "archlinux-java set java-{{ jdk_version }}-openjdk"
register: shell_check
changed_when: shell_check.rc == 0
when: coding is true
and ansible_pkg_mgr == "pacman"
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Linux | Software | Java | pacman | Link
ansible.builtin.file:
src: "{{ jdk_src }}"
dest: "{{ jdk_dir }}"
state: link
become: true
become_user: "{{ user }}"
- name: Workstation | Linux | Software | Java | Modify PATH (profiles)
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
export JAVA_HOME="{{ jdk_dir }}"
export JAVA_PATH="{{ jdk_path }}"
export PATH="$JAVA_PATH:$PATH
marker: '# {mark} MANAGED BY ANSIBLE | Java'
state: present
create: true
backup: true
mode: "0755"
loop:
- ".bash_profile"
- ".zprofile"
- ".profile"
when: user_user.home != ""
+16 -16
View File
@@ -16,7 +16,7 @@
# Paths
- name: Workstation | Linux | Software | Lutris | Facts
set_fact:
ansible.builtin.set_fact:
lutris_source_list: "/etc/apt/sources.list.d/lutris.list"
lutris_keyfile: "/usr/share/keyrings/lutris.gpg"
when: ansible_pkg_mgr == "apt"
@@ -24,7 +24,7 @@
# Checks
- name: Workstation | Linux | Software | Lutris | Check PPA
stat:
ansible.builtin.stat:
path: "{{ lutris_source_list }}"
get_attributes: false
get_checksum: false
@@ -37,13 +37,13 @@
- name: Workstation | Linux | Software | Lutris | Add PPA (Ubuntu)
apt_repository:
repo: ppa:lutris-team/lutris
update_cache: yes
update_cache: true
state: present
when: ansible_distribution in ("Ubuntu") and gaming == true
ignore_errors: yes
when: ansible_distribution in ("Ubuntu") and gaming
ignore_errors: true
- name: Workstation | Linux | Software | Lutris | Add PPA (Debian)
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_13/Release.key \
| gpg --dearmor \
@@ -51,40 +51,40 @@
- "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_13/ ./' \
| sudo tee {{ lutris_source_list }} > /dev/null"
- "sudo apt update"
when: ansible_distribution in ("Debian") and gaming == true and not lutris_source_exists.stat.exists
when: ansible_distribution in ("Debian") and gaming and not lutris_source_exists.stat.exists
## Install Package ##
- name: Workstation | Linux | Software | Lutris | Install (besides ARM)
package:
ansible.builtin.package:
name:
- lutris
state: present
when: ansible_architecture != "aarch64" and gaming == true
when: ansible_architecture != "aarch64" and gaming
## Uninstall Package ##
- name: Workstation | Linux | Software | Lutris | Uninstall (besides ARM)
package:
ansible.builtin.package:
name:
- lutris
state: absent
when: ansible_architecture != "aarch64" and gaming != true
when: ansible_architecture != "aarch64" and not gaming
## Uninstall Repo ##
- name: Workstation | Linux | Software | Lutris | Remove PPA (Ubuntu)
apt_repository:
repo: ppa:lutris-team/lutris
update_cache: yes
update_cache: true
state: absent
when: ansible_distribution in ("Ubuntu") and gaming != true
ignore_errors: yes
when: ansible_distribution in ("Ubuntu") and not gaming
ignore_errors: true
- name: Workstation | Linux | Software | Lutris | Remove PPA (Debian)
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mv {{ lutris_source_list }} ~/TRASH/"
- "mv {{ lutris_keyfile }} ~/TRASH/"
- "sudo apt update"
when: ansible_distribution in ("Debian") and gaming != true and lutris_source_exists.stat.exists
when: ansible_distribution in ("Debian") and not gaming and lutris_source_exists.stat.exists
+3 -4
View File
@@ -3,18 +3,17 @@
# Giving this DE a shot but not liking it as much as others.
- name: Workstation | Linux | Software | LXQt | Facts | Defaults
set_fact:
ansible.builtin.set_fact:
lxqt_package: lxqt
- name: Workstation | Linux | Software | LXQt | Facts | Debian Derivitives
set_fact:
ansible.builtin.set_fact:
lxqt_package: task-lxqt-desktop
when: ansible_distribution in ("Debian", "Devuan")
- name: Workstation | Linux | Software | LXQt | Install
package:
ansible.builtin.package:
name:
- "{{ lxqt_package }}"
- "{{ sddm }}"
state: present
update_cache: yes
+33 -33
View File
@@ -7,41 +7,41 @@
- name: Workstation | Software | NodeJS
block:
- name: Workstation | Software | NodeJS | apt
block:
- name: Workstation | Software | NodeJS | apt
block:
- name: Workstation | Software | NodeJS | apt | Facts
set_fact:
node_version: node_24.x
- name: Workstation | Software | NodeJS | apt | Facts
ansible.builtin.set_fact:
node_version: node_24.x
- name: Workstation | Software | NodeJS | apt | Old | Remove
package:
name: npm
state: absent
- name: Workstation | Software | NodeJS | apt | Old | Remove
ansible.builtin.package:
name: npm
state: absent
- name: Workstation | Software | NodeJS | apt | extrepo | Install
package:
name: extrepo
- name: Workstation | Software | NodeJS | apt | extrepo | Install
ansible.builtin.package:
name: extrepo
state: present
- name: Workstation | Software | NodeJS | apt | extrepo | Enable
ansible.builtin.shell: "extrepo enable {{ node_version }}"
register: shell_check
changed_when: shell_check.rc == 0
- name: Workstation | Software | NodeJS | apt | Install
ansible.builtin.package:
name: nodejs
state: present
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | NodeJS | All Others | Install
ansible.builtin.package:
name:
- nodejs
- npm
state: present
update_cache: yes
when: ansible_pkg_mgr != "apt"
- name: Workstation | Software | NodeJS | apt | extrepo | Enable
shell: "extrepo enable {{ node_version }}"
- name: Workstation | Software | NodeJS | apt | Install
package:
name: nodejs
state: latest
update_cache: yes
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | NodeJS | All Others | Install
package:
name:
- nodejs
- npm
state: present
when: ansible_pkg_mgr != "apt"
when: coding == true
when: coding
+49 -17
View File
@@ -6,7 +6,7 @@
# Needed for dnf packages such as vlc.
# https://docs.fedoraproject.org/en-US/quick-docs/rpmfusion-setup/
- name: Workstation | Linux | Software | Packages | Fedora Fusion Repos
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm"
- "dnf config-manager --enable rpmfusion-free"
@@ -14,13 +14,15 @@
- "dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
- "dnf config-manager --enable rpmfusion-nonfree"
- "dnf config-manager --enable rpmfusion-nonfree-updates"
register: shell_check
changed_when: shell_check.rc == 0
when: ansible_distribution == "Fedora"
## Packages ##
- name: Workstation | Linux | Software | Packages | Install Software (Editing)
package:
ansible.builtin.package:
name:
- "{{ ffmpeg }}"
state: present
@@ -32,13 +34,11 @@
# Software not yet available or working properly in Flatpak form.
- name: Workstation | Linux | Software | Packages | Install From Repo
package:
ansible.builtin.package:
name:
- "{{ vlc }}"
- "{{ vlc_plugins }}"
- "{{ appimagelauncher }}"
- gparted
- hugo
- "{{ firefox }}"
- "{{ firefox_esr }}"
- "{{ wireless_tools }}"
@@ -50,10 +50,32 @@
- "{{ mpv }}"
- "{{ transmission_gtk }}"
- "{{ transmission_qt }}"
- "{{ libreoffice }}"
- "{{ strawberry }}"
- "{{ dict_en }}"
- "{{ dict_es }}"
- "{{ xset }}"
- "{{ xlock }}"
state: present
- name: Workstation | Linux | Software | Packages | Install From Repo [Coding]
ansible.builtin.package:
name:
- "{{ appimagelauncher }}"
- hugo
- ansible-lint
state: present
when: coding
- name: Workstation | Linux | Software | Packages | Install From Repo [Editing]
ansible.builtin.package:
name:
- gimp
state: present
when: editing
- name: Workstation | Linux | Software | Packages | Install Audio (Looking at you, Artix)
package:
ansible.builtin.package:
name:
- pipewire
- pipewire-pulse
@@ -64,40 +86,50 @@
and ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | Packages | Extra For Liberated Init Systems
package:
ansible.builtin.package:
name:
- "{{ dunst }}"
state: present
when: ansible_service_mgr != "systemd"
# TBD/TODO: Change the below AUR tasks to echo EXISTS, INSTALLED, or FAILED
# and then catch it, similar to what's done in android.yml and others.
- name: Workstation | Linux | Software | Packages | Install From AUR
shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
ansible.builtin.shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop:
- appimagelauncher
when: ansible_pkg_mgr == "pacman"
become: true
become_user: "{{ aur_user }}"
ignore_errors: yes
ignore_errors: true
- name: Workstation | Linux | Software | Packages | Install From AUR [Coding]
ansible.builtin.shell: "yay -Qs {{ item }} || yay --noconfirm -S {{ item }}"
loop:
- vscodium-bin
- android-studio
when: ansible_pkg_mgr == "pacman"
and coding
become: true
become_user: "{{ aur_user }}"
ignore_errors: true
- name: Workstation | Linux | Software | Packages | GS Connect (KDE Connect, Android Tool)
package:
ansible.builtin.package:
name:
- gnome-shell-extension-gsconnect
state: present
when: ansible_distribution in ("Debian")
ignore_errors: yes
# Remove Repo Software #
- name: Workstation | Linux | Software | Packages | Remove Applications
package:
ansible.builtin.package:
name:
- "{{ thunderbird }}"
- "{{ evolution }}"
- steam
- vscode
- code
- libreoffice
- "*libreoffice*"
- '*libreoffice*'
- gimp
state: absent
+21 -22
View File
@@ -6,7 +6,7 @@
## Variables ##
- name: Workstation | Linux | Software | TLP | Facts
set_fact:
ansible.builtin.set_fact:
tlp_package: "tlp"
tlp_rdw: "tlp-rdw"
tlp_smart: "smartmontools"
@@ -19,7 +19,7 @@
acf_service: "auto-cpufreq"
- name: Workstation | Linux | Software | TLP | Facts (Artix)
set_fact:
ansible.builtin.set_fact:
ppd_package: "power-profiles-daemon power-profiles-daemon-runit"
tlp_run_script: tlp-runit
when: ansible_pkg_mgr == "pacman"
@@ -28,17 +28,17 @@
## Conflicts ##
#- name: Workstation | Linux | Software | TLP | Conflicts | Disable
# service:
# ansible.builtin.service:
# name: "{{ item }}"
# state: stopped
# enabled: false
# loop:
# - "{{ ppd_service }}"
# - "{{ acf_service }}"
# ignore_errors: yes
# ignore_errors: true
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
package:
ansible.builtin.package:
name:
- "{{ ppd_package }}"
- "{{ acf_package }}"
@@ -47,13 +47,12 @@
## Install TLP + Associated Software ##
- name: Workstation | Linux | Software | TLP | Install
package:
ansible.builtin.package:
name:
- "{{ tlp_package }}"
- "{{ tlp_rdw }}"
- "{{ tlp_smart }}"
- "{{ tlp_run_script }}"
update_cache: yes
## Configuration ##
@@ -67,13 +66,13 @@
# NFC and WWAN (cellular) are never used so always disable.
- name: Workstation | Linux | Software | TLP | Config
lineinfile:
ansible.builtin.lineinfile:
path: "{{ tlp_config }}"
regexp: '{{ item.key }}'
line: '{{ item.value }} # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
create: true
backup: true
loop:
- { "key": '^[\#]?TLP_ENABLE', "value": 'TLP_ENABLE=1'}
- { "key": '^[\#]?TLP_DEFAULT_MODE', "value": 'TLP_DEFAULT_MODE=SAV'}
@@ -84,10 +83,10 @@
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
# Help preserve battery life by not fully charging. #
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT0=60'}
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=80'}
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=60'}
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=80'}
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": 'START_CHARGE_THRESH_BAT0={{ "60" if battery else "90" }}'}
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": 'STOP_CHARGE_THRESH_BAT0={{ "80" if battery else "95" }}'}
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": 'START_CHARGE_THRESH_BAT1={{ "60" if battery else "90" }}'}
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": 'STOP_CHARGE_THRESH_BAT1={{ "80" if battery else "95" }}'}
# Do not let the WiFi device go DORMANT.
- { "key": '^[\#]?WIFI_PWR_ON_AC', "value": 'WIFI_PWR_ON_AC=off'}
- { "key": '^[\#]?WIFI_PWR_ON_BAT', "value": 'WIFI_PWR_ON_BAT=off'}
@@ -100,7 +99,7 @@
# Ensure the service is running and will run after reboot.
- name: Workstation | Linux | Software | TLP | Enable + Start
service:
ansible.builtin.service:
name: "{{ tlp_service }}"
state: started
enabled: true
@@ -110,15 +109,15 @@
block:
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 01
set_fact:
ansible.builtin.set_fact:
devuan_tlp_dir: "{{ runit_script_dir }}/{{ tlp_service }}"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 02
set_fact:
devuan_tlp_run: "{{ devuan_tlp_dir }}/run"
ansible.builtin.set_fact:
devuan_tlp_run: "{{ devuan_tlp_dir }}/{{ runit_service_script }}"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Create Script
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_tlp_dir }}"
- "echo '#!/bin/sh' > {{ devuan_tlp_run }}"
@@ -136,7 +135,7 @@
when: ansible_service_mgr == "runit"
- name: Workstation | Linux | Software | TLP | runit | Functions & Aliases
blockinfile:
ansible.builtin.blockinfile:
path: "{{ item }}"
block: |
function tlp-devices {
@@ -185,8 +184,8 @@
alias on="devices-on "
marker: '# {mark} MANAGED BY ANSIBLE | tlp'
state: present
create: yes
backup: no
create: true
backup: false
loop:
- "{{ user_user.home }}/.bashrc"
- "{{ user_user.home }}/.zshrc"
+66 -55
View File
@@ -4,35 +4,39 @@
- name: Workstation | Software | VPN | Mullvad
block:
# https://mullvad.net/en/help/install-mullvad-app-linux
# https://mullvad.net/en/help/install-mullvad-app-linux
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
shell: "{{ item }}"
loop:
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
- apt update
when: ansible_pkg_mgr == "apt"
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
ansible.builtin.shell: "{{ item }}"
loop:
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
- apt update
when: ansible_pkg_mgr == "apt"
register: shell_check
changed_when: shell_check.rc == 0
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
shell: "{{ item }}"
loop:
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
when: ansible_pkg_mgr == "dnf"
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
ansible.builtin.shell: "{{ item }}"
loop:
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
when: ansible_pkg_mgr == "dnf"
register: shell_check
changed_when: shell_check.rc == 0
- name: Workstation | Software | VPN | Install
package:
name:
- mullvad-vpn
state: present
- name: Workstation | Software | VPN | Install
ansible.builtin.package:
name:
- mullvad-vpn
state: present
- name: Workstation | Software | VPN | Install (Artix, runit)
package:
name:
- mullvad-vpn-runit
state: present
when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Install (Artix, runit)
ansible.builtin.package:
name:
- mullvad-vpn-runit
state: present
when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit"
when: ansible_distribution in ("Debian", "Ubuntu")
or ansible_pkg_mgr in ("pacman", "dnf")
@@ -42,31 +46,33 @@
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
block:
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
set_fact:
devuan_mullvad_dir: "{{ global_src }}/mullvad-installer"
mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest
mullvad_repack_url: https://github.com/sys-fs/mullvad-repack
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
ansible.builtin.set_fact:
devuan_mullvad_dir: "{{ global_src }}/mullvad-installer"
mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest
mullvad_repack_url: https://github.com/sys-fs/mullvad-repack
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02
set_fact:
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02
ansible.builtin.set_fact:
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
stat:
path: '/opt/Mullvad VPN'
register: mullvad_installed
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
ansible.builtin.stat:
path: '/opt/Mullvad VPN'
register: mullvad_installed
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_mullvad_dir }}"
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
- "rm -rfv {{ mullvad_repack_dir }}"
- "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}"
- "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb"
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
when: not mullvad_installed.stat.exists
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
ansible.builtin.shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_mullvad_dir }}"
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
- "rm -rfv {{ mullvad_repack_dir }}"
- "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}"
- "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb"
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
when: not mullvad_installed.stat.exists
register: shell_check
changed_when: shell_check.rc == 0
when: ansible_pkg_mgr == "apt"
and ansible_service_mgr != "systemd"
@@ -74,30 +80,32 @@
## Link & Enable ##
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 01
set_fact:
ansible.builtin.set_fact:
mullvad_exe: 'mullvad-vpn'
mullvad_exe_dir: '/opt/Mullvad\ VPN'
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 02
set_fact:
ansible.builtin.set_fact:
mullvad_exe_new: "{{ global_bin }}/{{ mullvad_exe }}"
- name: Workstation | Software | VPN | Mullvad | PATH | Facts (pacman)
set_fact:
ansible.builtin.set_fact:
mullvad_exe_dir: '/usr/bin'
when: ansible_pkg_mgr == "pacman"
- name: Workstation | Software | VPN | Mullvad | PATH | Install
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- rm {{ mullvad_exe_new }} || echo "File does not exist."
- echo "#!/usr/bin/env sh" > {{ mullvad_exe_new }}
- echo "cd {{ mullvad_exe_dir }}" >> {{ mullvad_exe_new }}
- echo "./{{ mullvad_exe }}" >> {{ mullvad_exe_new }}
- chmod +x {{ mullvad_exe_new }}
register: shell_check
changed_when: shell_check.rc == 0
- name: Workstation | Software | VPN | Mullvad | runit | Enable Service (mullvad-daemon)
file:
ansible.builtin.file:
src: "{{ runit_script_dir }}/mullvad-daemon"
dest: "{{ runit_service_dir }}/mullvad-daemon"
state: link
@@ -105,18 +113,21 @@
when: ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Mullvad | runit | Remove Old Service (mullvad)
file:
ansible.builtin.file:
path: "{{ runit_service_dir }}/mullvad"
state: absent
when: ansible_service_mgr == "runit"
- name: Workstation | Software | VPN | Mullvad | PATH | Enable Lockdown
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- mullvad lan set block
- mullvad lan set allow # This allows Docker to forward ports to localhost!
- mullvad tunnel set ipv6 on
- mullvad dns set default --block-ads --block-trackers --block-malware --block-gambling --block-adult-content --block-social-media
- mullvad auto-connect set on
- mullvad lockdown-mode set on
- mullvad beta-program set off
become: true
become_user: "{{ user }}"
register: shell_check
changed_when: shell_check.rc == 0
+23 -24
View File
@@ -9,30 +9,30 @@
- name: Workstation | Linux | Software | VS Codium
block:
## Facts ##
# Paths
- name: Workstation | Linux | Software | VS Codium | Facts
set_fact:
ansible.builtin.set_fact:
vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list"
vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg"
# Checks
- name: Workstation | Linux | Software | VS Codium | Check PPA
stat:
ansible.builtin.stat:
path: "{{ vscodium_source_list }}"
get_attributes: false
get_checksum: false
get_mime: false
register: vscodium_source_exists
## Install Repo ##
- name: Workstation | Linux | Software | VS Codium | Add PPA
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
@@ -40,39 +40,38 @@
- "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \
| sudo tee {{ vscodium_source_list }}"
- "sudo apt update"
when: coding == true
when: coding
and not vscodium_source_exists.stat.exists
## Install Package ##
- name: Workstation | Linux | Software | VS Codium | Install
package:
ansible.builtin.package:
name:
- codium
state: present
when: ansible_pkg_mgr == "apt"
and coding == true
and coding
## Remove Package ##
- name: Workstation | Linux | Software | VS Codium | Uninstall
package:
ansible.builtin.package:
name:
- codium
state: absent
when: coding != true
when: not coding
## Remove Repo ##
- name: Workstation | Linux | Software | VS Codium | Remove PPA
shell: "{{ item }}"
ansible.builtin.shell: "{{ item }}"
loop:
- "mv {{ vscodium_source_list }} ~/TRASH/"
- "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/"
- "sudo apt update"
when: coding != true
when: not coding
and vscodium_source_exists.stat.exists
when: ansible_pkg_mgr == "apt"
and ansible_distribution in ("Debian", "Ubuntu")
+10 -10
View File
@@ -4,7 +4,7 @@
# FreeBSD has its own. May be good to keep it separate so it's more to-the-point.
- name: Workstation | Mac OS | Software | Brew | Install Packages
package:
ansible.builtin.package:
name:
- atomic-wallet
- brave-browser
@@ -14,44 +14,44 @@
status: present
- name: Workstation | Mac OS | Software | Brew | Install Packages (Coding)
package:
ansible.builtin.package:
name:
- android studio
- firefox-esr
- visual-studio-code
status: present
when: coding == true
when: coding
- name: Workstation | Mac OS | Software | Brew | Install Packages (Editing:Video)
package:
ansible.builtin.package:
name:
- shotcut
status: present
when: editing in (true, "video")
- name: Workstation | Mac OS | Software | Brew | Install Packages (Editing:Audio)
package:
ansible.builtin.package:
name:
- audacity
status: present
when: editing in (true, "audio")
- name: Workstation | Mac OS | Software | Brew | Install Packages (Gaming)
package:
ansible.builtin.package:
name:
- battle-net
- steam
status: present
when: gaming == true
when: gaming
- name: Workstation | Mac OS | Software | Brew | Install Packages (Cycling)
package:
ansible.builtin.package:
name:
- zwift
status: present
when: cycling == true
when: cycling
#- name: Workstation | Mac OS | Software | Brew | Remove Packages
# package:
# ansible.builtin.package:
# name:
# status: present
+2 -2
View File
@@ -3,7 +3,7 @@
---
- name: Workstation | Shared | Cron | Root | Shutdown Warnings
cron:
ansible.builtin.cron:
user: root
name: "Shutdown Warnings"
minute: "*"
@@ -12,7 +12,7 @@
state: present
- name: Workstation | Shared | Cron | Root | Shutdown
cron:
ansible.builtin.cron:
user: root
name: "Shutdown"
minute: "*/5"
@@ -5,7 +5,7 @@
# Temporarily removed while it's broken:
# , 'com.vscodium.codium.desktop', 'codium.desktop'
- name: Workstation | Account Management | Cinnamon | Facts
set_fact:
ansible.builtin.set_fact:
# Only do multiple entries per line if they are for the same exact program.
cinnamon_favorites: "[ 'org.gnome.Terminal.desktop'
, 'org.gnome.Console.desktop'
@@ -47,19 +47,19 @@
#, 'chat.simplex.simplex.desktop'
- name: Workstation | Account Management | Cinnamon | Facts (NixOS)
set_fact:
ansible.builtin.set_fact:
dconf_terminal: kgx
when: ansible_distribution in ("NixOS")
- name: Workstation | Account Management | Cinnamon | Facts (Ubuntu)
set_fact:
ansible.builtin.set_fact:
dconf_theme: Yaru-purple-dark
dconf_icons: Yaru-purple-dark
when: ansible_distribution in ("Ubuntu")
# Make sure Gnome-Tweaks is installed
- name: Workstation | Account Management | Cinnamon | Install Dependencies
package:
ansible.builtin.package:
name:
- "{{ gnome_tweaks }}"
- "{{ dconf_editor }}"
@@ -70,7 +70,7 @@
# Apply dconf settings through RC files due to distros without working psutil.
# Use the command 'dconf watch /' then change settings to see find these values.
- name: Workstation | Account Management | Cinnamon | Settings
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
# Disable Cinnamon Settings While Converting From GNOME
@@ -330,8 +330,8 @@
fi # End Disable Cinnamon Settings
marker: '# {mark} MANAGED BY ANSIBLE | Cinnamon Settings'
state: present
create: yes
backup: yes
create: true
backup: true
become_user: "{{ user }}"
loop:
- .bashrc
+27 -26
View File
@@ -4,7 +4,7 @@
# Temporarily removed while it's broken:
# , 'com.vscodium.codium.desktop', 'codium.desktop'
- name: Workstation | Account Management | GNOME | Facts
set_fact:
ansible.builtin.set_fact:
# Only do multiple entries per line if they are for the same exact program.
gnome_favorites: "[ 'org.gnome.Terminal.desktop'
, 'org.gnome.Console.desktop'
@@ -46,19 +46,19 @@
#, 'chat.simplex.simplex.desktop'
- name: Workstation | Account Management | GNOME | Facts (NixOS)
set_fact:
ansible.builtin.set_fact:
dconf_terminal: kgx
when: ansible_distribution in ("NixOS")
- name: Workstation | Account Management | GNOME | Facts (Ubuntu)
set_fact:
ansible.builtin.set_fact:
dconf_theme: Yaru-purple-dark
dconf_icons: Yaru-purple-dark
when: ansible_distribution in ("Ubuntu")
# Make sure Gnome-Tweaks is installed
- name: Workstation | Account Management | GNOME | Install Dependencies
package:
ansible.builtin.package:
name:
- "{{ gnome_tweaks }}"
- "{{ dconf_editor }}"
@@ -73,7 +73,8 @@
block:
- name: Workstation | Account Management | GNOME | Dash To Dock | Check
shell: "cd ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/"
ansible.builtin.shell: "cd ~/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/"
become: true
become_user: "{{ user }}"
register: dash_to_dock_exists
@@ -81,17 +82,17 @@
# https://micheleg.github.io/dash-to-dock/download.html
- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Clone Repo
git:
ansible.builtin.git:
repo: https://github.com/micheleg/dash-to-dock.git
dest: "~/TRASH/dash-to-dock/"
clone: yes
force: no
clone: true
force: false
version: master
become_user: "{{ user }}"
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Dependencies
package:
ansible.builtin.package:
name:
- "{{ make }}"
- "{{ msgfmt }}"
@@ -100,7 +101,7 @@
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Make
shell: "cd ~/TRASH/dash-to-dock/; {{ make }}; {{ make }} install"
ansible.builtin.shell: "cd ~/TRASH/dash-to-dock/; {{ make }}; {{ make }} install"
become_user: "{{ user }}"
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
@@ -113,50 +114,50 @@
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | dconf Return Object
debug:
ansible.builtin.debug:
var: gnome_enabled_extensions
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
# https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_filters.html#filters-for-formatting-data
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 1
set_fact:
ansible.builtin.set_fact:
gnome_enabled_extensions: "{{ gnome_enabled_extensions.value | replace('@as ', '') }}"
dash_to_dock_ext_comma: ""
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | After replace()
debug:
ansible.builtin.debug:
var: gnome_enabled_extensions
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 2
set_fact:
ansible.builtin.set_fact:
dash_to_dock_ext_comma: ", "
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions not in ("[]", [], "None")
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 3
set_fact:
ansible.builtin.set_fact:
dash_to_dock_ext_name: "{{ dash_to_dock_ext_comma }}'dash-to-dock@micxgx.gmail.com']"
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 4
set_fact:
ansible.builtin.set_fact:
gnome_enabled_extensions: "[]"
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions == "None"
- name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append With
debug:
ansible.builtin.debug:
var: dash_to_dock_ext_name
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append To
debug:
ansible.builtin.debug:
var: gnome_enabled_extensions
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Print Combined Value
debug:
ansible.builtin.debug:
msg: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}"
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
@@ -169,13 +170,13 @@
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
when: ansible_distribution not in ("NixOS")
ignore_errors: yes
ignore_errors: true
# End block for Dash To Dock.
# Apply dconf settings through RC files due to distros without working psutil.
# Use the command 'dconf watch /' then change settings to see find these values.
- name: Workstation | Account Management | GNOME | Settings
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
## Temporary Variables + Functions ##
@@ -430,8 +431,8 @@
unset dconf_count
marker: '# {mark} MANAGED BY ANSIBLE | GNOME Settings'
state: present
create: yes
backup: yes
create: true
backup: true
become_user: "{{ user }}"
loop:
- .bashrc
@@ -439,14 +440,14 @@
# Remove the dconf settings which had the marker related to NixOS.
- name: Workstation | Account Management | GNOME | Settings (NixOS)
blockinfile:
ansible.builtin.blockinfile:
path: "{{ user_user.home }}/{{ item }}"
block: |
# TBD: No longer used. Remove in 2027.
marker: '# {mark} MANAGED BY ANSIBLE | NixOS GNOME Settings'
state: present
create: no
backup: no
create: false
backup: false
become_user: "{{ user }}"
loop:
- .bashrc
+7 -7
View File
@@ -2,26 +2,26 @@
# Mount network shares.
- name: Workstation | Settings | NFS | Facts (Linux)
set_fact:
ansible.builtin.set_fact:
mount_options: defaults,_netdev
when: ansible_system == "Linux"
- name: Workstation | Settings | NFS | Facts (FreeBSD)
set_fact:
ansible.builtin.set_fact:
mount_options: rw
when: ansible_system == "FreeBSD"
- name: Workstation | Settings | NFS | Install (Linux)
package:
name:
ansible.builtin.package:
name:
- "{{ nfs }}"
state: present
when: ansible_system == "Linux"
# https://www.unixmen.com/setup-nfs-server-on-freebsd/
- name: Workstation | Settings | NFS | Install (FreeBSD)
blockinfile:
ansible.builtin.blockinfile:
path: "{{ rc_conf }}"
marker: "# {mark} MANAGED BY ANSIBLE | NFS Components"
block: |
@@ -34,6 +34,6 @@
nfs_client_flags="-n 4"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
create: yes
backup: yes
create: true
backup: true
when: ansible_system == "FreeBSD"
+10 -10
View File
@@ -2,39 +2,39 @@
# Allow remote viewing via open/free RDP.
- name: Workstation | Settings | RDP | FreeBSD | Install
package:
ansible.builtin.package:
name: xrdp
state: present
when: ansible_system == "FreeBSD"
- name: Workstation | Settings | RDP | FreeBSD | Enable
blockinfile:
ansible.builtin.blockinfile:
path: "{{ rc_conf }}"
marker: "# {mark} MANAGED BY ANSIBLE | RDP Components"
block: |
xrdp_enable="YES"
xrdp_sesman_enable="YES"
state: present
create: yes
backup: yes
create: true
backup: true
when: ansible_system == "FreeBSD"
- name: Workstation | Settings | RDP | FreeBSD | Enable GNOME
lineinfile:
ansible.builtin.lineinfile:
path: /usr/local/etc/xrdp/startwm.sh
regexp: 'gnome-session'
line: 'exec gnome-session # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
create: true
backup: true
when: ansible_system == "FreeBSD"
- name: Workstation | Settings | RDP | FreeBSD | Disable xterm
lineinfile:
ansible.builtin.lineinfile:
path: /usr/local/etc/xrdp/startwm.sh
regexp: 'xterm'
line: '#exec xterm # MANAGED BY ANSIBLE'
state: present
create: yes
backup: yes
create: true
backup: true
when: ansible_system == "FreeBSD"
@@ -4,17 +4,17 @@
## CUPS ##
- name: General | Software | Services | Enable CUPS Daemon
service:
ansible.builtin.service:
name: "{{ cups }}"
pattern: "{{ cups_pattern }}"
state: started
enabled: yes
ignore_errors: yes
enabled: true
ignore_errors: true
- name: General | Software | Services | Enable CUPS-Browse Daemon
service:
ansible.builtin.service:
name: "{{ cups_browse }}"
pattern: "{{ cups_browse_pattern }}"
state: started
enabled: yes
ignore_errors: yes
enabled: true
ignore_errors: true
@@ -2,11 +2,11 @@
# Copy everything from PROJECT/files/templates/ to User's home.
- name: Workstation | Settings | Templates | Variables
set_fact:
ansible.builtin.set_fact:
user_templates: "{{ user_user.home }}/Templates"
- name: Workstation | Settings | Templates | Ensure Directory Exists
file:
ansible.builtin.file:
path: "{{ user_templates }}"
state: directory
mode: '0755'
+1 -1
View File
@@ -2,4 +2,4 @@
# Allow remote viewing desktops via VNC.
- name: General | Software | Services | VNC | TBD
shell: echo "TBD"
ansible.builtin.shell: echo "TBD"
Loaded 100 of 104 files, more files were not shown because too many files have changed in this diff. Show more