summaryrefslogtreecommitdiff
path: root/roles/cloud/post-install/tasks/hetzner_postinst.yml
blob: 2ae7beb89a38a4200538a9ec59f8cf2834090c0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
- name: check if post-post-install script is present
  stat:
    path: /post-install-finalize
  register: hetzner_post_install_finalize

- name: run post-install-finalize script
  when: hetzner_post_install_finalize.stat.exists
  command: /post-install-finalize

- name: remove installimage artifacts
  loop:
    - /etc/apt/sources.list.d/hetzner-security-updates.list
    - /installimage.conf
    - /installimage.debug
    - /post-install
    - /post-install-finalize
    - /target
  file:
    path: "{{ item }}"
    state: absent