Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 4cf3b7c9 authored by freezed's avatar freezed :mountain:
Browse files

:recycle: Backport base code from stable

parent c6bdf9cb
No related branches found
No related tags found
No related merge requests found
EDITOR = geany
help: # Print help on Makefile
@grep '^[^.#]\+:\s\+.*#' Makefile | \
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\e[1;33;4;40m"`\1`printf "\033[0m"` \3/" | \
expand -t20
clean:
# Remove files not in source control
clean: # Remove files not in source control
find . -type f -name "*.retry" -delete
find . -type f -name "*.orig" -delete
open_all:
open_all: # Open all projects files
${EDITOR} .gitignore inv* Makefile README.md
${EDITOR} tasks/*.yml
${EDITOR} tasks/files/sshd_config
${EDITOR} tasks/templates/*.j2
${EDITOR} tasks/system_cfg/*.yml
${EDITOR} tasks/system_cfg/templates/*.j2
${EDITOR} tasks/user_cfg/*.yml
......@@ -17,5 +20,5 @@ open_all:
${EDITOR} tasks/user_cfg/vars/*.yml
${EDITOR} tasks/vars/*.yml
inventory_generation:
gen_invent: # Generate base inventory
cp inventory.sample inventory && ${EDITOR} inventory
......@@ -15,6 +15,7 @@ Suitable for server and workstation.
| task | purpose |
| :--------------------------------------: | :--------------------------------------------------------------: |
| [`apt.yml`](tasks/apt.yml) | Install generic packages |
| [`become_user_cfg.yml`](tasks/become_user_cfg.yml) | Set `sudo` without password for `become_user` access |
| [`host_info.yml`](tasks/host_info.yml) | Return message with distribution full name & version |
| [`shutdown.yml`](tasks/shutdown.yml) | Shutdown target in 5 min (not if host is in production group) |
......@@ -27,6 +28,6 @@ Suitable for server and workstation.
-------------
1. Setup your `inventory` file from [`inventory.sample`](inventory.sample) :
- `make inventory_generation`
- `make gen_invent`
1. Run `host_info` playbook to `<group_foo>` & `<group_bar>` :
- `ansible-playbook tasks/host_info.yml -i inventory -e host_list=<group_foo>:<group_bar>`
[production]
node10 ansible_host=192.168.1.10
node33 ansible_host=192.168.1.33
server1 ansible_host=<XX.XX.XX.XX>
server5 ansible_host=<XX.XX.XX.XX> my_user=<OTHER_USERNAME> inventory_fqdn=subd.somedomain.ltd
[staging]
node20 ansible_host=192.168.1.20
node44 ansible_host=192.168.1.44
[backup]
server2 ansible_host=<XX.XX.XX.XX>
server4 ansible_host=<XX.XX.XX.XX>
[devel]
server3 ansible_host=<XX.XX.XX.XX>
[station]
localhost
node11 ansible_host=192.168.1.11
node22 ansible_host=192.168.1.22
station1 ansible_host=192.168.xx.xx
station3 ansible_host=192.168.xx.xx my_user=<OTHER_USERNAME>
station4 ansible_host=192.168.xx.xx
station5 ansible_host=192.168.xx.xx
[gnome]
node11
station1
station5
[mate]
node2
station3
station4
[provider_b]
server5
[pve]
server[2:4]
[provider_a]
server[1:4]
[vps]
server5
[workstat]
node11
station1
station3
station5
[web]
server5
server1
[physical:children]
station
[zfs]
station1
station3
station4
server[2:4]
[server:children]
pve
[station:children]
gnome
mate
workstat
[vps:children]
provider_b
[all:vars]
inventory_fqdn="{{ inventory_hostname }}.local"
ldp_token="<PUT-YOURS-HERE>"
ldp_zone="<PUT-YOURS-HERE>"
my_user="<USERNAME>"
gateway=<XX.XX.XX.XX>
inventory_fqdn="{{ inventory_hostname }}.domain.ltd"
ldp_token=<LDP_TOKEN>
ldp_zone=<LDP_ZONE>
timezone="UTC"
user_shell=/bin/bash
[backup:vars]
backup_user="<BACKUP_USERNAME>"
[pve:vars]
[server:vars]
gateway="<GATEWAY_IP>"
inventory_fqdn="{{ inventory_hostname }}.domain.tld"
timezone="UTC"
backup_user=<BACKUP_USERNAME>
[station:vars]
inventory_fqdn="{{ inventory_hostname }}.local"
my_user=<USERNAME>
timezone="Europe/Paris"
user_shell=/bin/zsh
[workstation:vars]
timezone="Europe/Paris"
......@@ -92,4 +92,4 @@ set incsearch
"set hlsearch
" Décommentez la ligne suivante si vous voulez afficher les numéros de ligne
"set number
set number relativenumber
......@@ -41,7 +41,7 @@ alias vdestroy='VENV_PATH="${HOME}/.venvs/$(pwd | cut -d"/" -f5)/" && echo ${VEN
# Timed
alias tart='timed start _job_;vi ~/.timed +'
alias tsto='timed stop;ttod'
alias ttod='cat ~/.timed | grep "$(date +%d) Dec 2022" | timed parse'
alias ttod='cat ~/.timed | grep "$(date +%d) Jan 2023" | timed parse'
# ######################### #
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment