Skip to content

Commit e004971

Browse files
ant-media-server-20-04
1 parent a99d5e6 commit e004971

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
mkdir -p {/usr/local/src/ant-media-server-20-04/opt/cloudstack/,/usr/local/src/ant-media-server-20-04/}
4+
5+
cd /usr/local/src/ant-media-server-20-04/opt/cloudstack/ && wget https://raw.githubusercontent.com/stackbill/marketplace/main/_common-files/opt/cloudstack/cleanup.sh
6+
7+
cd /usr/local/src/ant-media-server-20-04/ && wget https://raw.githubusercontent.com/stackbill/marketplace/main/ant-media-server-20-04/ant-media-server.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
- name: Ant Media Server Setup
2+
hosts: localhost
3+
tasks:
4+
- name: Restarting sshd
5+
shell: "sed -i 's/#Match User anoncvs/ForceCommand echo Please wait until the installation is completed..../g' /etc/ssh/sshd_config && systemctl restart sshd"
6+
7+
- name: Updating Packages
8+
ansible.builtin.apt:
9+
update_cache: yes
10+
11+
- name: Download AMS zip file
12+
ansible.builtin.get_url:
13+
url: https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.5.3/ant-media-server-community-2.5.3.zip
14+
dest: /usr/local/src/
15+
16+
- name: Download AMS installer file
17+
ansible.builtin.get_url:
18+
url: https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh
19+
dest: /usr/local/src/
20+
mode: '0755'
21+
22+
23+
- name: Installing AMS
24+
shell: /usr/local/src/install_ant-media-server.sh -i /usr/local/src/ant-media-server-community-2.5.3.zip
25+
26+
- name: Creating a directory for shell script
27+
ansible.builtin.file:
28+
path: /opt/cloudstack
29+
state: directory
30+
31+
- name: Copy files for shell script
32+
copy:
33+
src: "{{ item.confsrc }}"
34+
dest: "{{ item.confdest }}"
35+
with_items:
36+
- { confsrc: '/usr/local/src/ant-media-server-20-04/opt/cloudstack/cleanup.sh', confdest: '/opt/cloudstack/'}
37+
38+
- name: Adding a line for shell script
39+
lineinfile:
40+
path: /root/.bashrc
41+
line: "chmod +x /opt/cloudstack/cleanup.sh && /opt/cloudstack/cleanup.sh"
42+
state: present
43+
44+
- name: Restarting sshd
45+
shell: "sed -i 's/ForceCommand echo Please wait until the installation is completed..../#Match User anoncvs/g' /etc/ssh/sshd_config && systemctl restart sshd"

0 commit comments

Comments
 (0)