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.
22 lines
565 B
22 lines
565 B
- name: Update brew
|
|
homebrew: update_homebrew=yes
|
|
|
|
- name: install wireguard
|
|
homebrew: name=wireguard-tools state=latest
|
|
|
|
- name: make wg dir since macs are now weird about /etc/anything
|
|
file:
|
|
path: ~/wireguard/
|
|
state: directory
|
|
|
|
- name: Generate keys
|
|
shell: |
|
|
printf "[Interface]\nPrivateKey = " > ~/wireguard/wg0.conf
|
|
wg genkey | tee -a ~/wireguard/wg0.conf | wg pubkey > ~/wireguard/publickey
|
|
vars:
|
|
umask: "077"
|
|
|
|
- name: register publickey for later use
|
|
shell: cat ~/wireguard/publickey
|
|
register: client_publickey
|