feat: add SSH login information and dotfiles status check to hello.py; include OpenSSH server tasks in Ansible configuration
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
ansible.builtin.import_tasks: tasks/global/ollama.yml
|
||||
become: true
|
||||
|
||||
- name: Include OpenSSH Server tasks
|
||||
ansible.builtin.import_tasks: tasks/global/openssh-server.yml
|
||||
become: true
|
||||
|
||||
- name: Ensure common packages are installed
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
@@ -31,9 +35,11 @@
|
||||
- trash-cli
|
||||
- curl
|
||||
- wget
|
||||
# Python is used for the dotfiles CLI tools
|
||||
- python3
|
||||
- python3-pip
|
||||
- python3-venv
|
||||
- lastlog2 # Used for displaying last login information
|
||||
state: present
|
||||
become: true
|
||||
|
||||
|
22
config/ansible/tasks/global/openssh-server.yml
Normal file
22
config/ansible/tasks/global/openssh-server.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Ensure openssh-server is installed
|
||||
ansible.builtin.package:
|
||||
name: openssh-server
|
||||
state: present
|
||||
|
||||
- name: Ensure SSH server configuration is proper
|
||||
ansible.builtin.template:
|
||||
src: templates/sshd_config.j2
|
||||
dest: /etc/ssh/sshd_config
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
validate: '/usr/sbin/sshd -t -f %s'
|
||||
notify: Restart SSH service
|
||||
register: ssh_config
|
||||
|
||||
- name: Ensure SSH service is enabled and running
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: started
|
||||
enabled: true
|
Reference in New Issue
Block a user