Skip to content

Commit

Permalink
Add tasks/cleanup.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wizawu committed Jun 27, 2024
1 parent 234d8c1 commit 4e062a4
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.log
*.retry
*.swp
debug.yml
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
clean:
apt autoremove --purge -y
apt clean -y

install:
ansible-playbook -b -e user=wizawu -v install.yml

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo > /etc/apt/sources.list

# git clone this repository to /home/wizawu/.sysconf
cd /home/wizawu/.sysconf
make install clean
make install
```

### Disable GUI
Expand Down
1 change: 1 addition & 0 deletions install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
- include_tasks: tasks/vscode.yml
- include_tasks: tasks/pip.yml
- include_tasks: tasks/npm.yml
- include_tasks: tasks/cleanup.yml

- name: create etc directories
file: dest=/{{item}} state=directory recurse=yes
Expand Down
36 changes: 36 additions & 0 deletions tasks/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- name: disable services
service:
name: "{{item}}"
state: stopped
enabled: false
ignore_errors: true
with_items:
- snapd.seeded
- snapd.socket
- snapd

- name: uninstall packages
apt:
state: absent
name:
- cloud-init
- pcp
- xdg-desktop-portal-gtk
- xdg-desktop-portal-wlr

- name: apt clean
apt:
autoremove: true
purge: true
clean: true

- name: remove cinnamon-screensaver, nemo-desktop
shell: mv /usr/bin/{{item}} /usr/bin/.{{item}}
ignore_errors: true
with_items:
- cinnamon-screensaver
- csd-clipboard
- csd-keyboard
- csd-media-keys
- csd-screensaver-proxy
- nemo-desktop
2 changes: 2 additions & 0 deletions tasks/command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
apt:
name:
- ack-grep
- aha
- apt-file
- autossh
- chrony
Expand All @@ -13,6 +14,7 @@
- dconf-cli
- di
- docker-ce
- fdisk
- fish
- fping
- git-extras
Expand Down
12 changes: 0 additions & 12 deletions tasks/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,3 @@
- cinnamon-session
- nautilus
- network-manager-gnome

- name: uninstall packages
apt:
state: absent
name:
- xdg-desktop-portal-gtk
- xdg-desktop-portal-wlr

- name: remove cinnamon-screensaver, nemo-desktop
shell: |
mv /usr/bin/cinnamon-screensaver /usr/bin/.cinnamon-screensaver
mv /usr/bin/nemo-desktop /usr/bin/.nemo-desktop

0 comments on commit 4e062a4

Please sign in to comment.