algo/roles/local/tasks/main.yml
2016-09-26 15:43:19 +03:00

25 lines
839 B
YAML

- name: Add the instance to an inventory group
add_host:
name: "{{ server_ip }}"
groups: vpn-host
ansible_ssh_user: "{{ server_user }}"
ansible_python_interpreter: "/usr/bin/python2.7"
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
cloud_provider: local
when: server_ip != "localhost"
- name: Add the instance to an inventory group
add_host:
name: "{{ server_ip }}"
groups: vpn-host
ansible_ssh_user: "{{ server_user }}"
ansible_python_interpreter: "/usr/bin/python2.7"
ansible_connection: local
easyrsa_p12_export_password: "{{ easyrsa_p12_export_password }}"
cloud_provider: local
when: server_ip == "localhost"
- name: Waiting for SSH to become available
local_action: "wait_for port=22 host={{ server_ip }} timeout=320"
when: server_ip != "localhost"