set pass for my user #4
|
@ -6,13 +6,13 @@
|
||||||
tags:
|
tags:
|
||||||
- hostname
|
- hostname
|
||||||
|
|
||||||
- name: set image hostname
|
# - name: set image hostname
|
||||||
hostname:
|
# hostname:
|
||||||
name: "sensor-image"
|
# name: "sensor-image"
|
||||||
use: systemd
|
# use: systemd
|
||||||
tags:
|
# tags:
|
||||||
- never
|
# - never
|
||||||
- image
|
# - image
|
||||||
|
|
||||||
- name: copy ssh keys if known
|
- name: copy ssh keys if known
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -122,6 +122,15 @@
|
||||||
tags:
|
tags:
|
||||||
- sshkeys
|
- sshkeys
|
||||||
|
|
||||||
|
- name: set a password for {{ myusername }}
|
||||||
|
user:
|
||||||
|
name: "{{ myusername }}"
|
||||||
|
password: "{{ mypassword }}"
|
||||||
|
update_password: always
|
||||||
|
tags:
|
||||||
|
- human
|
||||||
|
- mypass
|
||||||
|
|
||||||
- name: set up system users
|
- name: set up system users
|
||||||
block:
|
block:
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,7 @@ PersistentKeepalive = 240
|
||||||
# {{ peer }}
|
# {{ peer }}
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {{ lookup('file', 'private/wireguard/' + peer + '.pub' ) }}
|
PublicKey = {{ lookup('file', 'private/wireguard/' + peer + '.pub' ) }}
|
||||||
{% set clients = [wireguard_clients[c].ip+"/32" for c in d.clients] %}
|
AllowedIPs = {{ d.ip }}/32
|
||||||
{% set ips = [d.ip + "/32"] + clients
|
|
||||||
AllowedIPs = {{ ips | join(", ") }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue