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
8247f38b
Commit
8247f38b
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
ansible-playbooks/general#85 Linting
parent
a6c6b1e2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+1
-1
1 addition, 1 deletion
defaults/main.yml
tasks/apache.yml
+7
-6
7 additions, 6 deletions
tasks/apache.yml
tasks/install.yml
+45
-32
45 additions, 32 deletions
tasks/install.yml
tasks/main.yml
+14
-11
14 additions, 11 deletions
tasks/main.yml
with
67 additions
and
50 deletions
defaults/main.yml
+
1
−
1
View file @
8247f38b
matomo_version
:
'
3.9.1
'
matomo_version
:
3.9.1
matomo_force_reset
:
False
This diff is collapsed.
Click to expand it.
tasks/apache.yml
+
7
−
6
View file @
8247f38b
...
...
@@ -3,7 +3,7 @@
-
block
:
-
name
:
"
Apache
Configuration
File
"
-
name
:
Apache Configuration File
template
:
src='vhost.conf'
dest='/etc/apache2/sites-available/{{ matomo.domain }}{{ apache_conf_ext }}'
...
...
@@ -13,14 +13,15 @@
notify
:
-
"
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 }}
notify
:
-
"
Apache
|
Restart
Apache"
-
name
:
"
Apache
install
GeoIP
"
-
name
:
Apache install GeoIP
apt
:
pkg
:
'
libapache2-mod-geoip
'
state
:
'
present
'
pkg
:
libapache2-mod-geoip
state
:
present
tags
:
'
ApacheConfig'
tags
:
-
ApacheConfig
This diff is collapsed.
Click to expand it.
tasks/install.yml
+
45
−
32
View file @
8247f38b
...
...
@@ -12,22 +12,25 @@
apacheUser='{{ matomo.id }}'
apacheLogDir='{{ jailroot }}/{{ matomo.id }}/var/log/apache2'
when
:
matomo.jail is defined
tags
:
'
always'
tags
:
-
always
-
name
:
"
Configure
Apache
"
-
name
:
Configure Apache
include_tasks
:
apache.yml
tags
:
'
ApacheConfig'
tags
:
-
ApacheConfig
-
name
:
"
Remove
existing
components
"
-
name
:
Remove existing components
file
:
path
:
'
{{
item
}}'
state
:
'
absent
'
state
:
absent
with_items
:
-
'
{{
webRoot
}}
'
-
{{
webRoot
}}
when
:
matomo_force_reset
tags
:
'
always'
tags
:
-
always
-
name
:
"
Ensure
Root
Directories
"
-
name
:
Ensure Root Directories
file
:
path='{{ item }}'
state='directory'
...
...
@@ -35,10 +38,11 @@
group='{{ apacheUser }}'
mode='775'
with_items
:
-
'
{{
webRoot
}}'
tags
:
'
always'
-
{{
webRoot
}}
tags
:
-
always
-
name
:
"
File
Modes
and
Ownership
"
-
name
:
File Modes and Ownership
file
:
path='{{ webRoot }}'
owner='{{ apacheUser }}'
...
...
@@ -46,31 +50,34 @@
mode='g+w'
recurse=yes
follow=no
tags
:
'
deploy'
tags
:
-
deploy
-
name
:
"
Clone
Git
Repository
"
-
name
:
Clone Git Repository
git
:
accept_hostkey
:
yes
repo
:
'
git@github.com:matomo-org/matomo.git
'
repo
:
git@github.com:matomo-org/matomo.git
dest
:
'
{{
webRoot
}}'
track_submodules
:
yes
force
:
yes
version
:
'
{{
matomo_version
}}'
become
:
false
environment
:
GIT_LFS_SKIP_SMUDGE
:
'
1'
tags
:
'
deploy'
GIT_LFS_SKIP_SMUDGE
:
1
tags
:
-
deploy
-
name
:
"
Configuration
file
"
-
name
:
Configuration file
template
:
src='config.ini.php'
dest='{{ webRoot }}/config/config.ini.php'
owner='{{ apacheUser }}'
group='{{ apacheUser }}'
mode='664'
tags
:
'
deploy'
tags
:
-
deploy
-
name
:
"
Composer
"
-
name
:
Composer
composer
:
command='update'
working_dir='{{ webRoot }}'
...
...
@@ -78,9 +85,10 @@
optimize_autoloader=yes
prefer_dist=yes
ignore_errors
:
true
tags
:
'
deploy'
tags
:
-
deploy
-
name
:
"
Ensure
Working
Directories
"
-
name
:
Ensure Working Directories
file
:
path='{{ item }}'
state='directory'
...
...
@@ -88,10 +96,11 @@
group='{{ apacheUser }}'
mode='775'
with_items
:
-
'
{{
webRoot
}}/tmp'
tags
:
'
always'
-
{{
webRoot
}}
/tmp
tags
:
-
always
-
name
:
"
File
Modes
and
Ownership
"
-
name
:
File Modes and Ownership
file
:
path='{{ webRoot }}'
owner='{{ apacheUser }}'
...
...
@@ -99,25 +108,28 @@
mode='a-w'
recurse=yes
follow=no
tags
:
'
deploy'
tags
:
-
deploy
-
name
:
"
File
Modes
for
.git
Directory
"
-
name
:
File Modes for .git Directory
file
:
path='{{ webRoot }}/.git'
mode='og+w'
recurse=yes
follow=no
tags
:
'
deploy'
tags
:
-
deploy
-
name
:
"
File
Modes
for
tmp
"
-
name
:
File Modes for tmp
file
:
path='{{ webRoot }}/tmp'
mode='ug+w'
recurse=yes
follow=no
tags
:
'
deploy'
tags
:
-
deploy
-
name
:
"
Ensure
Database
"
-
name
:
Ensure Database
mysql_db
:
name='matomo_{{ matomo.id }}'
login_user='root'
...
...
@@ -126,8 +138,9 @@
login_port='{{ matomo.db_port|default('3306') }}'
state='present'
-
name
:
"
Run
Upgrade
"
-
name
:
Run Upgrade
command
:
'
{{
webRoot
}}/console
core:update
--yes
--no-interaction'
become_user
:
'
{{
apacheUser
}}'
ignore_errors
:
true
tags
:
'
deploy'
tags
:
-
deploy
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
14
−
11
View file @
8247f38b
---
# file: roles/matomo/tasks/main.yml
-
name
:
"
matomo
Role"
set_fact
:
role_matomo_started=true
tags
:
'
always'
-
name
:
matomo Role
set_fact
:
role_matomo_started
:
yes
tags
:
-
always
-
block
:
-
name
:
"
Install
Certs
"
include_tasks
:
'
../../letsencrypt/tasks/cert.yml
'
-
name
:
Install Certs
include_tasks
:
../../letsencrypt/tasks/cert.yml
with_items
:
'
{{
matomo_settings|default([])
}}'
loop_control
:
loop_var
:
domain
when
:
domain.protocol|default("https") == "https" and domain.letsencrypt|default(true)
tags
:
'
ApacheConfig'
tags
:
-
ApacheConfig
when
:
'
"letsencrypt"
not
in
excluded_roles
and
groups.proxyserver
is
not
defined
'
when
:
not excluded_roles or
"letsencrypt" not in excluded_roles and groups.proxyserver is not defined
-
block
:
-
name
:
"
Install
matomo
"
-
name
:
Install matomo
include_tasks
:
install.yml
with_items
:
'
{{
matomo_settings|default([])
}}'
loop_control
:
loop_var
:
matomo
when
:
limit_site is not defined or limit_site == 'False' or matomo.id is not defined or limit_site == matomo.id
tags
:
-
'
ApacheConfig
'
-
'
deploy
'
-
ApacheConfig
-
deploy
when
:
'
"matomo"
not
in
excluded_roles
'
when
:
not excluded_roles or
"matomo" not in excluded_roles
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