test with ssh new ubuntu

This commit is contained in:
2024-05-08 12:49:46 +02:00
parent d38ceafb94
commit 5b02fbfc41
7 changed files with 1549 additions and 1553 deletions

View File

@@ -1,4 +1,41 @@
github_registry_containerlab: ghcr.io
github_user: staff92
github_token: ghp_XXXXXXXXX
github_registry_clabernetes: "oci://{{ github_registry_containerlab }}/srl-labs/clabernetes/clabernetes"
#* USERS
management_user_list:
- name: stephane
shell: '/bin/bash'
authorized_keys:
- key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClVS1uxDfwS6OusQ4qgcZ6hBc8YRBE8MyXu0sUfGN7S3itjI3W2ixD18v80el8dVQVR12jCY0ueavgoV1cHrfGWkFoLKi+QrA4MuSNUChj0NBbyLTmdwPvne8LRv3ttCbRSJ/6bIEveX8y/7kGn/R1NDFlfE6b5R8ersBUKCQM6YxblAkv/XH8cJlQXhr1nLhVOl/ae+Q/pTCbgioB8qrmGEuMvOLmavcFf7IJbJcSgeiXSOnyIRl2n64X6lbRK+MRZ61pF6vAOXA+Ixyt/fAbO7sjqU0+cEhU5Br5/VcqG4Bc5nhWimtXIHPry3aLV5PtN6K9/i3eA5F6Jpa82JzmUMEbWSBIga02yIw9GjRyAI6ccH/kJGuB6QN5/YwGHpOF2f0FGiEAbUz41mLngN3SsXL1pdV2hT3x56/GIcGe6p/f1cytwVCyOaE7W87B05w5JYb1sSFj6QuGW0rHWfnHT5SY87Mk/H8VgZPaPbm+hSjLIQRAmUYQR+Rub1o9bXE= stephane"
exclusive: yes
sudo:
hosts: ALL
as: ALL
commands: ALL
nopasswd: ALL
#* FIREWALL
firewall_allowed_tcp_ports:
- "22"
- "80"
- "443"
- "9100"
# - "9090"
# - "3000"
# - "9323"
#* NETBIRD
netbird_setup_key: F234BD1F-385B-4BEA-8234-608CCB1062ED
netbird_register: true
#* TLS
node_exporter_tls_server_config:
cert_file: /etc/node_exporter/tls.cert
key_file: /etc/node_exporter/tls.key
#* NODE_EXPORTER
# node_exporter_basic_auth_users:
# randomuser: examplepassword
node_exporter_web_listen_address: "{{ host_private_address }}:9100"

View File

