You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
664 B

3 years ago
---
- name: Remove static ip configuration.
file:
path: /etc/NetworkManager/system-connections/static.nmconnection
state: absent
- name: Read temporary public key.
set_fact:
tmp_pub_key: "{{ lookup('file', '.ssh/id_ed25519.pub') }}"
3 years ago
- 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 wheel to sudo without password.
file:
path: /etc/sudoers.d/00-tmp-sudo-full-access
state: absent
3 years ago
- name: Disable ssh server.
systemd:
name: sshd
enabled: false
state: stopped