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
3dd3da9e
Commit
3dd3da9e
authored
Jun 18, 2020
by
Ing. Matej Madeja
Browse files
current work
parent
1d2575e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
007 database config/roles/mariadb-config/handlers/main.yml
View file @
3dd3da9e
---
# handlers file for mariadb-config
\ No newline at end of file
# handlers file for mariadb-config
-
name
:
restart apache
service
:
name
:
apache2
state
:
restarted
enabled
:
yes
become
:
yes
\ No newline at end of file
007 database config/roles/mariadb-config/tasks/main.yml
View file @
3dd3da9e
---
# tasks file for mariadb-config
-
name
:
Install phpmyadmin
-
name
:
Install phpmyadmin
and dependencies
apt
:
pkg
:
-
phpmyadmin
-
php7.3-mbstring
-
php7.3-gettext
-
python3-pip
update_cache
:
yes
become
:
yes
notify
:
restart apache
-
name
:
"
Ensure
phpmyadmin
config
is
include
in
main
apache
config"
become
:
yes
...
...
@@ -14,3 +18,32 @@
state
:
present
regexp
:
'
^Include.+phpmyadmin.+$'
line
:
"
Include
/etc/phpmyadmin/apache.conf"
insertafter
:
"
EOF"
notify
:
restart apache
-
name
:
"
Generate
new
password"
shell
:
"
openssl
rand
-hex
7"
register
:
mysql_new_root_pass
-
debug
:
var
:
mysql_new_root_pass
-
name
:
"
Install
PyMySQL"
become
:
yes
pip
:
name
:
PyMySQL
-
name
:
"
Change
password
for
root"
become
:
yes
mysql_user
:
name
:
root
password
:
"
{{
mysql_new_root_pass.stdout
}}"
priv
:
'
*.*:ALL'
host
:
"
{{
item
}}"
state
:
present
with_items
:
-
127.0.0.1
-
::1
-
localhost
-
"
{{
ansible_hostname
}}"
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