Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ing. Matej Madeja PhD.
ansible-2020
Commits
9be545b4
Commit
9be545b4
authored
Jun 17, 2020
by
Ing. Matej Madeja
Browse files
final centos 8 solution
parent
18b57268
Changes
5
Hide whitespace changes
Inline
Side-by-side
006 lamp/roles/lamp/defaults/main.yml
View file @
9be545b4
---
# defaults file for lamp
\ No newline at end of file
# defaults file for lamp
apt_pkgs
:
-
apache2
-
php7.3
-
php7.3-mysql
-
mariadb-server
-
mariadb-client
dnf_pkgs
:
-
httpd
-
php
-
php-mysqlnd
-
mariadb-server
-
mariadb
006 lamp/roles/lamp/tasks/CentOS.yml
0 → 100644
View file @
9be545b4
# based on https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-php-7-3-on-rhel-8.html
-
name
:
"
Install
prerequisities"
become
:
yes
dnf
:
name
:
-
epel-release
-
yum-utils
-
https://rpms.remirepo.net/enterprise/remi-release-8.rpm
state
:
present
update_cache
:
yes
-
name
:
"
Enable
DNF
module"
shell
:
cmd
:
"
dnf
module
enable
-y
php:remi-7.3"
-
name
:
"
Install
php"
become
:
yes
dnf
:
name
:
"
{{
dnf_pkgs
}}"
state
:
present
update_cache
:
yes
-
name
:
"
Start
services"
service
:
name
:
"
{{
item
}}"
state
:
started
enabled
:
yes
become
:
yes
with_items
:
-
httpd
-
mariadb
006 lamp/roles/lamp/tasks/Debian.yml
View file @
9be545b4
...
...
@@ -12,3 +12,8 @@
-
name
:
"
Add
to
source
list"
shell
:
"
echo
\"
deb
https://packages.sury.org/php/
$(lsb_release
-sc)
main
\"
|
tee
/etc/apt/sources.list.d/php7.3.list"
-
name
:
"
Install
packages"
apt
:
pkg
:
"
{{
apt_pkgs
}}"
update_cache
:
yes
006 lamp/roles/lamp/tasks/Ubuntu.yml
View file @
9be545b4
-
name
:
"
Add
ppa:ondrej/php
repo"
become
:
yes
apt_repository
:
repo
:
"
ppa:ondrej/php"
\ No newline at end of file
repo
:
"
ppa:ondrej/php"
-
name
:
"
Install
packages"
apt
:
pkg
:
"
{{
apt_pkgs
}}"
update_cache
:
yes
\ No newline at end of file
006 lamp/roles/lamp/tasks/main.yml
View file @
9be545b4
...
...
@@ -6,14 +6,7 @@
pkg
:
-
software-properties-common
update_cache
:
yes
-
debug
:
var
:
ansible_os_family
tags
:
debug
-
debug
:
var
:
ansible_distribution
tags
:
debug
when
:
ansible_os_family == 'Debian'
-
include
:
Ubuntu.yml
when
:
ansible_distribution == 'Ubuntu'
...
...
@@ -21,15 +14,8 @@
-
include
:
Debian.yml
when
:
ansible_distribution == 'Debian'
-
name
:
"
Install
packages"
apt
:
pkg
:
-
apache2
-
php7.3
-
php7.3-mysql
-
mariadb-server
-
mariadb-client
update_cache
:
yes
-
include
:
CentOS.yml
when
:
ansible_distribution == 'CentOS'
# - name: "Deploy index.html"
# become: yes
...
...
@@ -61,9 +47,5 @@
tags
:
-
files
-
debug
:
var
:
role_path
tags
:
-
files
become
:
yes
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment