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 dbcf2285 authored by Freezed's avatar Freezed
Browse files

:sparkles: Add package management

- un/install main, OS related, Desktop env. related
- add repo for signal-desktop
- remove snap packages
- upgrade all
- cache managemet
parent 8b2a51f9
No related branches found
No related tags found
No related merge requests found
......@@ -7,16 +7,11 @@ clean:
open_all:
${EDITOR} .gitignore inventory Makefile README.md
${EDITOR} tasks/files/*
${EDITOR} tasks/vars/*
${EDITOR} tasks/*.yml
<<<<<<< HEAD
=======
${EDITOR} tasks/files/sshd_config
${EDITOR} tasks/user_cfg/*.yml
${EDITOR} tasks/user_cfg/files/dotfiles/*
${EDITOR} tasks/user_cfg/templates/*.j2
${EDITOR} tasks/user_cfg/vars/*.yml
${EDITOR} tasks/vars/*.yml
>>>>>>> eab54ad (fixup! 🚚 Move tasks in dedicated directory)
inventory_generation:
cp inventory.sample inventory && ${EDITOR} inventory
---
- hosts: "{{ host_list }}"
remote_user: root
tasks:
- name: INCLUDE_VARS | base
ansible.builtin.include_vars: "main.yml"
- name: INCLUDE_VARS | OS
ansible.builtin.include_vars: "{{ ansible_distribution }}.yml"
- name: INCLUDE_VARS | Gnome
when: "'gnome' in group_names"
ansible.builtin.include_vars: "Gnome.yml"
- name: INCLUDE_VARS | Mate
when: "'mate' in group_names"
ansible.builtin.include_vars: "Mate.yml"
- name: Remove snap packages
when: snap_uninstall_pkg is defined
community.general.snap:
name: "{{ snap_uninstall_pkg }}"
state: absent
- name: APT | install base & os packages
ansible.builtin.apt:
cache_valid_time: 3600
force_apt_get: yes
pkg: "{{ lookup('flattened', base_pkg, os_pkg) }}"
state: present
update_cache: true
- name: SIGNAL | add key to keyring
when: inventory_hostname in groups.station
ansible.builtin.apt_key:
url: https://updates.signal.org/desktop/apt/keys.asc
keyring: /usr/share/keyrings/signal-desktop-keyring.gpg
state: present
- name: SIGNAL | add apt repository
when: inventory_hostname in groups.station
ansible.builtin.apt_repository:
filename: signal-desktop
repo: deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main
state: present
- name: APT | install workstation packages
when: inventory_hostname in groups.station
ansible.builtin.apt:
cache_valid_time: 3600
force_apt_get: yes
pkg: "{{ lookup('flattened', station_pkg, station_os_pkg, station_wm_pkg) }}"
state: present
update_cache: true
- name: APT | uninstall packages
ansible.builtin.apt:
pkg: "{{ lookup('flattened', base_uninstall_pkg, os_uninstall_pkg) }}"
state: absent
- name: APT | upgrade all packages to the latest version
ansible.builtin.apt:
force_apt_get: yes
upgrade: safe
- name: APT | remove useless packages from the cache
ansible.builtin.apt:
force_apt_get: yes
autoclean: yes
autoremove: yes
- name: APT | check for restarts
ansible.builtin.stat: path={{ item }}
register: restart_required
loop:
- /var/run/firefox-restart-required
- /var/run/reboot-required
no_log: yes
- name: APT | restart message
ansible.builtin.debug:
msg: "{{ item.stat.path | basename }} on {{ ansible_hostname }}"
when: item.stat.exists
loop: "{{ restart_required.results }}"
loop_control:
label: "{{ item.item | basename }}"
......@@ -35,7 +35,6 @@
state: present
user: "{{ my_user }}"
- name: SSH | Disallow SSH password authentication for root
become: yes
copy:
......
---
os_pkg: []
os_uninstall_pkg: []
station_os_pkg:
- chromium-l10n
- firefox-esr-l10n-fr
---
station_wm_pkg:
- gnome-tweaks
- nautilus-nextcloud
---
station_wm_pkg:
- mate-tweak
- caja-nextcloud
---
os_pkg: []
os_uninstall_pkg:
- thunderbird
snap_uninstall_pkg:
- firefox
station_os_pkg:
- chromium-browser-l10n
- firefox-locale-fr
- firefox
---
base_pkg:
- htop
- iotop
- locales
- lsb-release
- lsof
- lynx
- most
- progress
- python3-apt
- rsync
- screen
- sudo
- tmux
- unattended-upgrades
- unzip
- vim
- wget
- xkcdpass
base_uninstall_pkg: []
station_pkg:
- ansible
- cheese
- easytag
- evolution
- evolution-plugins
- geany-plugin-addons
- geany-plugin-extrasel
- geany-plugin-git-changebar
- geany-plugin-markdown
- geany-plugin-prettyprinter
- geany-plugin-shiftcolumn
- geany-plugin-spellcheck
- geany-plugin-workbench
- geany-plugin-xmlsnippets
- gimp
- git
- gnome-disk-utility
- gpsprune
- hplip
- jhead
- keepassx
- make
- meld
- mhwaveedit
- network-manager-gnome
- nextcloud-desktop
- pandoc
- pdftk
- photocollage
- sshpass
- tree
- signal-desktop
- simple-scan
- soundconverter
- system-config-printer
- torbrowser-launcher
- unrar-free
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