diff --git a/inventory.sample b/inventory.sample index a3506360ce931cceb09b6c81dbe9a080c316a48a..c78c15812b1ea977cb7b4cff432276d7e7991745 100644 --- a/inventory.sample +++ b/inventory.sample @@ -2,6 +2,12 @@ 192.168.1.1 192.168.1.11 +[gnome] +192.168.1.11 + +[mate] +192.168.1.2 + [virtual] 192.168.1.2 192.168.1.22 @@ -10,11 +16,19 @@ 192.168.1.1 192.168.1.2 -[workstation] +[workstat] +192.168.1.11 + +[station] localhost 192.168.1.11 192.168.1.22 +[workstation:children] +gnome +mate +workstat + [server:vars] timezone="UTC" gateway="<GATEWAY_IP>" diff --git a/tasks/user_cfg/files/dotfiles/gitconfig b/tasks/user_cfg/files/dotfiles/gitconfig index cd596e9f49f6a44722855a7eff48436e19bc87d4..71aeb57bcf7a79712d26462e36c3e065e259a75f 100644 --- a/tasks/user_cfg/files/dotfiles/gitconfig +++ b/tasks/user_cfg/files/dotfiles/gitconfig @@ -23,7 +23,8 @@ fp = fetch --prune lga = log --graph --oneline --decorate --since=10days --all lgla = log --graph --oneline --decorate --date=short --all - lg = log --graph --oneline --decorate --since=10days + lg1 = git log --max-count=1 --stat + lg2 = git log --max-count=2 --stat st = status [mergetool] @@ -37,6 +38,9 @@ [checkout] defaultRemote=origin +[url "ssh://git@git.afpy.org/"] + pushInsteadOf = https://git.afpy.org/ + [url "ssh://git@github.com/"] pushInsteadOf = https://github.com/ diff --git a/tasks/user_cfg/files/dotfiles/zshrc b/tasks/user_cfg/files/dotfiles/zshrc index 0a597e1d4f0960053aa0528f95413934bcaebad6..a5b38203a62be12496f5bc6bfbca18c79452b1db 100644 --- a/tasks/user_cfg/files/dotfiles/zshrc +++ b/tasks/user_cfg/files/dotfiles/zshrc @@ -35,12 +35,10 @@ function gh() { grep --color "$1" ~/.history } alias ada='sudo apt update && sudo apt list --upgradable && sudo apt clean' alias agr='sudo apt upgrade && sudo apt autoclean && sudo apt autoremove' alias apti='sudo apt install' -alias p1='ping -c 1 ' alias gps='for proj in $(find ~/git -mindepth 1 -maxdepth 1 -type d -printf "%p\n");do RES=$(git -C ${proj} status -s) && [[ -n ${RES} ]] && echo "\n# ${proj#${HOME}/git/}:\n${RES}";done' alias gpu='for proj in $(find ~/git -mindepth 1 -maxdepth 1 -type d -printf "%p\n");do git -C ${proj} fetch --prune --quiet || echo "ERROR fetching git repo: ${proj#${HOME}/git/}";done' alias p1='ping -c 1 ' alias sudo='sudo ' -alias ttoday='cat ~/.timed|grep "$(date +%d) Oct 2021" | timed parse' alias vact='source ~/.venvs/$(pwd | cut -d"/" -f5)/bin/activate' alias vc10='~/pylocal/bin/python3.10 -m venv --clear --copies ~/.venvs/$(pwd | cut -d "/" -f5)' alias vc='python3 -m venv --clear --copies ~/.venvs/$(pwd | cut -d "/" -f5)' @@ -49,7 +47,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) Jan 2022" | timed parse' +alias ttod='cat ~/.timed | grep "$(date +%d) Dec 2022" | timed parse' # ######################### # @@ -194,7 +192,7 @@ unsetopt hup # ########################################### # setopt EXTENDED_HISTORY -export HISTTIMEFORMAT="[%F %T] " +#export HISTTIMEFORMAT="[%F %T] " # Nombre d'entrées dans l'historique export HISTORY=50000 diff --git a/tasks/user_cfg/my_user.yml b/tasks/user_cfg/my_user.yml index 3e0354b5cc6363f74697e1aeebd5a3ec4b722426..e4638f6ea1e4fc16c00d0dd7f90f1940e5043171 100644 --- a/tasks/user_cfg/my_user.yml +++ b/tasks/user_cfg/my_user.yml @@ -20,6 +20,14 @@ src: templates/ssh_config.j2 mode: 0640 +- name: "MY USER | Local public key for {{ my_user }}" + become: yes + ansible.builtin.authorized_key: + comment: "Managed by Ansible" + key: https://gitlab.com/free_zed.keys + state: present + user: "{{ my_user }}" + - name: MY USER | git directory presence become: yes when: inventory_hostname in groups.station @@ -31,12 +39,12 @@ state: directory - name: INCLUDE_VARS | git - when: inventory_hostname in groups.station + when: inventory_hostname in groups.workstat ansible.builtin.include_vars: "vars/git.yml" - name: MY USER | clone git repos become: yes - when: inventory_hostname in groups.station + when: inventory_hostname in groups.workstat ansible.builtin.git: dest: "/home/{{ my_user }}/git/{{ item.local_name }}" repo: "{{ item.url_https }}" diff --git a/tasks/user_cfg/vars/git.yml b/tasks/user_cfg/vars/git.yml index b87733892e7e912032283951bb51da92b4cc27a7..1a744a9e387237bdb8bbacfeb196b1209e31e076 100644 --- a/tasks/user_cfg/vars/git.yml +++ b/tasks/user_cfg/vars/git.yml @@ -1,13 +1,11 @@ --- git_repositories: - - {local_name: "afpy19", url_https: "https://gitlab.com/free_zed/afpy19.git"} - {local_name: "askthom", url_https: "https://lab.frogg.it/fcode/askthom.git"} - {local_name: "djlease", url_https: "https://gitlab.com/free_zed/djlease.git"} - {local_name: "eb-car", url_https: "https://gitlab.com/combien-de-temps-pour-faire-sonner-la-cloche-a-aiguebelle/combien-de-temps-pour-faire-sonner-la-cloche-a-aiguebelle.gitlab.io.git"} - - {local_name: "exchange", url_https: "https://gitlab.com/free_zed/mymsesb.git"} - {local_name: "forga-a14n", url_https: "https://gitlab.com/free_zed/djbp.git"} - {local_name: "forga-core", url_https: "https://gitlab.com/forga/tool/django/core.git"} - - {local_name: "forga-dev-bpy", url_https: "https://gitlab.com/forga/devel/boilerplate/python.git"} + - {local_name: "forga-dev-bpy", url_https: "https://git.afpy.org/fcode/boilerplate-python.git"} - {local_name: "forga-emb", url_https: "https://gitlab.com/forga/process/fr/embarquement.git"} - {local_name: "forga-glio", url_https: "https://gitlab.com/forga/forga.gitlab.io.git"} - {local_name: "forga-man", url_https: "https://gitlab.com/forga/process/fr/manuel.git"} @@ -18,7 +16,7 @@ git_repositories: - {local_name: "gpxpy", url_https: "https://github.com/freezed/gpxpy.git"} - {local_name: "grandpy", url_https: "https://github.com/freezed/ocp7.git"} - {local_name: "hellozappa", url_https: "https://gitlab.com/free_zed/hellozappa.git"} - - {local_name: "men-rt-ocp08", url_https: "https://github.com/remace/OC-P8-Purbeurre.git"} + - {local_name: "ldpy", url_https: "https://git.afpy.org/fcode/ldpy.git.git"} - {local_name: "mountaingpx", url_https: "https://github.com/krisanselmo/mountaingpx.git"} - {local_name: "myasb", url_https: "https://gitlab.com/forga/tool/ansible/debian.git"} - {local_name: "mypsb", url_https: "https://gitlab.com/free_zed/mypsb.git"} diff --git a/tasks/vars/Ubuntu.yml b/tasks/vars/Ubuntu.yml index e2d262c921b4d34fb4cab8a5b92473efd66c597f..dcc7ea95a93350e4e6f09806c7d3c001c1b7157c 100644 --- a/tasks/vars/Ubuntu.yml +++ b/tasks/vars/Ubuntu.yml @@ -5,10 +5,10 @@ os_pkg: [] os_uninstall_pkg: - thunderbird -snap_uninstall_pkg: - - firefox +snap_uninstall_pkg: [] station_os_pkg: - chromium-browser-l10n - firefox-locale-fr - firefox + - nautilus-image-converter diff --git a/tasks/vars/main.yml b/tasks/vars/main.yml index 86128043aba8a0260a4f79ab9aab2d02313e5c3a..916fc96d01803f7dfb2dd5040d5eaa8062c4fefd 100644 --- a/tasks/vars/main.yml +++ b/tasks/vars/main.yml @@ -18,7 +18,10 @@ base_pkg: - xkcdpass - zsh -base_uninstall_pkg: [] +base_uninstall_pkg: + - geany-plugin-shiftcolumn + - jq + - httpie station_pkg: - ansible @@ -31,7 +34,6 @@ station_pkg: - geany-plugin-git-changebar - geany-plugin-markdown - geany-plugin-prettyprinter - - geany-plugin-shiftcolumn - geany-plugin-spellcheck - geany-plugin-workbench - geany-plugin-xmlsnippets @@ -40,9 +42,7 @@ station_pkg: - gnome-disk-utility - gpsprune - hplip - - httpie - jhead - - jq - keepassx - make - meld