---
# Создать фалы ovpn в каталоге {{openvpn_dir}}/client-configs/keys/
- name: create client config
  template:
    src: openvpn.client.j2
    dest: "{{openvpn_dir}}/client-configs/keys/{{ item }}.ovpn"
    owner: root
    group: root
    mode: 0400
  with_items:
    - "{{ openvpn_clients }}"


# Создаем каталог ccd
- name: "create {{openvpn_dir}}/ccd"
  file:
    path: "{{openvpn_dir}}/ccd"
    state: directory
    mode: 0755

# Создать фалы в каталоге {{openvpn_dir}}/ccd/
- name: create ccd
  template:
    src: client_ccd.j2
    dest: "{{openvpn_dir}}/ccd/{{ item }}"
    owner: root
    group: root
    mode: 0400
  with_items:
    - "{{ openvpn_clients }}"