@@ -1,139 +1,139 @@
---
# ---
install_docker: true
install_fail2ban: true
# install_docker: true
# install_fail2ban: true
package_list:
- name: python3-pip
- name: proxychains
########
# USER #
########
management_user_list:
- name: stephane
shell: '/bin/bash'
authorized_keys:
- key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClVS1uxDfwS6OusQ4qgcZ6hBc8YRBE8MyXu0sUfGN7S3itjI3W2ixD18v80el8dVQVR12jCY0ueavgoV1cHrfGWkFoLKi+QrA4MuSNUChj0NBbyLTmdwPvne8LRv3ttCbRSJ/6bIEveX8y/7kGn/R1NDFlfE6b5R8ersBUKCQM6YxblAkv/XH8cJlQXhr1nLhVOl/ae+Q/pTCbgioB8qrmGEuMvOLmavcFf7IJbJcSgeiXSOnyIRl2n64X6lbRK+MRZ61pF6vAOXA+Ixyt/fAbO7sjqU0+cEhU5Br5/VcqG4Bc5nhWimtXIHPry3aLV5PtN6K9/i3eA5F6Jpa82JzmUMEbWSBIga02yIw9GjRyAI6ccH/kJGuB6QN5/YwGHpOF2f0FGiEAbUz41mLngN3SsXL1pdV2hT3x56/GIcGe6p/f1cytwVCyOaE7W87B05w5JYb1sSFj6QuGW0rHWfnHT5SY87Mk/H8VgZPaPbm+hSjLIQRAmUYQR+Rub1o9bXE= stephane"
exclusive: yes
sudo:
hosts: ALL
as: ALL
commands: ALL
nopasswd: ALL
################
# SSH - CLIENT #
################
# ssh_drop_in_name: null
# #ssh_user: root
# ssh:
# # noqa var-naming
# Compression: true
# GSSAPIAuthentication: false
# # wokeignore:rule=master
# ControlMaster: auto
# ControlPath: ~/.ssh/.cm%C
# Match:
# - Condition: "final all"
# GSSAPIAuthentication: true
# Host:
# - Condition: example
# Hostname: example.com
# User: somebody
# ssh_ForwardX11: false
#################
# SSH - SERVEUR #
#################
sshd_skip_defaults: true
sshd_config_file: /etc/ssh/sshd_config
sshd_AuthorizedKeysFile: .ssh/authorized_keys
sshd_AcceptEnv: "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL"
sshd_Protocol: 2
sshd_LoginGraceTime: 30
sshd_SyslogFacility: AUTH
sshd_LogLevel: VERBOSE
sshd_PermitRootLogin: 'no'
sshd_StrictModes: 'yes'
sshd_IgnoreRhosts: 'yes'
sshd_HostbasedAuthentication: 'no'
sshd_PasswordAuthentication: 'no'
sshd_PermitEmptyPasswords: 'no'
sshd_ChallengeResponseAuthentication: 'no'
sshd_GSSAPIAuthentication: 'no'
sshd_X11DisplayOffset: 10
sshd_PrintMotd: 'yes'
sshd_PrintLastLog: 'yes'
sshd_TCPKeepAlive: 'yes'
sshd_Subsystem: "sftp /usr/lib/openssh/sftp-server"
sshd_UsePAM: 'yes'
sshd_UseDNS: 'no'
sshd_KexAlgorithms: "curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
sshd_Ciphers: "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr"
sshd_MACs: "hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com"
sshd_HostKey:
- /etc/ssh/ssh_host_rsa_key
#######
# APT #
#######
apt_upgrade: true
apt_repositories: []
apt_ppas: []
# # nginx ppa repo
# - repo: ppa:nginx/stable
# # not needed on ubuntu distribution
# #codename: trusty
# apt_packages:
# package_list:
# - name: python3-pip
# - name: proxychains
#########
# ALERT #
#########
# ########
# # USER #
# ########
alert_username: jingohalert
alert_password: jMVmbM2VQ5gEiV
alert_vault: "Jingoh0947;"
alert_list_server:
- '"163.172.84.28"'
- '"37.187.127.90"'
alert_server_ssl: gitea.jingoh.fr
# management_user_list:
# - name: stephane
# shell: '/bin/bash'
# authorized_keys:
# - key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClVS1uxDfwS6OusQ4qgcZ6hBc8YRBE8MyXu0sUfGN7S3itjI3W2ixD18v80el8dVQVR12jCY0ueavgoV1cHrfGWkFoLKi+QrA4MuSNUChj0NBbyLTmdwPvne8LRv3ttCbRSJ/6bIEveX8y/7kGn/R1NDFlfE6b5R8ersBUKCQM6YxblAkv/XH8cJlQXhr1nLhVOl/ae+Q/pTCbgioB8qrmGEuMvOLmavcFf7IJbJcSgeiXSOnyIRl2n64X6lbRK+MRZ61pF6vAOXA+Ixyt/fAbO7sjqU0+cEhU5Br5/VcqG4Bc5nhWimtXIHPry3aLV5PtN6K9/i3eA5F6Jpa82JzmUMEbWSBIga02yIw9GjRyAI6ccH/kJGuB6QN5/YwGHpOF2f0FGiEAbUz41mLngN3SsXL1pdV2hT3x56/GIcGe6p/f1cytwVCyOaE7W87B05w5JYb1sSFj6QuGW0rHWfnHT5SY87Mk/H8VgZPaPbm+hSjLIQRAmUYQR+Rub1o9bXE= stephane"
# exclusive: yes
# sudo:
# hosts: ALL
# as: ALL
# commands: ALL
# nopasswd: ALL
##########
# CHISEL #
##########
# ################
# # SSH - CLIENT #
# ################
chisel_version: 1.8.1
chisel_server_host: 163.172.84.28
chisel_server_port: 8080
chisel_client_auth_username: user
chisel_client_auth_password: pass
# # ssh_drop_in_name: null
# # #ssh_user: root
chisel_remove_all:
- "{{ chisel_service_destination }}"
- "{{ chisel_config_folder }}"
- "{{ chisel_download_destination }}"
- "{{ chisel_install_destination }}"
- /var/log/chisel
# # ssh:
# # # noqa var-naming
# # Compression: true
# # GSSAPIAuthentication: false
# # # wokeignore:rule=master
# # ControlMaster: auto
# # ControlPath: ~/.ssh/.cm%C
# # Match:
# # - Condition: "final all"
# # GSSAPIAuthentication: true
# # Host:
# # - Condition: example
# # Hostname: example.com
# # User: somebody
# # ssh_ForwardX11: false
# #################
# # SSH - SERVEUR #
# #################
# sshd_skip_defaults: true
# sshd_config_file: /etc/ssh/sshd_config
# sshd_AuthorizedKeysFile: .ssh/authorized_keys
# sshd_AcceptEnv: "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL"
# sshd_Protocol: 2
# sshd_LoginGraceTime: 30
# sshd_SyslogFacility: AUTH
# sshd_LogLevel: VERBOSE
# sshd_PermitRootLogin: 'no'
# sshd_StrictModes: 'yes'
# sshd_IgnoreRhosts: 'yes'
# sshd_HostbasedAuthentication: 'no'
# sshd_PasswordAuthentication: 'no'
# sshd_PermitEmptyPasswords: 'no'
# sshd_ChallengeResponseAuthentication: 'no'
# sshd_GSSAPIAuthentication: 'no'
# sshd_X11DisplayOffset: 10
# sshd_PrintMotd: 'yes'
# sshd_PrintLastLog: 'yes'
# sshd_TCPKeepAlive: 'yes'
# sshd_Subsystem: "sftp /usr/lib/openssh/sftp-server"
# sshd_UsePAM: 'yes'
# sshd_UseDNS: 'no'
# sshd_KexAlgorithms: "curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
# sshd_Ciphers: "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr"
# sshd_MACs: "hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com"
# sshd_HostKey:
# - /etc/ssh/ssh_host_rsa_key
# #######
# # APT #
# #######
# apt_upgrade: true
# apt_repositories: []
# apt_ppas: []
# # # nginx ppa repo
# # - repo: ppa:nginx/stable
# # # not needed on ubuntu distribution
# # #codename: trusty
# # apt_packages:
# # - name: python3-pip
# #########
# # ALERT #
# #########
# alert_username: jingohalert
# alert_password: jMVmbM2VQ5gEiV
# alert_vault: "Jingoh0947;"
# alert_list_server:
# - '"163.172.84.28"'
# - '"37.187.127.90"'
# alert_server_ssl: gitea.jingoh.fr
# ##########
# # CHISEL #
# ##########
# chisel_version: 1.8.1
# chisel_server_host: 163.172.84.28
# chisel_server_port: 8080
# chisel_client_auth_username: user
# chisel_client_auth_password: pass
# chisel_remove_all:
# - "{{ chisel_service_destination }}"
# - "{{ chisel_config_folder }}"
# - "{{ chisel_download_destination }}"
# - "{{ chisel_install_destination }}"
# - /var/log/chisel
test_vault: !vault |
$ANSIBLE_VAULT;1.2;AES256;prod
36663965646236326237623936646161653232306263353564666238626564633530363761633164
6166363235383964626463353061343635626431396664660a333231303661343362353162353938
32373332373362656635393365363635313137306532366536323765346464336634653366383961
3965626433316138320a366336393034383065363134623239646230396432356431383935346463
6330
# test_vault: !vault |
# $ANSIBLE_VAULT;1.2;AES256;prod
# 36663965646236326237623936646161653232306263353564666238626564633530363761633164
# 6166363235383964626463353061343635626431396664660a333231303661343362353162353938
# 32373332373362656635393365363635313137306532366536323765346464336634653366383961
# 3965626433316138320a366336393034383065363134623239646230396432356431383935346463
# 6330

