---
- name: Installing PPTPD Server for RadiusDesk (Ubuntu 14+)
  apt:
    name="pptpd"
    state=present

- name: Configuring PPTPD Server for RadiusDesk (Ubuntu 14+)
  template: 
    dest="/etc/pptpd.conf"
    src="pptpd/pptpd.conf.j2"

- name: Configuring RadiusDesk to Use PPTPD Server (Ubuntu 14+)
  template:
    dest="{{ nginx_webroot }}/cake2/rd_cake/Config/RadiusDesk.php"
    group={{ web_group }}
    owner={{ web_user }}
    src=RadiusDesk.php.j2
    validate='php -l %s'

- name: Ensuring PPTPD Client is writeable by Web Server User (Ubuntu 14+)
  shell:
    "chown root:{{ web_group }} {{ pptpd_client_dir }}/chap-secrets &&
    chmod 0664 {{ pptpd_client_dir }}/chap-secrets
    "
  notify:
    - Restart Pptpd
---
- name: Installing PPTPD Server for RadiusDesk (Ubuntu 14+)
  apt:
    name="pptpd"
    state=present

- name: Configuring PPTPD Server for RadiusDesk (Ubuntu 14+)
  template: 
    dest="/etc/pptpd.conf"
    src="pptpd/pptpd.conf.j2"

- name: Configuring RadiusDesk to Use PPTPD Server (Ubuntu 14+)
  template:
    dest="{{ nginx_webroot }}/cake2/rd_cake/Config/RadiusDesk.php"
    group={{ web_group }}
    owner={{ web_user }}
    src=RadiusDesk.php.j2
    validate='php -l %s'

- name: Ensuring PPTPD Client is writeable by Web Server User (Ubuntu 14+)
  shell:
    "chown root:{{ web_group }} {{ pptpd_client_dir }}/chap-secrets &&
    chmod 0664 {{ pptpd_client_dir }}/chap-secrets
    "
  notify:
    - Restart Pptpd

- debug: msg="{{ item.rdmsg }}"
  with_items:
    - { rdmsg: 'RADIUSDesk Admin Portal: http://{{ ansible_default_ipv4.address }}/rd/build/production/Rd/index.html' }
    - { rdmsg: 'RADIUSDesk Admin Username: root' }
    - { rdmsg: 'RADIUSDesk Admin Password: admin' }
Add RD Admin Portal Credentials after installation 2
Add RD Admin Portal Credentials after installation 2
