algo/deploy_client.yml

27 lines
673 B
YAML
Raw Normal View History

---
2017-03-03 17:46:11 +00:00
- name: Configure the client
hosts: localhost
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
ansible_ssh_user: "{{ 'root' if client_ip == 'localhost' else ssh_user }}"
2017-03-04 20:05:02 +00:00
vpn_user: "{{ vpn_user }}"
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
- roles/strongswan/defaults/main.yml
2017-03-03 17:46:11 +00:00
roles:
- role: client