From aea6b114e050545ccc8b953c579d53c9158e238b Mon Sep 17 00:00:00 2001 From: binary Date: Sun, 15 Nov 2020 17:26:32 +0100 Subject: I'm so lazy so ignore this cimment this time pls --- playbooks/p.yml | 13 +++++++++++++ playbooks/site.yml | 2 +- playbooks/wireguard.yml | 20 +++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 playbooks/p.yml (limited to 'playbooks') 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 -- cgit v1.2.3