Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Matomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
Matomo
Commits
279472f8
Commit
279472f8
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-playbooks/general#85 Linting [skip-ci]
parent
8247f38b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/apache.yml
+19
-17
19 additions, 17 deletions
tasks/apache.yml
tasks/install.yml
+54
-54
54 additions, 54 deletions
tasks/install.yml
with
73 additions
and
71 deletions
tasks/apache.yml
+
19
−
17
View file @
279472f8
...
@@ -3,25 +3,27 @@
...
@@ -3,25 +3,27 @@
-
block
:
-
block
:
-
name
:
Apache Configuration File
-
name
:
Apache Configuration File
template
:
template
:
src
='
vhost.conf
'
src
:
vhost.conf
dest
='
/etc/apache2/sites-available/{{ matomo.domain }}{{ apache_conf_ext }}
'
dest
:
/etc/apache2/sites-available/{{ matomo.domain }}{{ apache_conf_ext }}
owner
='
root
'
owner
:
root
group
='
root
'
group
:
root
mode
='
664
'
mode
:
0
664
notify
:
notify
:
-
"
Apache
|
Restart
Apache"
-
"
Restart
Apache"
-
name
:
Apache enable our new site(s)
-
name
:
Apache enable our new site(s)
command
:
a2ensite {{ matomo.domain }} creates=/etc/apache2/sites-enabled/{{ matomo.domain }}{{ apache_conf_ext }}
command
:
a2ensite {{ matomo.domain }}
notify
:
args
:
-
"
Apache
|
Restart
Apache"
creates
:
/etc/apache2/sites-enabled/{{ matomo.domain }}{{ apache_conf_ext }}
notify
:
-
"
Restart
Apache"
-
name
:
Apache install GeoIP
-
name
:
Apache install GeoIP
apt
:
apt
:
pkg
:
libapache2-mod-geoip
pkg
:
libapache2-mod-geoip
state
:
present
state
:
present
tags
:
tags
:
-
ApacheConfig
-
ApacheConfig
This diff is collapsed.
Click to expand it.
tasks/install.yml
+
54
−
54
View file @
279472f8
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
-
block
:
-
block
:
-
set_fact
:
-
set_fact
:
webRoot
='
/var/www/matomo/{{ matomo.id }}
'
webRoot
:
/var/www/matomo/{{ matomo.id }}
apacheUser
='
www-data
'
apacheUser
:
www-data
apacheLogDir
='
/var/log/apache2
'
apacheLogDir
:
/var/log/apache2
when
:
matomo.jail is not defined
when
:
matomo.jail is not defined
-
set_fact
:
-
set_fact
:
webRoot
=
'{{ jailroot }}/{{ matomo.id }}/var/www/matomo'
webRoot
:
'
{{
jailroot
}}/{{
matomo.id
}}/var/www/matomo'
apacheUser
=
'{{ matomo.id }}'
apacheUser
:
'
{{
matomo.id
}}'
apacheLogDir
=
'{{ jailroot }}/{{ matomo.id }}/var/log/apache2'
apacheLogDir
:
'
{{
jailroot
}}/{{
matomo.id
}}/var/log/apache2'
when
:
matomo.jail is defined
when
:
matomo.jail is defined
tags
:
tags
:
-
always
-
always
...
@@ -32,11 +32,11 @@
...
@@ -32,11 +32,11 @@
-
name
:
Ensure Root Directories
-
name
:
Ensure Root Directories
file
:
file
:
path
=
'{{ item }}'
path
:
'
{{
item
}}'
state
='
directory
'
state
:
directory
owner
=
'{{ apacheUser }}'
owner
:
'
{{
apacheUser
}}'
group
=
'{{ apacheUser }}'
group
:
'
{{
apacheUser
}}'
mode
='
775
'
mode
:
0
775
with_items
:
with_items
:
-
{{
webRoot
}}
-
{{
webRoot
}}
tags
:
tags
:
...
@@ -44,12 +44,12 @@
...
@@ -44,12 +44,12 @@
-
name
:
File Modes and Ownership
-
name
:
File Modes and Ownership
file
:
file
:
path
=
'{{ webRoot }}'
path
:
'
{{
webRoot
}}'
owner
=
'{{ apacheUser }}'
owner
:
'
{{
apacheUser
}}'
group
=
'{{ apacheUser }}'
group
:
'
{{
apacheUser
}}'
mode
='
g+w
'
mode
:
g+w
recurse
=
yes
recurse
:
yes
follow
=
no
follow
:
no
tags
:
tags
:
-
deploy
-
deploy
...
@@ -69,32 +69,32 @@
...
@@ -69,32 +69,32 @@
-
name
:
Configuration file
-
name
:
Configuration file
template
:
template
:
src
='
config.ini.php
'
src
:
config.ini.php
dest
=
'{{ webRoot }}/config/config.ini.php'
dest
:
'
{{
webRoot
}}/config/config.ini.php'
owner
=
'{{ apacheUser }}'
owner
:
'
{{
apacheUser
}}'
group
=
'{{ apacheUser }}'
group
:
'
{{
apacheUser
}}'
mode
='
664
'
mode
:
0
664
tags
:
tags
:
-
deploy
-
deploy
-
name
:
Composer
-
name
:
Composer
composer
:
composer
:
command
='
update
'
command
:
update
working_dir
=
'{{ webRoot }}'
working_dir
:
'
{{
webRoot
}}'
no_dev
=
yes
no_dev
:
yes
optimize_autoloader
=
yes
optimize_autoloader
:
yes
prefer_dist
=
yes
prefer_dist
:
yes
ignore_errors
:
true
ignore_errors
:
yes
tags
:
tags
:
-
deploy
-
deploy
-
name
:
Ensure Working Directories
-
name
:
Ensure Working Directories
file
:
file
:
path
=
'{{ item }}'
path
:
'
{{
item
}}'
state
='
directory
'
state
:
directory
owner
=
'{{ apacheUser }}'
owner
:
'
{{
apacheUser
}}'
group
=
'{{ apacheUser }}'
group
:
'
{{
apacheUser
}}'
mode
='
775
'
mode
:
0
775
with_items
:
with_items
:
-
{{
webRoot
}}
/tmp
-
{{
webRoot
}}
/tmp
tags
:
tags
:
...
@@ -102,45 +102,45 @@
...
@@ -102,45 +102,45 @@
-
name
:
File Modes and Ownership
-
name
:
File Modes and Ownership
file
:
file
:
path
=
'{{ webRoot }}'
path
:
'
{{
webRoot
}}'
owner
=
'{{ apacheUser }}'
owner
:
'
{{
apacheUser
}}'
group
=
'{{ apacheUser }}'
group
:
'
{{
apacheUser
}}'
mode
='
a-w
'
mode
:
a-w
recurse
=
yes
recurse
:
yes
follow
=
no
follow
:
no
tags
:
tags
:
-
deploy
-
deploy
-
name
:
File Modes for .git Directory
-
name
:
File Modes for .git Directory
file
:
file
:
path
=
'{{ webRoot }}/.git'
path
:
'
{{
webRoot
}}/.git'
mode
='
og+w
'
mode
:
og+w
recurse
=
yes
recurse
:
yes
follow
=
no
follow
:
no
tags
:
tags
:
-
deploy
-
deploy
-
name
:
File Modes for tmp
-
name
:
File Modes for tmp
file
:
file
:
path
=
'{{ webRoot }}/tmp'
path
:
'
{{
webRoot
}}/tmp'
mode
='
ug+w
'
mode
:
ug+w
recurse
=
yes
recurse
:
yes
follow
=
no
follow
:
no
tags
:
tags
:
-
deploy
-
deploy
-
name
:
Ensure Database
-
name
:
Ensure Database
mysql_db
:
mysql_db
:
name
='
matomo_{{ matomo.id }}
'
name
:
matomo_{{ matomo.id }}
login_user
='
root
'
login_user
:
root
login_password
=
'{{ mysql_root_password|default("root") }}'
login_password
:
'
{{
mysql_root_password|default("root")
}}'
login_host
='
127.0.0.1
'
login_host
:
127.0.0.1
login_port
=
'{{ matomo.db_port|default('3306') }}'
login_port
:
'
{{
matomo.db_port|default('3306') }}'
state
='
present
'
state
:
present
-
name
:
Run Upgrade
-
name
:
Run Upgrade
command
:
'
{{
webRoot
}}/console
core:update
--yes
--no-interaction'
command
:
'
{{
webRoot
}}/console
core:update
--yes
--no-interaction'
become_user
:
'
{{
apacheUser
}}'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
true
ignore_errors
:
yes
tags
:
tags
:
-
deploy
-
deploy
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment