32 lines
654 B
YAML
32 lines
654 B
YAML
---
|
|
- name: Enable IPv4 forwarding
|
|
sysctl:
|
|
name: net.ipv4.ip_forward
|
|
value: "1"
|
|
state: present
|
|
reload: yes
|
|
|
|
- name: Enable IPv6 forwarding
|
|
sysctl:
|
|
name: net.ipv6.conf.all.forwarding
|
|
value: "1"
|
|
state: present
|
|
reload: yes
|
|
when: ansible_all_ipv6_addresses
|
|
|
|
# Setup user
|
|
- name: Add the user 'kjuulh' and add it to 'sudo'
|
|
user:
|
|
name: kjuulh
|
|
group: sudo
|
|
state: present
|
|
|
|
- name: "add authorized keys"
|
|
authorized_key:
|
|
user: kjuulh
|
|
state: present
|
|
key: "{{ lookup('file', pub_key) }}"
|
|
|
|
- name: Wait for apt to unlock
|
|
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null >2&1; do sleep 5; done;
|