From 8e3da5543068bb813243b96154d6248e85ec67c0 Mon Sep 17 00:00:00 2001 From: "taha@asks2" Date: Wed, 29 May 2024 14:08:32 +0200 Subject: [PATCH] Updated dotfiles role --- README.md | 20 ++++++++++++++++---- roles/dotfiles | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f6b0034..d509ca2 100644 --- a/README.md +++ b/README.md @@ -15,24 +15,29 @@ Ubuntu Server OS on your computer (setup the disk however you like). ## Getting started -You have a freshly installed OS. Now we will install and configure our desktop +You have a freshly installed OS. Now we will install and configure your workstation using Ansible *in pull mode* from this repo. First, install Ansible on your machine (to do that we first install `pip`, then use that to install `ansible`): ``` $ sudo apt install python3-pip -$ sudo python3 -m pip install ansible +$ sudo python3 -m pip install ansible jmespath ``` Note that this installs `ansible` and its related binaries in `/usr/local/bin/`. We do it this way to avoid messing with `PATH` or virtual environments at this point. +We also installed `jmespath` which is required by the `json_query` filter which +is used in some tasks of this playbook. + + + `ansible-pull` pulls a playbook from a remote repo and executes it on the host. ``` -$ ansible-pull -U https://codeberg.org/ansible/playbook-workstation +$ ansible-pull -U https://codeberg.org/ansible/playbook-workstation --ask-become-pass ``` - +The warning about `Could not match supplied host pattern` can [safely be disregarded](https://stackoverflow.com/a/55821135/1198249). @@ -71,8 +76,15 @@ $ git submodule foreach git pull origin main ### Ansible pull ++ https://docs.ansible.com/ansible/latest/cli/ansible-pull.html + https://medium.com/splunkuserdeveloperadministrator/using-ansible-pull-in-ansible-projects-ac04466643e8 + https://medium.com/@emilfabrice/configure-your-linux-machines-with-ansible-pull-4cbca69613fa + https://www.devopsschool.com/blog/what-is-ansible-pull-and-how-can-we-use-it ++ https://stackoverflow.com/questions/55820887/how-to-resolve-warning-could-not-match-supplied-host-pattern-ignoring-machin + +### Ansible inventory ++ https://evrard.me/convert-ansible-inventories-with-ansible-inventory-cli + (the `ansible-inventory` CLI can convert `hosts` files from `INI` to `YAML`, among other tricks) + via https://stackoverflow.com/a/51596307/1198249 diff --git a/roles/dotfiles b/roles/dotfiles index 92ffc90..a6e2edb 160000 --- a/roles/dotfiles +++ b/roles/dotfiles @@ -1 +1 @@ -Subproject commit 92ffc905608c6951b2412ac6bc2d3b8c9d2280df +Subproject commit a6e2edb7f659ae24c457abbca56d21055ef48ff9