Add cleanup role

master
Rasmus Rosengren 3 years ago
parent 6d9c924764
commit 91e9878e96
Signed by: rsrp
GPG Key ID: A13BC7BC4F81CF5F
  1. 2
      .drone.yml
  2. 1
      group_vars/all/00-defaults.yml
  3. 1
      main.yml
  4. 19
      roles/cleanup/tasks/main.yml
  5. 2
      roles/configure/tasks/main.yml

@ -7,7 +7,7 @@ steps:
- name: yamllint - name: yamllint
image: cytopia/yamllint image: cytopia/yamllint
commands: commands:
- yamllint . - yamllint --strict .
- name: ansible-playbook syntax check - name: ansible-playbook syntax check
image: cytopia/ansible image: cytopia/ansible

@ -1,3 +1,4 @@
---
disksetup_strategy: efi_gpt_btrfs disksetup_strategy: efi_gpt_btrfs
# partitioning_priv_device_node: /dev/sda # partitioning_priv_device_node: /dev/sda

@ -33,3 +33,4 @@
- docker - docker
- yubikey - yubikey
- u2f - u2f
- cleanup

@ -0,0 +1,19 @@
---
- name: Remove static ip configuration.
file:
path: /etc/NetworkManager/system-connections/static.nmconnection
state: absent
- name: Remove temporary key from root's authorized_keys.
authorized_key:
state: absent
user: root
path: /root/.ssh/authorized_keys
key: "{{ tmp_pub_key }}"
manage_dir: true
- name: Disable ssh server.
systemd:
name: sshd
enabled: false
state: stopped

@ -40,7 +40,7 @@
group: root group: root
mode: 0700 mode: 0700
- name: Make sure temporary key is in root's authorized_keys - name: Make sure temporary key is in root's authorized_keys.
authorized_key: authorized_key:
state: present state: present
user: root user: root

Loading…
Cancel
Save