View File

@@ -1,99 +1,99 @@
---
package_list:
- name: python3-pip
# ---
# package_list:
# - name: python3-pip
sshd_skip_defaults: true
sshd_config_file: /etc/ssh/sshd_config
sshd_AuthorizedKeysFile: .ssh/authorized_keys
sshd_AcceptEnv: "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL"
sshd_Protocol: 2
sshd_LoginGraceTime: 30
sshd_SyslogFacility: AUTH
sshd_LogLevel: VERBOSE
sshd_PermitRootLogin: 'no'
sshd_StrictModes: 'yes'
sshd_IgnoreRhosts: 'yes'
sshd_HostbasedAuthentication: 'no'
sshd_PasswordAuthentication: 'no'
sshd_PermitEmptyPasswords: 'no'
sshd_ChallengeResponseAuthentication: 'no'
sshd_GSSAPIAuthentication: 'no'
sshd_X11DisplayOffset: 10
sshd_PrintMotd: 'yes'
sshd_PrintLastLog: 'yes'
sshd_TCPKeepAlive: 'yes'
sshd_Subsystem: "sftp /usr/lib/openssh/sftp-server"
sshd_UsePAM: 'yes'
sshd_UseDNS: 'no'
sshd_KexAlgorithms: "curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
sshd_Ciphers: "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr"
sshd_MACs: "hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com"
sshd_HostKey:
- /etc/ssh/ssh_host_rsa_key
# sshd_skip_defaults: true
# sshd_config_file: /etc/ssh/sshd_config
# sshd_AuthorizedKeysFile: .ssh/authorized_keys
# sshd_AcceptEnv: "LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL"
# sshd_Protocol: 2
# sshd_LoginGraceTime: 30
# sshd_SyslogFacility: AUTH
# sshd_LogLevel: VERBOSE
# sshd_PermitRootLogin: 'no'
# sshd_StrictModes: 'yes'
# sshd_IgnoreRhosts: 'yes'
# sshd_HostbasedAuthentication: 'no'
# sshd_PasswordAuthentication: 'no'
# sshd_PermitEmptyPasswords: 'no'
# sshd_ChallengeResponseAuthentication: 'no'
# sshd_GSSAPIAuthentication: 'no'
# sshd_X11DisplayOffset: 10
# sshd_PrintMotd: 'yes'
# sshd_PrintLastLog: 'yes'
# sshd_TCPKeepAlive: 'yes'
# sshd_Subsystem: "sftp /usr/lib/openssh/sftp-server"
# sshd_UsePAM: 'yes'
# sshd_UseDNS: 'no'
# sshd_KexAlgorithms: "curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
# sshd_Ciphers: "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr"
# sshd_MACs: "hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com"
# sshd_HostKey:
# - /etc/ssh/ssh_host_rsa_key
#######
# APT #
#######
# #######
# # APT #
# #######
apt_repositories_sources:
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal main restricted
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-updates main restricted
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal universe
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-updates universe
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal multiverse
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-updates multiverse
- deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
- deb http://security.ubuntu.com/ubuntu focal-security main restricted
- deb http://security.ubuntu.com/ubuntu focal-security universe
- deb http://security.ubuntu.com/ubuntu focal-security multiverse
# apt_repositories_sources:
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal main restricted
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-updates main restricted
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal universe
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-updates universe
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal multiverse
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# - deb http://nova.clouds.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# - deb http://security.ubuntu.com/ubuntu focal-security main restricted
# - deb http://security.ubuntu.com/ubuntu focal-security universe
# - deb http://security.ubuntu.com/ubuntu focal-security multiverse
########
# KUBE #
########
# ########
# # KUBE #
# ########
disable_firewall: true
# Need public_network for argocd
# I use any because both worker and master are not on the same network (
# They have only one public IP
kubernetes_subnet: 0.0.0.0/0
# disable_firewall: true
# # Need public_network for argocd
# # I use any because both worker and master are not on the same network (
# # They have only one public IP
# kubernetes_subnet: 0.0.0.0/0
# vip control plan 192.168.25.255
setup_vip: false
install_nginx_ingress: false
install_longhorn: false
# # vip control plan 192.168.25.255
# setup_vip: false
# install_nginx_ingress: false
# install_longhorn: false
# This variable is used when the cluster is bootstrapped for the first time
kubernetes_init_host: ovh-master
# # This variable is used when the cluster is bootstrapped for the first time
# kubernetes_init_host: ovh-master
kubernetes_init_app: true
# kubernetes_init_app: true
kubernetes_app:
- url: https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
namespace: argocd
# kubernetes_app:
# - url: https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# namespace: argocd
kubernetes_alias_bashrc:
- path: "/root/.bashrc"
regexp: "^source /usr/share/bash-completion/bash_completion"
state: present
line: "source /usr/share/bash-completion/bash_completion"
- path: "/root/.bashrc"
regexp: "^source /etc/bash_completion"
state: present
line: "source /etc/bash_completion"
- path: "/root/.bashrc"
regexp: "^source <(kubectl completion bash)"
state: present
line: "source <(kubectl completion bash)"
- path: "/root/.bashrc"
regexp: "^alias k=kubectl"
state: present
line: "alias k=kubectl"
- path: "/root/.bashrc"
regexp: "^complete -F __start_kubectl k"
state: present
line: "complete -F __start_kubectl k"
- path: "/root/.bashrc"
regexp: '^alias kname="kubectl config set-context --current --namespace="'
state: present
line: '^alias kname="kubectl config set-context --current --namespace="'
# kubernetes_alias_bashrc:
# - path: "/root/.bashrc"
# regexp: "^source /usr/share/bash-completion/bash_completion"
# state: present
# line: "source /usr/share/bash-completion/bash_completion"
# - path: "/root/.bashrc"
# regexp: "^source /etc/bash_completion"
# state: present
# line: "source /etc/bash_completion"
# - path: "/root/.bashrc"
# regexp: "^source <(kubectl completion bash)"
# state: present
# line: "source <(kubectl completion bash)"
# - path: "/root/.bashrc"
# regexp: "^alias k=kubectl"
# state: present
# line: "alias k=kubectl"
# - path: "/root/.bashrc"
# regexp: "^complete -F __start_kubectl k"
# state: present
# line: "complete -F __start_kubectl k"
# - path: "/root/.bashrc"
# regexp: '^alias kname="kubectl config set-context --current --namespace="'
# state: present
# line: '^alias kname="kubectl config set-context --current --namespace="'

