diff options
author | binary <me@rgoncalves.se> | 2020-11-15 17:26:32 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-11-15 17:26:32 +0100 |
commit | aea6b114e050545ccc8b953c579d53c9158e238b (patch) | |
tree | 7cbeb2ad790638e433c21f1452dded1588949d2e /playbooks | |
parent | 5bcecbf08db7013ba4de12e492961e2cba6e6b8a (diff) | |
download | infrastructure-aea6b114e050545ccc8b953c579d53c9158e238b.tar.gz |
I'm so lazy so ignore this cimment this time pls
Diffstat (limited to 'playbooks')
-rw-r--r-- | playbooks/p.yml | 13 | ||||
-rw-r--r-- | playbooks/site.yml | 2 | ||||
-rw-r--r-- | playbooks/wireguard.yml | 20 |
3 files changed, 33 insertions, 2 deletions
diff --git a/playbooks/p.yml b/playbooks/p.yml new file mode 100644 index 0000000..49c3200 --- /dev/null +++ b/playbooks/p.yml @@ -0,0 +1,13 @@ + +# p.yml +# Execute only one role + +--- + +- hosts: "{{ host }}" + + tasks: + + - include_role: + name: "{{ role }}" + tasks_from: "{{ task }}.yml" diff --git a/playbooks/site.yml b/playbooks/site.yml index 29f4033..f493eb1 100644 --- a/playbooks/site.yml +++ b/playbooks/site.yml @@ -2,7 +2,7 @@ # site.yml # Deploy configuration to all servers. -- hosts: all +- hosts: servers roles: - common diff --git a/playbooks/wireguard.yml b/playbooks/wireguard.yml index d995b5c..320fd31 100644 --- a/playbooks/wireguard.yml +++ b/playbooks/wireguard.yml @@ -4,8 +4,26 @@ --- -- hosts: all +- hosts: servers gather_facts: no roles: - wireguard +- hosts: alpine + vars: + rc_name: "wireguard" + rc_cmd: "/usr/bin/wg-quick" + rc_args: "up {{ _i.dcontroller }}" + rc_user: "root" + roles: + - rc + ignore_errors: true + +- hosts: openbsd + vars: + rc_name: "wireguard" + rc_cmd: "/usr/local/bin/wg-quick" + rc_args: "up {{ _i.dcontroller }}" + rc_user: "root" + roles: + - rc |