started ansible config

This commit is contained in:
Christopher Beckmann
2024-01-25 18:22:53 +01:00
parent 7282276836
commit 0deb9d6eb3
27 changed files with 96 additions and 0 deletions

6
ansible/ansible.cfg Normal file
View File

@@ -0,0 +1,6 @@
[defaults]
INVENTORY = inventory
interpreter_python= /usr/bin/python3.10
[ssh_connecctions]
pipelining = true

3
ansible/inventory/hosts Normal file
View File

@@ -0,0 +1,3 @@
[home]
rootserver
localhost

9
ansible/playbook.yml Normal file
View File

@@ -0,0 +1,9 @@
- name: Install zsh
hosts: home
tasks:
- name: Install zsh
become: yes
apt:
name:
- zsh
state: present

20
ansible/ptcb.yml Normal file
View File

@@ -0,0 +1,20 @@
---
- name: Setup rootserver
hosts: rootserver
become: yes
roles:
#- networkd
#- apt
#- base
#- sshd
#- firewalld
#- virtualization_guest
#- php_fpm
#- nginx
#- certbot
#- ptjv_web
#- drop_web
#- pentest
#- wireguard

View File

View File

9
ansible/roles/env/tasks/main.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
---
- name: Install environment file with system-wide variables
become: true
ansible.builtin.template:
src: environment/environment
dest: /etc/environment
mode: "0644"
tags: environment

View File

@@ -0,0 +1,4 @@
# {{ ansible_managed }}
MANPAGER="sh -c 'col -bx | bat -l man -p'"
MANROFFOPT="-c"

View File

View File

View File

View File

View File

@@ -0,0 +1,37 @@
- name: Clone nvim repository
git:
repo: https://github.com/neovim/neovim
dest: "{{ ansible_env.HOME }}/src/nvim"
clone: true
version: "stable"
- name: Install nvim build dependencies
become: true
apt:
name:
- ninja-build
- gettext
- libtool
- libtool-bin
- autoconf
- automake
- cmake
- g++
- pkg-config
- unzip
- curl
- xclip
- ripgrep
state: present
- name: Build nvim release version
community.general.make:
chdir: deps/neovim
params:
CMAKE_BUILD_TYPE: Release
- name: Install nvim release version
become: true
community.general.make:
chdir: deps/neovim
target: install

View File

View File

View File

View File

View File

@@ -0,0 +1,8 @@
---
- name: Allow non-root users to bind to low ports
ansible.posix.sysctl:
name: net.ipv4.ip_unprivileged_port_start
value: '0'
sysctl_file: /etc/sysctl.d/base.conf
tags: base

View File

View File

View File

View File

View File

View File

View File