Add cleaning after action

This commit is contained in:
Dryusdan 2023-01-23 17:22:46 +01:00
parent de12efa1f0
commit 5260c86851
3 changed files with 22 additions and 0 deletions

View file

@ -8,3 +8,21 @@
tags:
- install
- name: "Clean cache yarn"
shell: "yarn cache clean"
args:
chdir: "/home/{{ item.account_name }}/"
become: yes
become_user : "{{ item.account_name }}"
loop: "{{ ghost }}"
when: ghost_deploy_site in item.name
- name: "NPM Cache clean"
shell: "npm cache clean --force"
args:
chdir: "/home/{{ item.account_name }}/"
become: yes
become_user : "{{ item.account_name }}"
loop: "{{ ghost }}"
when: ghost_deploy_site in item.name
~

View file

@ -46,4 +46,6 @@
- install
notify:
- Restart service
- Clean cache yarn
- NPM Cache clean

View file

@ -11,3 +11,5 @@
- update
notify:
- Restart service
- Clean cache yarn
- NPM Cache clean