View File

@@ -81,19 +81,19 @@
#||-----> GPG error: https://pkgs.netbird.io/debian stable InRelease: The following signatures couldn't be verified because the public key is not available
roles:
# - robertdebock.update
# - devsec.hardening.os_hardening
# - devsec.hardening.ssh_hardening
# - robertdebock.update
- devsec.hardening.os_hardening
- devsec.hardening.ssh_hardening
# - maxlareo.rkhunter
# - maxlareo.chkrootkit
# - robertdebock.auditd
- { role: geerlingguy.firewall, tags: firewall }
# - grog.management-user
# - GROG.user
# - GROG.authorized-key
# - GROG.sudo
# - ansible_unattended_upgrades
# - buluma.lynis
- robertdebock.auditd
- geerlingguy.firewall
- grog.management-user
- GROG.user
- GROG.authorized-key
- GROG.sudo
- ansible_unattended_upgrades
- buluma.lynis
# roles:
# - role: netways.elasticstack.elasticsearch
@@ -102,7 +102,7 @@
- name: Update repositories and install py3-pip package
community.general.apk:
name: py3-pip
name: python3-pip
update_cache: true
delegate_to: localhost
@@ -121,7 +121,7 @@
firstmatch: true
line: '#!Enable-HMAC-ETM'
- name: Reload service httpd, in all cases
- name: Reload service sshd, in all cases
ansible.builtin.service:
name: sshd.service
state: reloaded

