-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathdeploy_client.yml
More file actions
26 lines (24 loc) · 756 Bytes
/
deploy_client.yml
File metadata and controls
26 lines (24 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
- name: Configure the client
hosts: localhost
become: false
vars_files:
- config.cfg
tasks:
- name: Add the droplet to an inventory group
add_host:
name: "{{ client_ip }}"
groups: client-host
ansible_ssh_user: "{{ 'root' if client_ip == 'localhost' else ssh_user }}"
vpn_user: "{{ vpn_user }}"
IP_subject_alt_name: "{{ server_ip }}"
ansible_python_interpreter: "{% if client_ip == 'localhost' %}{{ ansible_playbook_python }}{% else %}/usr/bin/python3{% endif %}"
- name: Configure the client and install required software
hosts: client-host
gather_facts: false
become: true
vars_files:
- config.cfg
- roles/strongswan/defaults/main.yml
roles:
- role: client