diff --git a/automatisation/ansible/ansible.cfg b/automatisation/ansible/ansible.cfg new file mode 100644 index 0000000..e69de29 diff --git a/automatisation/ansible/ansible_hosts b/automatisation/ansible/ansible_hosts new file mode 100644 index 0000000..85d4c42 --- /dev/null +++ b/automatisation/ansible/ansible_hosts @@ -0,0 +1,17 @@ +[webservers] +localhost + +[riseup] +proxmox.coussinet.org + +[not_yet_servers] +peertube.cipherbliss.com +mastodon.cipherbliss.com +www.cipherbliss.com + +[linessland] +bbb.liness.org ansible_port=3910 ansible_user=tykayn + +[faoland] +192.168.1.2 +192.168.1.15 \ No newline at end of file diff --git a/automatisation/ansible/backup.yml b/automatisation/ansible/backup.yml new file mode 100644 index 0000000..253cf3b --- /dev/null +++ b/automatisation/ansible/backup.yml @@ -0,0 +1,14 @@ +- name: installer des programmes de backup + hosts: linessland + become: yes + become_user: root +# vars: +# server_name: localhost + tasks: + - name: ensure latest version of main tools for desktop is installed + apt: + state: present + name: +# - automysqlbackup +# - autopostgresqlbackup + - borgbackup \ No newline at end of file diff --git a/automatisation/ansible/cronjob_websites_containter_root.yml b/automatisation/ansible/cronjob_websites_containter_root.yml new file mode 100644 index 0000000..1cbb9bc --- /dev/null +++ b/automatisation/ansible/cronjob_websites_containter_root.yml @@ -0,0 +1,8 @@ +- name: cronjob de vérification des programmes installés pour l'utilisateur root + hosts: localhost + tasks: + - name: "vérifier l'existence d'un cronjob pour l'utilisateur root pour le workdflow nextcloud" + ansible.builtin.cron: + name: "run nextcloud workflows of root for container tk_websites" + minute: "*/30" + job: "/bin/bash ~/ansible/cronjob_nextcloud.sh" diff --git a/automatisation/ansible/cronjob_workflow.yml b/automatisation/ansible/cronjob_workflow.yml new file mode 100644 index 0000000..1dac254 --- /dev/null +++ b/automatisation/ansible/cronjob_workflow.yml @@ -0,0 +1,8 @@ +- name: cronjob pour le workflow nextcloud toutes les 5 minutes + hosts: localhost + tasks: + - name: "vérifier l'existence d'un cronjob pour le workdflow nextcloud" + ansible.builtin.cron: + name: "run nextcloud workflows of tykayn" + minute: "*/5" + job: "/bin/bash ~/Nextcloud/ressources/workflow_nextcloud/cronjob_nextcloud.sh" diff --git a/automatisation/ansible/cronjob_workflow_root.yml b/automatisation/ansible/cronjob_workflow_root.yml new file mode 100644 index 0000000..61a9821 --- /dev/null +++ b/automatisation/ansible/cronjob_workflow_root.yml @@ -0,0 +1,8 @@ +- name: cronjob de vérification des programmes installés pour l'utilisateur root + hosts: localhost + tasks: + - name: "vérifier l'existence d'un cronjob pour l'utilisateur root pour le workdflow nextcloud" + ansible.builtin.cron: + name: "run nextcloud workflows of root" + minute: "*/30" + job: "/bin/bash ~/Nextcloud/ressources/workflow_nextcloud/cronjob_nextcloud.sh" diff --git a/automatisation/ansible/node_packages.yml b/automatisation/ansible/node_packages.yml new file mode 100644 index 0000000..6850a56 --- /dev/null +++ b/automatisation/ansible/node_packages.yml @@ -0,0 +1,45 @@ +- name: "vérifier l'existence des paquets NPM pour le développement" + hosts: localhost + tasks: + - name: "Angular CLI" + community.general.npm: + name: "@angular/cli" + global: true +# - name: "Vue CLI" +# community.general.npm: +# name: "@vue/cli" +# global: true + - name: "Encore" + community.general.npm: + name: "encore" + global: true + - name: "node version manager" + community.general.npm: + name: "nvm" + global: true + state: absent + - name: "cypress test runner" + community.general.npm: + name: "cypress" + global: true + - name: "Nuxt cli nuxi" + community.general.npm: + name: "nuxi" + global: true + - name: "yarn" + community.general.npm: + name: "yarn" + global: true + + - name: "eslint" + community.general.npm: + name: "eslint" + global: true + - name: "nodemon" + community.general.npm: + name: "nodemon" + global: true + - name: "serve" + community.general.npm: + name: "serve" + global: true diff --git a/automatisation/ansible/pip_modules.yml b/automatisation/ansible/pip_modules.yml new file mode 100644 index 0000000..07166bf --- /dev/null +++ b/automatisation/ansible/pip_modules.yml @@ -0,0 +1,38 @@ +# Install snaps +- name: installer des programmes avec python pip + hosts: localhost + become: true + become_user: root + vars: + server_name: localhost + tasks: + - name: Install guessfilename + ansible.builtin.pip: + name: guessfilename + - name: Install appendfilename + ansible.builtin.pip: + name: appendfilename + - name: Install memacs + ansible.builtin.pip: + name: memacs + - name: Install vosk + ansible.builtin.pip: + name: vosk + - name: Install date2name + ansible.builtin.pip: + name: date2name + - name: Install move2archive + ansible.builtin.pip: + name: move2archive + - name: Install filetags + ansible.builtin.pip: + name: filetags + - name: Install ical2orgpy + ansible.builtin.pip: + name: ical2orgpy + - name: Install yt-dlp + ansible.builtin.pip: + name: yt-dlp + - name: Install woob + ansible.builtin.pip: + name: woob \ No newline at end of file diff --git a/automatisation/ansible/riseup_checks.yml b/automatisation/ansible/riseup_checks.yml new file mode 100644 index 0000000..956effc --- /dev/null +++ b/automatisation/ansible/riseup_checks.yml @@ -0,0 +1,23 @@ +- name: vérifier les services de riseup + hosts: localhost + become: true + become_user: root + vars: + server_name: localhost + tasks: + - name: Make sure there is no 'apache2' + systemd: + name: apache2 + state: stopped + enabled: no + register: result_apache + + - name: Make sure 'nginx' is started + systemd: + name: nginx + state: started + enabled: yes + register: result_nginx + - name: Show result + debug: + msg: "{{ result_nginx }}" diff --git a/automatisation/ansible/server_tk_softwares.yml b/automatisation/ansible/server_tk_softwares.yml new file mode 100644 index 0000000..0552e25 --- /dev/null +++ b/automatisation/ansible/server_tk_softwares.yml @@ -0,0 +1,57 @@ +- name: installer des programmes utiles avec apt + hosts: localhost + become: yes + become_user: root + vars: + server_name: localhost + tasks: + - name: ensure latest version of main tools is installed on a headless computer + apt: + state: present + name: + - arp-scan + - borgbackup + - curl + - docker + - docker-compose + - etckeeper + - git + - gnupg + - jq + - meld + - nano + - ncdu + - nginx + - restic + - npm + - pandoc + - php + - python3 + - python3-pip + - tig + - zsh + # - veracrypt + - testdisk + - texlive + - rbenv + - htop +# - btop + - python3-pip + - python3-setuptools + - autopostgresqlbackup + - automysqlbackup + - certbot + - smartmontools + - fail2ban + - snapd + - unattended-upgrades + - php + - php-fpm + - php-xml + - php-mysql + - rsync + - php-dom + - php-curl + - vrms + - syncthing + - sshfs diff --git a/automatisation/ansible/snaps.yml b/automatisation/ansible/snaps.yml new file mode 100644 index 0000000..644eda0 --- /dev/null +++ b/automatisation/ansible/snaps.yml @@ -0,0 +1,49 @@ +# Install snaps +- name: installer des programmes avec snap + hosts: localhost + become: true + become_user: root + vars: + server_name: localhost + tasks: + - name: Install emacs with option --classic + community.general.snap: + name: + - emacs + - blender + - rambox + classic: true +# - name: Install "blender" with option --classic +# community.general.snap: +# name: blender +# classic: true +# - name: Install "rambox" with option --classic +# community.general.snap: +# name: rambox +# classic: true + - name: Install fslint + community.general.snap: + name: fslint-unofficial + + - name: Install "tor-mkg20001" + community.general.snap: + name: tor-mkg20001 + + - name: Install "signal-desktop" + community.general.snap: + name: signal-desktop + - name: Install "sqlitebrowser" + community.general.snap: + name: sqlitebrowser + - name: Install "postman" + community.general.snap: + name: postman + - name: Install "obs-studio" recording and screencasting + community.general.snap: + name: obs-studio + - name: Install "gephi" data visualisation browser + community.general.snap: + name: gephi +# - name: Install "czkawka" to search for duplicate files +# community.general.snap: +# name: czkawka \ No newline at end of file diff --git a/automatisation/ansible/spaceship_cronjob_workflow.yml b/automatisation/ansible/spaceship_cronjob_workflow.yml new file mode 100644 index 0000000..fcf6e6e --- /dev/null +++ b/automatisation/ansible/spaceship_cronjob_workflow.yml @@ -0,0 +1,8 @@ +#- name: cronjob pour sync spaceship toutes les 1/4 d'heure +# hosts: localhost +# tasks: +# - name: "vérifier l'existence d'un cronjob pour le workdflow nextcloud" +# ansible.builtin.cron: +# name: "run sync spaceship on spaceship computer, or whichever source of archives" +# minute: "*/4" +# job: "/bin/bash ~/Nextcloud/ressources/workflow_nextcloud/sync_spaceship.sh" diff --git a/automatisation/ansible/tk_softwares.yml b/automatisation/ansible/tk_softwares.yml new file mode 100644 index 0000000..94a4337 --- /dev/null +++ b/automatisation/ansible/tk_softwares.yml @@ -0,0 +1,74 @@ +- name: installer des programmes utiles avec apt + hosts: localhost + become: yes + become_user: root + vars: + server_name: localhost + tasks: + - name: ensure latest version of main tools for desktop is installed + apt: + state: present + name: + - arp-scan + - audacity + - automysqlbackup +# - autopostgresqlbackup + - baobab + - borgbackup +# - btop + - certbot + - curl + - docker + - docker-compose + - dolphin + - etckeeper + - fail2ban + - gajim + - geeqie + - gimp + - git + - gnupg + - gpa + - grsync + - htop + - jq + - kdenlive + - keepassxc + - klavaro + - konsole + - krita + - krita-l10n + - meld + - nano + - ncdu + - nginx + - npm + - pandoc + - rbenv + - php + - php + - php-curl +# - php-dom + - php-fpm + - php-mysql + - php-xml + - python3 + - python3-pip + - python3-pip + - python3-setuptools + - restic + - rsync + - smartmontools + - snapd + - terminator + - testdisk + - texlive-full + - thunar + - tig + - transmission + - ufw + - unattended-upgrades +# - veracrypt + - vrms + - vlc + - zsh diff --git a/automatisation/ansible/websites_container.yml b/automatisation/ansible/websites_container.yml new file mode 100644 index 0000000..f256b72 --- /dev/null +++ b/automatisation/ansible/websites_container.yml @@ -0,0 +1,5 @@ +# vérifier que les services tournent +- name: Start service nginx, if not started + ansible.builtin.service: + name: nginx + state: started \ No newline at end of file diff --git a/initialization/init_workflow.sh b/initialization/init_workflow.sh index 3b3ef4f..a709708 100644 --- a/initialization/init_workflow.sh +++ b/initialization/init_workflow.sh @@ -17,15 +17,15 @@ fi ansible-galaxy install coglinev3.veracrypt echo "vérification et installation des paquets requis" -sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/tk_softwares.yml" +sudo ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/tk_softwares.yml" -ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/pip_modules.yml" -sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/snaps.yml" -ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/node_packages.yml" +ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/pip_modules.yml" +sudo ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/snaps.yml" +ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/node_packages.yml" -ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/cronjob_workflow.yml" -sudo ansible-playbook "/home/tykayn/Nextcloud/ressources/workflow_nextcloud/ansible/cronjob_workflow_root.yml" +ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/cronjob_workflow.yml" +sudo ansible-playbook "$WORKFLOW_PATH/automatisation/ansible/cronjob_workflow_root.yml" sudo apt autoremove -y @@ -42,14 +42,15 @@ if ! hash nvm > /dev/null; then wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash fi -# yarn -corepack enable -#npm i -g yarn nvm install $node_version_expected nvm alias default $node_version_expected nvm alias global $node_version_expected +# yarn +corepack enable +npm i -g pnpm + echo "nvm installé, version des outils js:" nvm --version node --version @@ -137,3 +138,6 @@ fi bash "$WORKFLOW_PATH"/files_management/install.sh bash "$WORKFLOW_PATH"/install/git_config_glob.sh bash "$WORKFLOW_PATH"/refresh_from_current_assets.sh + +sudo apt update -y +sudo apt upgrade -y \ No newline at end of file diff --git a/knowledge/backup_strategy.md b/knowledge/backup_strategy.md new file mode 100644 index 0000000..9aeeda9 --- /dev/null +++ b/knowledge/backup_strategy.md @@ -0,0 +1,7 @@ +# Backup strategy + +Localisez où se trouvent les données que vous souhaitez conserver automatiquement et établissez un plan de récupération. + +## Liste des données +## Liste des supports +## Moyens de restauration \ No newline at end of file