- name: Installs asterisk
  apt:
    pkg:
      - asterisk
      - asterisk-core-sounds-ru-wav
    state: present 
    update_cache: true
- name: Create sip.conf file
  template: src=sip.conf.j2 dest=/etc/asterisk/sip.conf

- name: Create extensions.conf file
  template: src=extensions.conf.j2 dest=/etc/asterisk/extensions.conf

- name: Create voicemail.conf file
  template: src=voicemail.conf.j2 dest=/etc/asterisk/voicemail.conf

- name: Restart asterisk
  service: name=asterisk state=restarted

