From 987a2e9996c26562adf6481b06147362fc337fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Mon, 30 Sep 2024 16:24:46 +0200 Subject: [PATCH] Finish ooni-data deployment ansible playbook --- ansible/playbook-bootstrap.yml | 7 +++---- ansible/playbook.yml | 7 ++++++- ansible/roles/bootstrap/tasks/main.yml | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ansible/playbook-bootstrap.yml b/ansible/playbook-bootstrap.yml index db00bd8..110dd61 100644 --- a/ansible/playbook-bootstrap.yml +++ b/ansible/playbook-bootstrap.yml @@ -1,8 +1,7 @@ # This playbook is to be run on hosts that don't support bootstrapping the base # OS setup with something other than ansible (eg. cloud-init) -- name: Ensure ssh_users are synched on all hosts +- name: Bootstrap the ssh_users on target host hosts: all - #remote_user: root - become: yes + remote_user: root roles: - - bootstrap + - ssh_users diff --git a/ansible/playbook.yml b/ansible/playbook.yml index fa093dc..af19a77 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -1,4 +1,10 @@ --- +- name: Ensure all hosts are bootstrapped correctly + hosts: all + become: root + roles: + - bootstrap + - name: ClickHouse servers hosts: clickhouse_servers user: admin @@ -41,7 +47,6 @@ become: true roles: - oonidata - # commented out due to the fact it requires manual config of ~/.ssh/config #- name: Setup codesign box # hosts: codesign-box diff --git a/ansible/roles/bootstrap/tasks/main.yml b/ansible/roles/bootstrap/tasks/main.yml index 8a84ed4..88cd3a7 100644 --- a/ansible/roles/bootstrap/tasks/main.yml +++ b/ansible/roles/bootstrap/tasks/main.yml @@ -1,3 +1,8 @@ +- ansible.builtin.include_role: + name: ssh_users + tags: + - ssh_users + - name: Set the hostname to inventory_hostname ansible.builtin.hostname: name: "{{ inventory_hostname }}"