mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Add chan_dongle.yml
This commit is contained in:
parent
4dcad92398
commit
5e687559ad
1 changed files with 45 additions and 0 deletions
45
roles/pbx/tasks/chan_dongle.yml
Normal file
45
roles/pbx/tasks/chan_dongle.yml
Normal file
|
@ -0,0 +1,45 @@
|
|||
- name: chan_dongle - Download software to /opt/iiab/downloads
|
||||
get_url:
|
||||
url: "{{ chan_dongle_url }}/{{ chan_dongle_src_file }}"
|
||||
dest: "{{ downloads_dir }}/{{ chan_dongle_src_file }}"
|
||||
timeout: "{{ download_timeout }}"
|
||||
when: internet_available
|
||||
|
||||
- name: chan_dongle - Check for /opt/iiab/downloads/{{ chan_dongle_src_file }}
|
||||
stat:
|
||||
path: "{{ downloads_dir }}/{{ chan_dongle_src_file }}"
|
||||
register: chan_dongle_src
|
||||
|
||||
- name: chan_dongle - FAIL (force Ansible to exit) IF /opt/iiab/downloads/{{ chan_dongle_src_file }} doesn't exist
|
||||
fail:
|
||||
msg: "{ downloads_dir }}/{{ chan_dongle_src_file }} is REQUIRED in order to install."
|
||||
when: not chan_dongle_src.stat.exists
|
||||
|
||||
- name: chan_dongle - Create install source directory
|
||||
file:
|
||||
path: "{{ chan_dongle_src_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: chan_dongle - Extract source
|
||||
unarchive:
|
||||
src: "{{ downloads_dir }}/{{ chan_dongle_src_file }}"
|
||||
dest: "{{ chan_dongle_src_dir }}"
|
||||
owner: root
|
||||
group: root
|
||||
extra_opts: [--strip-components=1]
|
||||
creates: "{{ chan_dongle_src_dir }}/Makefile.in"
|
||||
|
||||
- name: chan_dongle - Run the bootstrap script
|
||||
command: "./bootstrap"
|
||||
args:
|
||||
chdir: "{{ chan_dongle_src_dir }}"
|
||||
|
||||
- name: chan_dongle - Run the configure script
|
||||
command: "./configure"
|
||||
args:
|
||||
chdir: "{{ chan_dongle_src_dir }}"
|
||||
|
||||
- name: chan_dongle - Run 'make'
|
||||
command: make
|
||||
args:
|
||||
chdir: "{{ chan_dongle_src_dir }}"
|
Loading…
Add table
Reference in a new issue