You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.8 KiB
78 lines
1.8 KiB
4 years ago
|
---
|
||
|
- name: disable selinux :(
|
||
|
template:
|
||
|
src: selinux.j2
|
||
|
dest: /etc/sysconfig/selinux
|
||
|
|
||
|
- name: disable selinux :(
|
||
|
template:
|
||
|
src: selinux.j2
|
||
|
dest: /etc/selinux/config
|
||
|
|
||
|
- name: reboot if needed
|
||
|
reboot:
|
||
|
reboot_timeout: 3600
|
||
|
when: ansible_selinux.status == "enabled"
|
||
|
|
||
|
- name: upgrade stuff via dnf
|
||
|
dnf:
|
||
|
state: latest
|
||
|
name: "*"
|
||
|
|
||
|
- name: Install development tools
|
||
|
dnf:
|
||
|
name: '@Development tools'
|
||
|
state: present
|
||
|
|
||
|
- name: add asterisk user
|
||
|
user:
|
||
|
name: asterisk
|
||
|
shell: /sbin/nologin
|
||
|
system: yes
|
||
|
|
||
|
- name: add epel
|
||
|
yum:
|
||
|
name: epel-release
|
||
|
state: latest
|
||
|
|
||
|
- name: install a bunch of packages
|
||
|
dnf:
|
||
|
state: latest
|
||
|
name: lynx, tftp-server, unixODBC, mysql-connector-odbc, mariadb-server, mariadb, httpd, ncurses-devel, sendmail, sendmail-cf, sox, newtdevel, libxml2-devel, libtiff-devel, audiofile-devel, gtk2-devel, subversion, kernel-devel, git, crontabs, cronie, cronie-anacron, wget, vim, uuiddevel, sqlite-devel, net-tools, gnutl-sdevel, python-devel, info, libuuid-devel, npm, php, php-pdo, php-mysql, php-mbstring, php-pear, php-process, php-xml, php-opcache, php-ldap, php-intl, php-soap
|
||
|
|
||
|
- name: Enable mariadb
|
||
|
service:
|
||
|
name: mariadb
|
||
|
enabled: yes
|
||
|
state: started
|
||
|
|
||
|
- name: Enable httpd
|
||
|
service:
|
||
|
name: httpd
|
||
|
enabled: yes
|
||
|
state: started
|
||
|
|
||
|
- name: install Console_Getopt via pear
|
||
|
shell: pear install Console_Getopt
|
||
|
ignore_errors: yes
|
||
|
|
||
|
- name: Check that /etc/asterisk exists
|
||
|
stat:
|
||
|
path: /etc/asterisk
|
||
|
register: asterisk
|
||
|
|
||
|
- name: debug
|
||
|
debug:
|
||
|
var: asterisk
|
||
|
|
||
|
- name: Install Asterisk if needed
|
||
|
block:
|
||
|
- name: install install-asterisk.sh script
|
||
|
template:
|
||
|
src: install-asterisk.sh.j2
|
||
|
dest: /tmp/install-asterisk.sh
|
||
|
|
||
|
- name: install asterisk via install-asterisk.sh script
|
||
|
shell: sh /tmp/install-asterisk.sh
|
||
|
when: not asterisk.stat.exists
|