From 3be40169b20237f78c10149bb71beb5936220a28 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Sat, 30 May 2026 06:02:44 -0400 Subject: [PATCH] added a 'local_facts' playbook varable to be used by some init-server role tasks during localhost delegation --- init@homeserver.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/init@homeserver.yml b/init@homeserver.yml index dbb594d..0646ec0 100644 --- a/init@homeserver.yml +++ b/init@homeserver.yml @@ -1,16 +1,28 @@ +# @NOTE run 'ansible-playbook' command on this using 'sudo' - name: Initialize homeserver hosts: armitage - # remote_user: admin + remote_user: root vars: harden: true - ansible_user: admin + local_facts: + user_dir: /home/rika + user_id: rika tasks: + - name: Hardening SSH server + ansible.builtin.include_role: + name: init-server # required. The name of the role to be executed. + # apply: # not required. Accepts a hash of task keywords (e.g. C(tags), C(become)) that will be applied to all tasks within the included role. + tasks_from: harden # not required. File to load from a role's C(tasks/) directory. + # vars_from: main # not required. File to load from a role's C(vars/) directory. + # defaults_from: main # not required. File to load from a role's C(defaults/) directory. + # allow_duplicates: True # not required. Overrides the role's metadata setting to allow using a role more than once with the same parameters. + # handlers_from: main # not required. File to load from a role's C(handlers/) directory. - name: Initializing groups and users ansible.builtin.include_role: name: init-server # required. The name of the role to be executed. # apply: # not required. Accepts a hash of task keywords (e.g. C(tags), C(become)) that will be applied to all tasks within the included role. - tasks_from: install-pkgs # not required. File to load from a role's C(tasks/) directory. - # vars_from: users@linux # not required. File to load from a role's C(vars/) directory. + tasks_from: ssh-users # not required. File to load from a role's C(tasks/) directory. + vars_from: main # not required. File to load from a role's C(vars/) directory. defaults_from: main # not required. File to load from a role's C(defaults/) directory. # allow_duplicates: True # not required. Overrides the role's metadata setting to allow using a role more than once with the same parameters. - handlers_from: main # not required. File to load from a role's C(handlers/) directory. \ No newline at end of file + # handlers_from: main # not required. File to load from a role's C(handlers/) directory. \ No newline at end of file