Update setup script

This commit is contained in:
Keannu Bernasol 2025-01-07 15:55:20 +08:00
parent 6bb9d0d39e
commit 63445f0a83
2 changed files with 13 additions and 6 deletions

View file

@ -2,12 +2,13 @@
# Hyper-V Test Nodes
# 172.22.90.75 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
# Bare Metal Nodes
10.0.10.4 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
10.0.10.141 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
10.0.10.64 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
10.0.10.169 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
# 10.0.10.4 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
# 10.0.10.141 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
# 10.0.10.64 ansible_ssh_common_args="-o StrictHostKeyChecking=no"
[openwrt]
10.0.10.1
# Not enough storage space for these devices to support Ansible
# 10.0.10.1
# 10.0.10.2
# 10.0.10.3

View file

@ -4,12 +4,18 @@
become: true
vars_files: "{{ playbook_dir | dirname | dirname | dirname }}/inventory/group_vars/debian.yml"
tasks:
# Ensure SSH directory exists
- name: Ensure SSH directory exists
file:
path: ~/.ssh/
state: directory
mode: "0700"
- name: Add SSH key to authorized_hosts - Debian
authorized_key:
user: root
state: present
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
path: /root/.ssh/authorized_keys
path: ~/.ssh/authorized_keys
- name: Enable Root Login
lineinfile:
dest: /etc/ssh/sshd_config
@ -49,7 +55,7 @@
- socat
- fish
- iperf3
- resolvconf
- dnsmasq
# Cache is already updated from previous step
update_cache: false
autoremove: true