Compare commits

..
7 Commits
20 changed files with 65 additions and 59 deletions

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
---
- hosts:
- tmp.kevinnlsamuel.com
vars:
ansible_user: root
alt_ssh_port: 1023
name: setup server natsuco
roles:
- kevinnlsamuel.galaxy.sshd.disablepasswd
- kevinnlsamuel.galaxy.sshd.altport
tasks:
@@ -0,0 +1 @@
Port {{ alt_ssh_port }}
+6
View File
@@ -90,6 +90,7 @@
- btrfs-progs
- coreutils
- moreutils
- parallel
- fcitx5-gtk4
- file
- gh
@@ -288,6 +289,11 @@
firewall-cmd --permanent --zone home --add-service=kdeconnect --add-service=mosh --add-service=ssh
firewall-cmd --reload
- import_role:
role: managegooglechrome
become: true
name: set chrome policies
- name: enabled tailscaled service
become: true
ansible.builtin.service:
-38
View File
@@ -1,38 +0,0 @@
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
@@ -1,3 +0,0 @@
#SPDX-License-Identifier: MIT-0
---
# defaults file for .
@@ -1,3 +0,0 @@
#SPDX-License-Identifier: MIT-0
---
# handlers file for .
-3
View File
@@ -1,3 +0,0 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for .
-3
View File
@@ -1,3 +0,0 @@
#SPDX-License-Identifier: MIT-0
localhost
-6
View File
@@ -1,6 +0,0 @@
#SPDX-License-Identifier: MIT-0
---
- hosts: localhost
remote_user: root
roles:
- .
-3
View File
@@ -1,3 +0,0 @@
#SPDX-License-Identifier: MIT-0
---
# vars file for .
+16
View File
@@ -0,0 +1,16 @@
- name: manage google chrome
block:
- ansible.builtin.file:
path: /etc/opt/chrome/policies/managed/
state: directory
owner: root
group: root
mode: '0755'
- ansible.builtin.copy:
src: disable-local-llm.json
dest: /etc/opt/chrome/policies/managed/disable-local-llm.json
owner: root
group: root
mode: '0644'
+5
View File
@@ -0,0 +1,5 @@
---
- name: restart sshd
service:
name: sshd
state: restarted
+1
View File
@@ -0,0 +1 @@
/home/kevins/Projects/galaxy/roles/sshd/_handlers
+16
View File
@@ -0,0 +1,16 @@
---
- name: change ssh port to {{ alt_ssh_port | mandatory }}
notify: restart sshd
template:
src: 00-altport.conf
dest: /etc/ssh/sshd_config.d/00-altport.conf
- name: install semanage
when: ansible_facts.selinux.status != 'disabled'
dnf:
state: present
name: policycoreutils-python-utils
- name: give sshd access to alt port on selinux
register: result_change_to_alt_port
ignore_errors: true
changed_when: "'already defined' not in result_change_to_alt_port.stdout"
command: semanage port -a -t ssh_port_t -p tcp {{ alt_ssh_port }}
@@ -0,0 +1 @@
Port {{ alt_ssh_port }}
@@ -0,0 +1 @@
PasswordAuthentication no
+1
View File
@@ -0,0 +1 @@
/home/kevins/Projects/galaxy/roles/sshd/_handlers
+5
View File
@@ -0,0 +1,5 @@
- name: disable password auth
notify: restart sshd
copy:
src: 00-nopasswd.conf
dest: /etc/ssh/sshd_config.d/00-nopasswd.conf