Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Version 2.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbojko committed Mar 20, 2024
1 parent dc4c6b1 commit 0c732b3
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 30 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog "linux_mint"

## Version 2.8.1 [2024-03-20]

* [FLATPAK] removal of 'GitKraken` from flatpak packages due to incompatibility
* [APPLICATION] added `gitkraken` package as .deb
* added `flatpak_remove` section to remove flatpak packages which are no longer available
* added new custom variable `custom_flatpak_remove` to allow user to remove flatpak packages which are no longer available
* Start moving elements of playbook into separat tasks
* [TASKS] added task `remove_flatpak_packages` to remove flatpak packages which are no longer available
* [TASKS] added task `remove_repository_files` to remove repository files which are no longer available. Task is repeated AFTER package installation to remove doubles
* [VSCODE] removed extension `dogukanakkaya.chatgpt-code` as obsoleted
* [FLATPAK] added `org.gnome.font-viewer` package as due changes in migration it could not be available in 21.x

## Version 2.8.0 [2024-03-18]

* **BREAKING CHANGES**
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Ansible playbook for your DevOps/SysOps Linux Mint 21.x based workstation
# Ansible playbook for your DevOps/SysOps Linux Mint 21.x-based workstation

[![Super-Linter](https://github.com/marcinbojko/linux_mint/actions/workflows/01_lint_me.yml/badge.svg)](https://github.com/marcinbojko/linux_mint/actions/workflows/01_lint_me.yml)
[![Ansible Lint](https://github.com/marcinbojko/linux_mint/actions/workflows/02_ansible_lint.yml/badge.svg)](https://github.com/marcinbojko/linux_mint/actions/workflows/02_ansible_lint.yml)
[![wakatime](https://wakatime.com/badge/github/marcinbojko/linux_mint.svg)](https://wakatime.com/badge/github/marcinbojko/linux_mint)
<!-- TOC -->

- [Ansible playbook for your DevOps/SysOps Linux Mint 21.x based workstation](#ansible-playbook-for-your-devopssysops-linux-mint-21x-based-workstation)
- [Ansible playbook for your DevOps/SysOps Linux Mint 21.x-based workstation](#ansible-playbook-for-your-devopssysops-linux-mint-21x-based-workstation)
- [Prerequisites](#prerequisites)
- [Ansible 2.10 and higher reminder](#ansible-210-and-higher-reminder)
- [Assumptions](#assumptions)
Expand Down Expand Up @@ -320,7 +320,6 @@ custom_packages:
|Flatseal|Permissions Manager|[Flatseal](https://flathub.org/apps/details/com.github.tchx84.Flatseal%29)|
|FreeFileSync|File Synchronization|[FreeFileSync](https://freefilesync.org/%29)|
|GIMP|Image Editor|GIMP|
|GitKraken|Git Client|GitKraken|
|Headlamp|Kubernetes Dashboard|[Headlamp](https://kinvolk.io/headlamp/%29)|
|Kdenlive|Video Editor|[Kdenlive](https://kdenlive.org/%29)|
|Kodi|Media Center|[Kodi](https://kodi.tv/%29)|
Expand Down
66 changes: 44 additions & 22 deletions linux_mint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prepares LinuxMint19/20 desktop.
# Prepares LinuxMint 21.x desktop.
# start from preparing ssh:
# sudo apt install openssh-server ntp;systemctl enable ssh && systemctl start ssh
# kind: playbook
Expand All @@ -8,10 +8,11 @@
install_optional: true # should optional packages be installed?
install_deb: true # should extra deb packages should be installed
install_flatpak: true # should we install flatpak software
remove_flatpak: true # should we remove flatpak software
install_vscode_extensions: true # should we install extra vscode extensions
install_steampipe_plugins: true # install steampipe plugins (steampipe must be installed)
install_npm: true # should we install npm packages
install_zsh: false # install and configure oh-my-zhs and power10k
install_zsh: true # install and configure oh-my-zhs and power10k
install_yubico: false # install yubico related software
install_state: latest # if set to latest, every pass of playbook will also update packages
config_ansible: true # do changes in change ansible.cfg
Expand Down Expand Up @@ -98,15 +99,15 @@
- "Install steampipe plugins : {{ install_steampipe_plugins | bool | lower }} "
- "Install zsh : {{ install_zsh | bool | lower }}"
- "Install Yubico : {{ install_yubico | bool | lower }}"
- "Config for Ansible : {{ config_ansible }}"
- "Config dconf : {{ config_dconf }}"
- "Config sysctl : {{ config_sysctl }}"
- "Config for Ansible : {{ config_ansible | bool | lower }}"
- "Config dconf : {{ config_dconf | bool | lower }}"
- "Config sysctl : {{ config_sysctl | bool | lower }}"
- "Bin Path to put files into : {{ bin_path }}"
- "Active user : {{ active_user | string }}"
- name: wait_10_seconds
ansible.builtin.pause:
seconds: 10
prompt: "Check variables - last chance to abort in 15 seconds"
prompt: "Check variables - last chance to abort in 10 seconds"

# we need proper time to refresh repositories
- name: make_sure_timesyncd_is_installed
Expand Down Expand Up @@ -157,22 +158,19 @@
- repositories
- base
- obsolete
# remove obsolete files
- name: remove_obsolete_files_from_variables_file
ansible.builtin.file:
path: "{{ item.path }}"
state: absent
loop: "{{ files_remove }}"
retries: "{{ retries_count }}"
delay: "{{ delay_time }}"
register: r_files_remove
until: r_files_remove is success
any_errors_fatal: false
ignore_errors: true
# remove obsolete files
- name: Tasks - remove repository files
ansible.builtin.include_tasks: ./tasks/remove_repository_files.yml
args:
apply:
tags:
- repositories
- files
- remove
- base
- obsolete
tags:
- files
- base
- obsolete
- always
# remove obsolete files from 'bin_path'
- name: Remove_obsolete_files_bin_path_from_variables_file
ansible.builtin.file:
Expand Down Expand Up @@ -223,7 +221,18 @@
- packages
- base
- obsolete
# apt initial refresh
# remove absolete flatpak apps, from playbooks and custom variables
- name: Remove_flatpak_apps
ansible.builtin.include_tasks: ./tasks/remove_flatpak_packages.yml
args:
apply:
tags:
- packages
- flatpak
- remove
tags:
- always
# refresh apt cache
- name: apt_initial_refresh
ansible.builtin.apt:
update_cache: yes
Expand Down Expand Up @@ -930,6 +939,19 @@
become_user: "{{ active_user }}"
tags:
- dconf
# remove obsoleted `list` files left by new packages
- name: Tasks - remove repository files
ansible.builtin.include_tasks: ./tasks/remove_repository_files.yml
args:
apply:
tags:
- repositories
- files
- remove
- base
- obsolete
tags:
- always
- name: update_all_packages
ansible.builtin.apt:
upgrade: "yes"
Expand Down
8 changes: 5 additions & 3 deletions mint21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ packages_remove:
- wireshark-qt
- wireshark-gtk
- wireshark-doc
- gitkraken
- wps-office
- rpi-imager
- zoom
Expand Down Expand Up @@ -619,6 +618,7 @@ packages_optional:
- veeamsnap
- veracrypt
deb:
- https://release.gitkraken.com/linux/gitkraken-amd64.deb
- https://github.com/angryip/ipscan/releases/download/3.9.1/ipscan_3.9.1_amd64.deb
- https://github.com/Eugeny/tabby/releases/download/v1.0.207/tabby-1.0.207-linux-x64.deb
- https://github.com/kubernetes/minikube/releases/download/v1.32.0/minikube_1.32.0-0_amd64.deb
Expand All @@ -632,7 +632,6 @@ deb:
- https://github.com/ramboxapp/download/releases/download/v2.3.1/Rambox-2.3.1-linux-x64.deb
- https://github.com/derailed/k9s/releases/download/v0.32.3/k9s_linux_amd64.deb
flatpak:
- name: com.axosoft.GitKraken
- name: com.bitwarden.desktop
- name: com.brave.Browser
- name: com.calibre_ebook.calibre
Expand All @@ -656,6 +655,7 @@ flatpak:
- name: org.freefilesync.FreeFileSync
- name: org.gimp.GIMP
- name: org.gnome.Boxes
- name: org.gnome.font-viewer
- name: org.kde.kdenlive
- name: org.kde.krita
- name: org.libreoffice.LibreOffice
Expand All @@ -668,6 +668,8 @@ flatpak:
- name: tv.kodi.Kodi
- name: us.zoom.Zoom
- name: zenmap
flatpak_remove:
- name: com.axosoft.GitKraken
npm:
- name: agentkeepalive
state: latest
Expand Down Expand Up @@ -849,13 +851,13 @@ vscode_obsolete:
- hypnoes.word-count
- vscoss.vscode-ansible
- wholroyd.HCL
- dogukanakkaya.chatgpt-code
vscode:
- alefragnani.project-manager
- aquasecurityofficial.trivy-vulnerability-scanner
- bierner.markdown-mermaid
- danielsanmedium.dscodegpt
- davidanson.vscode-markdownlint
- dogukanakkaya.chatgpt-code
- donjayamanne.githistory
- dotjoshjohnson.xml
- eamodio.gitlens
Expand Down
4 changes: 2 additions & 2 deletions tasks/configure_zsh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: download_fonts_for_power10k
ansible.builtin.get_url:
url: "{{ item }}"
dest: /usr/local/share/fonts/power10k
dest: /usr/share/fonts/truetype/power10k
mode: "0644"
retries: "{{ retries_count }}"
delay: "{{ delay_time }}"
Expand All @@ -37,7 +37,7 @@
- power10k
- fonts
- name: update_font_cache
ansible.builtin.shell: fc-cache
ansible.builtin.shell: fc-cache -f -v
register: r_update_font_cache
any_errors_fatal: false
tags:
Expand Down
34 changes: 34 additions & 0 deletions tasks/remove_flatpak_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Install flatpak packages
- name: Remove_flatpak_apps
community.general.flatpak:
name: "{{ item.name | string }}"
state: absent
method: system
loop: "{{ flatpak_remove }}"
retries: "{{ retries_count }}"
delay: "{{ delay_time }}"
register: r_remove_flatpak_apps
until: r_remove_flatpak_apps is success
any_errors_fatal: false
when: remove_flatpak is defined and remove_flatpak
tags:
- packages
- flatpak
- remove
- name: Remove_flatpak_custom_apps
community.general.flatpak:
name: "{{ item.name | string }}"
state: absent
method: system
loop: "{{ custom_flatpak_remove | default([]) }}"
retries: "{{ retries_count }}"
delay: "{{ delay_time }}"
register: r_remove_custom_flatpak_apps
until: r_remove_custom_flatpak_apps is success
any_errors_fatal: false
when: (custom_remove_flatpak is defined and custom_remove_flatpak | default([]) | length > 0 ) and remove_flatpak
tags:
- packages
- flatpak
- remove
- custom
16 changes: 16 additions & 0 deletions tasks/remove_repository_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Tasks removes all files from `files_remove` list
- name: Remove_obsolete_files_from_variables_file
ansible.builtin.file:
path: "{{ item.path }}"
state: absent
loop: "{{ files_remove | default([]) }}"
retries: "{{ retries_count }}"
delay: "{{ delay_time }}"
register: r_files_remove
until: r_files_remove is success
any_errors_fatal: false
ignore_errors: true
tags:
- files
- base
- obsolete

0 comments on commit 0c732b3

Please sign in to comment.