Skip to content

Commit

Permalink
Comment some questionable actions in general preparations, add memos …
Browse files Browse the repository at this point in the history
…todo
  • Loading branch information
Mayurifag committed Nov 3, 2024
1 parent d9fabe6 commit f8177ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ need to deploy my services once again.
* [x] Simple proxy server in docker
* [x] Makefiles + info to launch only specified tags
* [x] Make traefik dashboard available from internet
* [ ] <https://github.com/usememos/memos>

### Low priority

Expand Down
19 changes: 10 additions & 9 deletions roles/server_general_preparations/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
- name: "Set hostname to {{ server_hostname }}"
ansible.builtin.hostname:
name: "{{ server_hostname }}"
# Perhaps I do not actually need this
# - name: "Set hostname to {{ server_hostname }}"
# ansible.builtin.hostname:
# name: "{{ server_hostname }}"

- name: "Set timezone to {{ server_timezone }}"
community.general.timezone:
Expand Down Expand Up @@ -46,12 +47,12 @@
state: present
force_apt_get: yes

- name: Remove old kernel versions
ansible.builtin.shell: apt-get purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | head -n -2) -y
args:
executable: /bin/bash
register: kernel_cleanup
changed_when: kernel_cleanup.stdout != ""
# - name: Remove old kernel versions
# ansible.builtin.shell: apt-get purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | head -n -2) -y
# args:
# executable: /bin/bash
# register: kernel_cleanup
# changed_when: kernel_cleanup.stdout != ""

- name: Remove orphaned packages and clean apt cache
ansible.builtin.apt:
Expand Down

0 comments on commit f8177ae

Please sign in to comment.