From 686230023a14c32cf40c4a399ed9748d41fbfd80 Mon Sep 17 00:00:00 2001 From: Manu Bretelle Date: Thu, 7 Dec 2023 10:30:48 -0800 Subject: [PATCH] ansible: update README to refer to inventory example. Signed-off-by: Manu Bretelle --- ansible/README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/ansible/README.md b/ansible/README.md index a274534..e0ad33e 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -4,32 +4,26 @@ sudo dnf install -y ansible ``` -## SSH keys -`ansible` uses SSH to connect to hosts. We can put the s390x machines key in our ssh authentication agent to automatically authenticate without having to keep a copy of the key on our dev server: - -``` -ssh-add <(secrets_tool get_from_group KERNEL_PATCHES_S390X_SSH_PRIVATE_KEY KERNEL_PATCHES_KEYS) -``` ## Inventory The [inventory](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html) is where we define our hosts, hostgroup, possibly variable... -Using an inventory similar to P531683832. +Using an inventory similar to [inventory_example.yml](inventory_example.yml). After having changed the github token, one can run the following commands: -Run the playbook against `bpf-ci-runner-s390x` only, and in check mode (`-C`): +Run the playbook against `s390x` only, and in check mode (`-C`): ``` -ansible-playbook -i ~/inventory.yml ansible/playbook.yml -C --limit bpf-ci-runner-s390x +ansible-playbook -i ~/inventory.yml ansible/playbook.yml -C --limit s390x ``` -Run the playbook against all hosts in `s390x_odd` group, in check mode and display the change diff `-D`: +Run the playbook against all hosts in `repo_and_org_runner` group, in check mode and display the change diff `-D`: ``` -ansible-playbook -i ~/inventory.yml ansible/playbook.yml -C -D --limit s390x_odd +ansible-playbook -i ~/inventory.yml ansible/playbook.yml -C -D --limit repo_and_org_runner ``` -See output in P531732743 . + Same, but against all hosts: ``` @@ -37,3 +31,4 @@ ansible-playbook -i ~/inventory.yml ansible/playbook.yml -C -D ``` To actually apply the changes, remove `-C`. +