View File

@@ -1,130 +1,130 @@
---
# ---
#* DOCKER
docker_install_compose: true
pip_executable: pip3
# #* DOCKER
# docker_install_compose: true
# pip_executable: pip3
#*PIP
pip_install_packages:
- docker-compose
# #*PIP
# pip_install_packages:
# - docker-compose
#* SSH
#ssh_listen_to: "{{ host_private_address }}"
# #* SSH
# #ssh_listen_to: "{{ host_private_address }}"
#* USERS
# #* USERS
management_user_list:
- name: admin
shell: '/bin/bash'
authorized_keys:
- key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClVS1uxDfwS6OusQ4qgcZ6hBc8YRBE8MyXu0sUfGN7S3itjI3W2ixD18v80el8dVQVR12jCY0ueavgoV1cHrfGWkFoLKi+QrA4MuSNUChj0NBbyLTmdwPvne8LRv3ttCbRSJ/6bIEveX8y/7kGn/R1NDFlfE6b5R8ersBUKCQM6YxblAkv/XH8cJlQXhr1nLhVOl/ae+Q/pTCbgioB8qrmGEuMvOLmavcFf7IJbJcSgeiXSOnyIRl2n64X6lbRK+MRZ61pF6vAOXA+Ixyt/fAbO7sjqU0+cEhU5Br5/VcqG4Bc5nhWimtXIHPry3aLV5PtN6K9/i3eA5F6Jpa82JzmUMEbWSBIga02yIw9GjRyAI6ccH/kJGuB6QN5/YwGHpOF2f0FGiEAbUz41mLngN3SsXL1pdV2hT3x56/GIcGe6p/f1cytwVCyOaE7W87B05w5JYb1sSFj6QuGW0rHWfnHT5SY87Mk/H8VgZPaPbm+hSjLIQRAmUYQR+Rub1o9bXE= stephane"
exclusive: yes
sudo:
hosts: ALL
as: ALL
commands: ALL
nopasswd: ALL
# management_user_list:
# - name: admin
# shell: '/bin/bash'
# authorized_keys:
# - key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClVS1uxDfwS6OusQ4qgcZ6hBc8YRBE8MyXu0sUfGN7S3itjI3W2ixD18v80el8dVQVR12jCY0ueavgoV1cHrfGWkFoLKi+QrA4MuSNUChj0NBbyLTmdwPvne8LRv3ttCbRSJ/6bIEveX8y/7kGn/R1NDFlfE6b5R8ersBUKCQM6YxblAkv/XH8cJlQXhr1nLhVOl/ae+Q/pTCbgioB8qrmGEuMvOLmavcFf7IJbJcSgeiXSOnyIRl2n64X6lbRK+MRZ61pF6vAOXA+Ixyt/fAbO7sjqU0+cEhU5Br5/VcqG4Bc5nhWimtXIHPry3aLV5PtN6K9/i3eA5F6Jpa82JzmUMEbWSBIga02yIw9GjRyAI6ccH/kJGuB6QN5/YwGHpOF2f0FGiEAbUz41mLngN3SsXL1pdV2hT3x56/GIcGe6p/f1cytwVCyOaE7W87B05w5JYb1sSFj6QuGW0rHWfnHT5SY87Mk/H8VgZPaPbm+hSjLIQRAmUYQR+Rub1o9bXE= stephane"
# exclusive: yes
# sudo:
# hosts: ALL
# as: ALL
# commands: ALL
# nopasswd: ALL
#* FIREWALL
# #* FIREWALL
firewall_allowed_tcp_ports:
- "22"
- "80"
- "443"
- "9100"
- "9090"
- "3000"
- "9323"
# firewall_allowed_tcp_ports:
# - "22"
# - "80"
# - "443"
# - "9100"
# - "9090"
# - "3000"
# - "9323"
#* NETBIRD
# #* NETBIRD
netbird_setup_key: F234BD1F-385B-4BEA-8234-608CCB1062ED
netbird_register: true
# netbird_setup_key: F234BD1F-385B-4BEA-8234-608CCB1062ED
# netbird_register: true
#* TLS
# #* TLS
node_exporter_tls_server_config:
cert_file: /etc/node_exporter/tls.cert
key_file: /etc/node_exporter/tls.key
# node_exporter_tls_server_config:
# cert_file: /etc/node_exporter/tls.cert
# key_file: /etc/node_exporter/tls.key
#* NODE_EXPORTER
# #* NODE_EXPORTER
# node_exporter_basic_auth_users:
# randomuser: examplepassword
node_exporter_web_listen_address: "{{ host_private_address }}:9100"
# # node_exporter_basic_auth_users:
# # randomuser: examplepassword
# node_exporter_web_listen_address: "{{ host_private_address }}:9100"
#* PROMETHEUS
# #* PROMETHEUS
prometheus_web_listen_address: "{{ host_private_address }}:9090"
prometheus_scrape_configs:
- job_name: "prometheus" # Custom scrape job, here using `static_config`
metrics_path: "/metrics"
static_configs:
- targets:
- "{{ host_private_address }}:9090"
- job_name: "node1"
scheme: https # Custom scrape job, here using `static_config`
metrics_path: "/metrics"
tls_config:
ca_file: "{{ node_exporter_tls_server_config.cert_file }}"
static_configs:
- targets:
- "{{ ansible_hostname }}.netbird.cloud:9100"
- job_name: "node2"
scheme: https # Custom scrape job, here using `static_config`
metrics_path: "/metrics"
tls_config:
ca_file: "/etc/node_exporter/tls_scaleway.cert"
static_configs:
- targets:
- "scaleway.netbird.cloud:9100"
# - "{{ host_private_address }}:9100"
- job_name: "git"
scheme: https # Custom scrape job, here using `static_config`
metrics_path: "/metrics"
static_configs:
- targets:
- "gitea.jingoh.fr"
- job_name: "publicservicediscovery"
metrics_path: "/metrics"
basic_auth:
username: 'jingohtraf'
password: 'FSzmSLr#6i9M#d'
scheme: https
file_sd_configs:
- files:
- "{{ prometheus_config_dir }}/file_sd/node.yml" # This line loads file created from `prometheus_targets`
prometheus_targets:
node: # This is a base file name. File is located in "{{ prometheus_config_dir }}/file_sd/<<BASENAME>>.yml"
- targets: #
- "traefik.jingoh.fr"
# prometheus_web_listen_address: "{{ host_private_address }}:9090"
# prometheus_scrape_configs:
# - job_name: "prometheus" # Custom scrape job, here using `static_config`
# metrics_path: "/metrics"
# static_configs:
# - targets:
# - "{{ host_private_address }}:9090"
# - job_name: "node1"
# scheme: https # Custom scrape job, here using `static_config`
# metrics_path: "/metrics"
# tls_config:
# ca_file: "{{ node_exporter_tls_server_config.cert_file }}"
# static_configs:
# - targets:
# - "{{ ansible_hostname }}.netbird.cloud:9100"
# - job_name: "node2"
# scheme: https # Custom scrape job, here using `static_config`
# metrics_path: "/metrics"
# tls_config:
# ca_file: "/etc/node_exporter/tls_scaleway.cert"
# static_configs:
# - targets:
# - "scaleway.netbird.cloud:9100"
# # - "{{ host_private_address }}:9100"
# - job_name: "git"
# scheme: https # Custom scrape job, here using `static_config`
# metrics_path: "/metrics"
# static_configs:
# - targets:
# - "gitea.jingoh.fr"
# - job_name: "publicservicediscovery"
# metrics_path: "/metrics"
# basic_auth:
# username: 'jingohtraf'
# password: 'FSzmSLr#6i9M#d'
# scheme: https
# file_sd_configs:
# - files:
# - "{{ prometheus_config_dir }}/file_sd/node.yml" # This line loads file created from `prometheus_targets`
# prometheus_targets:
# node: # This is a base file name. File is located in "{{ prometheus_config_dir }}/file_sd/<<BASENAME>>.yml"
# - targets: #
# - "traefik.jingoh.fr"
#* GRAFANA
# #* GRAFANA
grafana_address: "{{ host_private_address }}"
install_grafana__protocol: "https"
install_grafana__http_addr: "{{ host_private_address }}"
install_grafana__domain: "{{ ansible_hostname }}.netbird.cloud"
inv_install_grafana__cert_file: "{{ node_exporter_tls_server_config.cert_file }}"
inv_install_grafana__cert_key: "{{ node_exporter_tls_server_config.key_file }}"
# grafana_address: "{{ host_private_address }}"
# install_grafana__protocol: "https"
# install_grafana__http_addr: "{{ host_private_address }}"
# install_grafana__domain: "{{ ansible_hostname }}.netbird.cloud"
# inv_install_grafana__cert_file: "{{ node_exporter_tls_server_config.cert_file }}"
# inv_install_grafana__cert_key: "{{ node_exporter_tls_server_config.key_file }}"
# ##########
# # CHISEL #
# ##########
# # ##########
# # # CHISEL #
# # ##########
# chisel_server: false
# chisel_client_server_url: "{{ chisel_server_host }}:8080"
# chisel_client_remotes: "R:{{ chisel_server_host }}:socks"
# chisel_service_name: chisel-client
# chisel_config_name: chisel-client
# # chisel_server: false
# # chisel_client_server_url: "{{ chisel_server_host }}:8080"
# # chisel_client_remotes: "R:{{ chisel_server_host }}:socks"
# # chisel_service_name: chisel-client
# # chisel_config_name: chisel-client
# chisel_conf:
# # chisel enable auth and finder
# - path: "/etc/chisel/{{ chisel_config_name }}.conf"
# regexp: "^AUTH=--auth {{ chisel_client_auth_username }}:{{ chisel_client_auth_password }}"
# state: present
# line: "AUTH=--auth {{ chisel_client_auth_username }}:{{ chisel_client_auth_password }}"
# - path: "/etc/chisel/{{ chisel_config_name }}.conf"
# regexp: "^FINGERPRINT=--fingerprint {{ chisel_client_server_fingerprint }}"
# state: present
# line: "FINGERPRINT=--fingerprint {{ hostvars[groups['server'][0]].chisel_fingerprint[4]|default('') }}"
# # chisel_conf:
# # # chisel enable auth and finder
# # - path: "/etc/chisel/{{ chisel_config_name }}.conf"
# # regexp: "^AUTH=--auth {{ chisel_client_auth_username }}:{{ chisel_client_auth_password }}"
# # state: present
# # line: "AUTH=--auth {{ chisel_client_auth_username }}:{{ chisel_client_auth_password }}"
# # - path: "/etc/chisel/{{ chisel_config_name }}.conf"
# # regexp: "^FINGERPRINT=--fingerprint {{ chisel_client_server_fingerprint }}"
# # state: present
# # line: "FINGERPRINT=--fingerprint {{ hostvars[groups['server'][0]].chisel_fingerprint[4]|default('') }}"

