From 636486ae6018d9666ca2101e64efc643f8d8cda3 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Thu, 27 Jan 2022 18:12:58 -0500 Subject: [PATCH] Initial Ansible examples Add hosts and ansible examples to README. It's not much, but it's a start. --- README.md | 19 ++++++++++++++++++- hosts | 5 +++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 hosts diff --git a/README.md b/README.md index c8bed88..5d40fdc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # Workstation -Workstation configuration, tool lists, and eventually ansible playbooks \ No newline at end of file +Workstation configuration, tool lists, and eventually ansible playbooks + +## Ansible + +https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html + +Setup + +```bash +pip install --user ansible +sudo mkdir -p /etc/ansible && sudo cp hosts /etc/ansible/hosts +``` + +Run an ad-hoc command + +```bash +ansible pi -i hosts --become-method=sudo --ask-become-pass --become -a "apt update" +``` diff --git a/hosts b/hosts new file mode 100644 index 0000000..9412f5f --- /dev/null +++ b/hosts @@ -0,0 +1,5 @@ +[pi] +pihole +pivault +octopi +pi-medina