From 12ebe13899b44122739418e96f0422ef15b28330 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Fri, 13 Jan 2023 13:48:39 -0800 Subject: ansible: setup --- clarkzjw.ca/config/atlas/init.yaml | 9 +++++++++ clarkzjw.ca/config/atlas/inventory/hosts.yaml | 4 +--- clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml | 21 +++++++++++++++++++++ clarkzjw.ca/config/atlas/setup.yaml | 8 ++++++++ clarkzjw.ca/config/atlas/site.yaml | 5 ----- 5 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 clarkzjw.ca/config/atlas/init.yaml create mode 100644 clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml create mode 100644 clarkzjw.ca/config/atlas/setup.yaml delete mode 100644 clarkzjw.ca/config/atlas/site.yaml diff --git a/clarkzjw.ca/config/atlas/init.yaml b/clarkzjw.ca/config/atlas/init.yaml new file mode 100644 index 0000000..d8c8ef9 --- /dev/null +++ b/clarkzjw.ca/config/atlas/init.yaml @@ -0,0 +1,9 @@ +--- +- name: Init + hosts: storinator + remote_user: clarkzjw + gather_facts: false + + roles: + - role: init + - role: tailscale diff --git a/clarkzjw.ca/config/atlas/inventory/hosts.yaml b/clarkzjw.ca/config/atlas/inventory/hosts.yaml index 98becce..1291bbb 100644 --- a/clarkzjw.ca/config/atlas/inventory/hosts.yaml +++ b/clarkzjw.ca/config/atlas/inventory/hosts.yaml @@ -1,5 +1,3 @@ all: hosts: - atlas: - vars: - ansible_ssh_common_args: "-J pve" \ No newline at end of file + storinator: diff --git a/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml new file mode 100644 index 0000000..35284bd --- /dev/null +++ b/clarkzjw.ca/config/atlas/roles/init/tasks/main.yaml @@ -0,0 +1,21 @@ +- name: Make sure we have a 'wheel' group + group: + name: wheel + state: present + become_user: root + +- name: Allow 'wheel' group to have passwordless sudo + become_user: root + lineinfile: + dest: /etc/sudoers + state: present + regexp: '^%wheel' + line: '%wheel ALL=(ALL) NOPASSWD: ALL' + validate: visudo -cf %s + +- name: Add sudoers users to wheel group + become_user: root + user: + name: clarkzjw + groups: wheel + append: yes diff --git a/clarkzjw.ca/config/atlas/setup.yaml b/clarkzjw.ca/config/atlas/setup.yaml new file mode 100644 index 0000000..34622c8 --- /dev/null +++ b/clarkzjw.ca/config/atlas/setup.yaml @@ -0,0 +1,8 @@ +- name: Setup Storinator + hosts: storinator + remote_user: clarkzjw + gather_facts: true + + roles: + - role: debian_init + - role: samba diff --git a/clarkzjw.ca/config/atlas/site.yaml b/clarkzjw.ca/config/atlas/site.yaml deleted file mode 100644 index 7ffbe81..0000000 --- a/clarkzjw.ca/config/atlas/site.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- hosts: atlas - roles: - - role: tailscale - - role: debian_init - - role: samba -- cgit v1.2.3