Good morning,
I am sitting with a problem, have looked online for hours, but can’t find the solution.
I hope anybody here can help me with it.
Help is highly appreciate.
I just tried installing asterisk
I get the following error
Could not find the requested service asterisk: host
Anybody a clue what this means?
Thank you in advance.
the output errors;
TASK [modules : asterisk有効] ************************************************************************
fatal: [asterisk-video-dev1]: FAILED! => {"changed": false, "msg": "Could not find the requested service asterisk: host"}
TASK [modules : エラーで中断] ****************************************************************************
fatal: [asterisk-video-dev1]: FAILED! => {"changed": true, "cmd": ["/bin/false"], "delta": "0:00:00.003177", "end": "2018-05-09 02:17:48.038132", "msg": "non-zero return code", "rc": 1, "start": "2018-05-09 02:17:48.034955", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/home/centos/ansible/install_asterisk-video/site.retry
PLAY RECAP *****************************************************************************************
asterisk-video-dev1 : ok=12 changed=6 unreachable=0 failed=2
Wes
The error in full is;
TASK [modules : asterisk有効] *********************************************************
fatal: [asterisk-video-dev1]: FAILED! => {“changed”: false, “msg”: “Could not find the requested service asterisk: host”}
TASK [modules : エラーで中断] *************************************************************
fatal: [asterisk-video-dev1]: FAILED! => {“changed”: true, “cmd”: ["/bin/false"], “delta”: “0:00:00.003425”, “end”: “2018-05-09 01:50:37.418121”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2018-05-09 01:50:37.414696”, “stderr”: “”, “stderr_lines”: [], “stdout”: “”, “stdout_lines”: []}
to retry, use: --limit @/home/centos/ansible/install_asterisk-video/site.retry
jcolp
May 9, 2018, 9:01am
4
The Asterisk project does not provide an ansible role or playbook for installation. If this is something you wrote yourself you’ll need to show precisely what it is failing on, if it is something you got from elsewhere I’d suggest reaching out there.
This is the playbook I used.
The problem should be here.
---
- name: asteriskソースダウンロード
get_url:
url: "http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-13.11.0-rc1.tar.gz"
dest: "{{working_dir}}/asterisk-13.11.0-rc1.tar.gz"
- name: asterisk解凍
unarchive:
src: "{{working_dir}}/asterisk-13.11.0-rc1.tar.gz"
remote_src: true
dest: "{{working_dir}}/"
- name: asteriskビルド&インストール
shell: |
cd {{working_dir}}/asterisk-13.11.0-rc1
./configure
make menuselect.makeopts
menuselect/menuselect --enable CORE-SOUNDS-JA-WAV
menuselect/menuselect --enable CORE-SOUNDS-JA-ULAW
menuselect/menuselect --enable CORE-SOUNDS-JA-ALAW
menuselect/menuselect --enable CORE-SOUNDS-JA-GSM
menuselect/menuselect --enable CORE-SOUNDS-JA-G729
menuselect/menuselect --enable CORE-SOUNDS-JA-G722
menuselect/menuselect --enable CORE-SOUNDS-JA-SLN16
menuselect/menuselect --enable CORE-SOUNDS-JA-SIREN7
menuselect/menuselect --enable CORE-SOUNDS-JA-SIREN14
make
make install
make config
- name: asteriskおまじない
shell: |
echo “/usr/local/lib” > /etc/ld.so.conf.d/usr_local.conf
/sbin/ldconfig
- name: asteriskユーザ作成
group:
name: asterisk
state: present
- user:
name: asterisk
group: asterisk
- name: asteriskライブラリの所有権の変更
file:
dest: /var/lib/asterisk
owner: asterisk
group: asterisk
mode: 0644
recurse: true
- name: asterisk aliasの設定
blockinfile:
path: /root/.bashrc
block: |
alias asterisk-cli='asterisk -cvvvvvvvvvvvvvvvvvvr'
marker: "# {mark} ANSIBLE MANAGED BLOCK for asterisk"
insertbefore: '^Source global definitions'
backup: true
- name: asterisk有効
service:
name: asterisk
state: restarted
enabled: true
Have been busy with it for hours now.
Thank you for your prompt reply
jcolp
May 9, 2018, 9:13am
6
You haven’t specified which Linux distribution you are using so I can only guess that either it is expecting a systemd unit file (which Asterisk does not include) or is a Linux distribution which an init script is not installed for.
1 Like
At this moment we are using Amazon Linux cloud server.
Than it is of course the question what are we missing here.