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
18b57268
Commit
18b57268
authored
Jun 17, 2020
by
Ing. Matej Madeja
Browse files
continuous commit
parent
91d7b850
Changes
3
Hide whitespace changes
Inline
Side-by-side
006 lamp/roles/lamp/tasks/Debian.yml
0 → 100644
View file @
18b57268
-
name
:
"
Install
prerequisities
for
debian"
apt
:
pkg
:
-
lsb-release
-
apt-transport-https
-
ca-certificates
-
name
:
"
Add
repo"
get_url
:
url
:
https://packages.sury.org/php/apt.gpg
dest
:
/etc/apt/trusted.gpg.d/php.gpg
-
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"
006 lamp/roles/lamp/tasks/Ubuntu.yml
0 → 100644
View file @
18b57268
-
name
:
"
Add
ppa:ondrej/php
repo"
become
:
yes
apt_repository
:
repo
:
"
ppa:ondrej/php"
\ No newline at end of file
006 lamp/roles/lamp/tasks/main.yml
View file @
18b57268
---
# tasks file for lamp
-
block
:
-
name
:
"
Make
sure
that
software-properties-common
is
installed"
apt
:
pkg
:
-
software-properties-common
update_cache
:
yes
-
name
:
"
Make
sure
that
software-properties-common
is
installed"
become
:
yes
apt
:
pkg
:
-
software-properties-common
update_cache
:
yes
-
debug
:
var
:
ansible_os_family
tags
:
debug
-
name
:
"
Add
ppa:ondrej/php
repo"
become
:
yes
apt_repository
:
repo
:
"
ppa:ondrej/php"
-
debug
:
var
:
ansible_distribution
tags
:
debug
-
name
:
"
Install
packages"
become
:
yes
apt
:
pkg
:
-
apache2
-
php7.3
-
php7.3-mysql
-
mariadb-server
-
mariadb-client
update_cache
:
yes
# - name: "Deploy index.html"
# become: yes
# copy:
# src: "index.html"
# dest: /var/www/html/index.html
# tags:
# - files
# - name: "Deploy index.html from template"
# become: yes
# template:
# src: "index.html.j2"
# dest: /var/www/html/index.html
# tags:
# - files
-
name
:
"
Remove
index.html"
become
:
yes
file
:
path
:
/var/www/html/index.html
state
:
absent
tags
:
-
files
-
include
:
Ubuntu.yml
when
:
ansible_distribution == 'Ubuntu'
-
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
# - name: "Deploy index.html"
# become: yes
# copy:
# src: "index.html"
# dest: /var/www/html/index.html
# tags:
# - files
# - name: "Deploy index.html from template"
# become: yes
# template:
# src: "index.html.j2"
# dest: /var/www/html/index.html
# tags:
# - files
-
name
:
"
Remove
index.html"
file
:
path
:
/var/www/html/index.html
state
:
absent
tags
:
-
files
-
name
:
"
Deploy
index.php"
copy
:
src
:
"
index.php"
dest
:
/var/www/html/index.php
tags
:
-
files
-
name
:
"
Deploy
index.php"
-
debug
:
var
:
role_path
tags
:
-
files
become
:
yes
copy
:
src
:
"
index.php"
dest
:
/var/www/html/index.php
tags
:
-
files
-
debug
:
var
:
role_path
tags
:
-
files
\ 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