File diff suppressed because it is too large Load Diff

53
hosts
View File

@@ -1,53 +1,12 @@
# Test VM vagrant
; [kubernetes:children]
; kubemaster
; kubeworker
; [kubemaster]
; ovh_master ansible_host=37.187.127.90 ansible_user=stephane
[netbird]
ovh01 ansible_host=5.135.181.11 ansible_user=stephane
scaleway_fr ansible_host=163.172.84.28 ansible_user=stephane
node1 ansible_host=163.172.209.36 ansible_user=stephane
node2 ansible_host=5.135.181.11 ansible_user=stephane
scaleway ansible_host=163.172.84.28 ansible_user=stephane
[controller]
scaleway ansible_host=163.172.84.28 ansible_user=stephane
[monitoring]
ovh01 ansible_host=5.135.181.11 ansible_user=stephane
; ubuntu ansible_host=192.168.0.22 ansible_user=vagrant ansible_password=vagrant
[kubernetes]
node1 ansible_host=163.172.209.36 ansible_user=stephane
node2 ansible_host=5.135.181.11 ansible_user=stephane
[elasticsearch]
ubuntu ansible_host=192.168.0.26 ansible_user=vagrant ansible_password=vagrant
[test]
ubuntu ansible_host=192.168.0.26 ansible_user=vagrant ansible_password=vagrant
; # TO KNOW WHOIS CHISEL SERVER
; [server]
; scaleway_fr ansible_host=163.172.84.28 ansible_user=stephane
; [local]
; vagrant ansible_host=192.168.33.10 ansible_user=vagrant ansible_password=vagrant
; ubuntu-worker ansible_host=192.168.33.11 ansible_user=vagrant ansible_password=vagrant
; [workers]
; ubuntu-worker ansible_host=192.168.33.11 ansible_user=vagrant ansible_password=vagrant
#kubectl label node ubuntu-worker node-role.kubernetes.io/worker ubuntu-worker
[testswarm]
manager ansible_host=192.168.50.4 ansible_user=vagrant ansible_password=vagrant ansible_become_password=vagrant
worker1 ansible_host=192.168.50.40 ansible_user=vagrant ansible_password=vagrant ansible_become_password=vagrant
worker2 ansible_host=192.168.50.44 ansible_user=vagrant ansible_password=vagrant ansible_become_password=vagrant
[docker_swarm_manager]
manager ansible_host=192.168.50.4 ansible_user=vagrant ansible_password=vagrant ansible_become_password=vagrant
[docker_swarm_worker]
worker1 ansible_host=192.168.50.40 ansible_user=vagrant ansible_password=vagrant ansible_become_password=vagrant
worker2 ansible_host=192.168.50.44 ansible_user=vagrant ansible_password=vagrant ansible_become_password=vagrant