2019-04-26 15:48:28 +00:00
|
|
|
---
|
2017-03-03 17:46:11 +00:00
|
|
|
- name: Configure the client
|
|
|
|
hosts: localhost
|
2019-04-26 15:48:28 +00:00
|
|
|
become: false
|
2017-03-04 20:05:02 +00:00
|
|
|
vars_files:
|
|
|
|
- config.cfg
|
|
|
|
|
2017-03-03 17:46:11 +00:00
|
|
|
tasks:
|
|
|
|
- name: Add the droplet to an inventory group
|
|
|
|
add_host:
|
|
|
|
name: "{{ client_ip }}"
|
|
|
|
groups: client-host
|
2019-04-26 15:48:28 +00:00
|
|
|
ansible_ssh_user: "{{ 'root' if client_ip == 'localhost' else ssh_user }}"
|
2017-03-04 20:05:02 +00:00
|
|
|
vpn_user: "{{ vpn_user }}"
|
2019-04-26 15:48:28 +00:00
|
|
|
IP_subject_alt_name: "{{ server_ip }}"
|
|
|
|
ansible_python_interpreter: "/usr/bin/python3"
|
2017-03-03 17:46:11 +00:00
|
|
|
|
|
|
|
- name: Configure the client and install required software
|
|
|
|
hosts: client-host
|
|
|
|
gather_facts: false
|
|
|
|
become: true
|
|
|
|
vars_files:
|
|
|
|
- config.cfg
|
2019-04-26 15:48:28 +00:00
|
|
|
- roles/strongswan/defaults/main.yml
|
2017-03-03 17:46:11 +00:00
|
|
|
roles:
|
2019-04-26 15:48:28 +00:00
|
|
|
- role: client
|