Added naruto

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
TuDatTr
2023-07-12 00:02:17 +02:00
parent c2b68f7f64
commit ef207c5d64
20 changed files with 282 additions and 167 deletions

View File

@@ -0,0 +1,10 @@
---
- name: Copy .bashrc
template:
src: templates/common/bash/bashrc.j2
dest: "/home/{{ user }}/.bashrc"
owner: "{{ user }}"
group: "{{ user }}"
mode: 0644
become: yes
register: sshd

View File

@@ -5,11 +5,11 @@
state: present
become: yes
- name: Create folders to mount to
- name: Create mount folders
file:
path: "{{ item.path }}"
state: directory
loop: "{{ fstab_entries }}"
loop: "{{ host.fstab if host.fstab is iterable else []}}"
become: true
- name: Create fstab entries
@@ -19,7 +19,7 @@
fstype: "{{ item.type }}"
state: present
backup: true
loop: "{{ fstab_entries }}"
loop: "{{ host.fstab if host.fstab is iterable else []}}"
become: true
register: fstab
@@ -32,7 +32,7 @@
state: present
backup: true
become: true
loop: "{{ mergerfs_entries }}"
loop: "{{ host.mergerfs if host.mergerfs is iterable else []}}"
register: fstab
- name: Mount all disks

View File

@@ -1,6 +1,6 @@
---
- include_tasks: time.yml
- include_tasks: essential.yml
- include_tasks: bash.yml
- include_tasks: sshd.yml
- include_tasks: aya01_fstab.yml
when: inventory_hostname == "aya01"
- include_tasks: fstab.yml

View File

@@ -7,6 +7,14 @@
become: yes
register: sshd
- name: Copy pubkey
copy:
content: "{{ pubkey }}"
dest: "/home/{{ user }}/.ssh/authorized_keys"
owner: "{{ user }}"
group: "{{ user }}"
mode: "644"
- name: Restart sshd
service:
name: "sshd"