summaryrefslogtreecommitdiff
path: root/roles/nginx/clean.yml
blob: 14939104cfb907843cc6cf91df26a5a65b969152 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
# Target: alpine3.11
- name: Cleanup Nginx Build
  hosts: nginx_clean

  tasks:

    - name: Removing packages
      apk:
        state: absent
        name:
          - gcc
          - libc-dev
          - make
          - openssl-dev
          - pcre-dev
          - zlib-dev
          - linux-headers
          - curl
          - gnupg
          - libxslt-dev
          - gd-dev
          - geoip-dev
          - perl-dev
          - tar
          - openssl
          - autoconf
          - libtool
          - automake
          - git
          - g++
          - cmake
          - go
          - perl
          - rust
          - cargo

    - name: Reinstalling required runtime dependencies
      apk:
        state: present
        update_cache: yes
        name:
          - pcre
          - libgcc

    - name: Removing extraneous files
      file:
        path: "{{ item }}"
        state: absent
      with_items:
        - /opt/nginx
        - /root/.cargo
        - /root/.cache