diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2016-04-12 19:03:11 +0300 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2016-04-13 10:03:42 +0000 |
commit | 4d53fff5c89b718d38d39d0245b62c534df9f2ed (patch) | |
tree | 795e642c985fd857ea80220c5594545541a27181 | |
parent | 87a202dc5936ab9f8044678ce8a9687a644bacf4 (diff) |
roles/apache-auth: Allow to override Apache webroot owner.
There's new var for this, {{apache_root_owner}}. It defaults to
{{apache_user}}, but e.g. git-servers override it to {{git_user}}
(required for grokmirror).
Change-Id: Ia934c85cd612f08113606309678576f5048e291c
Reviewed-on: https://review.linaro.org/11351
Reviewed-by: Andy Doan <andy.doan@linaro.org>
Reviewed-by: Ben Copeland <ben.copeland@linaro.org>
-rw-r--r-- | per-service/git-servers/group_vars/all | 1 | ||||
-rw-r--r-- | roles/apache-auth/defaults/main.yml | 3 | ||||
-rw-r--r-- | roles/apache-auth/tasks/main.yml | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/per-service/git-servers/group_vars/all b/per-service/git-servers/group_vars/all index 0ce93238..18c34f57 100644 --- a/per-service/git-servers/group_vars/all +++ b/per-service/git-servers/group_vars/all @@ -25,6 +25,7 @@ gerrit_download_link: https://gerrit-releases.storage.googleapis.com/gerrit-{{ge gerrit_root: /srv/gerrit db_name: reviewdb git_user: git +apache_root_owner: "{{git_user}}" repo_root: /srv/repositories diff --git a/roles/apache-auth/defaults/main.yml b/roles/apache-auth/defaults/main.yml new file mode 100644 index 00000000..9f3fb79c --- /dev/null +++ b/roles/apache-auth/defaults/main.yml @@ -0,0 +1,3 @@ +# Apache docroot owner is by default obviously an apache user, +# but some services may need to override that, e.g. to git user. +apache_root_owner: "{{apache_user}}" diff --git a/roles/apache-auth/tasks/main.yml b/roles/apache-auth/tasks/main.yml index 93c26c53..c6c037b6 100644 --- a/roles/apache-auth/tasks/main.yml +++ b/roles/apache-auth/tasks/main.yml @@ -27,8 +27,8 @@ - name: Make sure Apache root directory exists file: state=directory path={{apache_root}}/{{host_name}} - owner={{ apache_user }} - group={{ apache_user }} + owner={{apache_root_owner}} + group={{apache_root_owner}} mode=0755 - name: Install CGI script wrapper for suexec to check group |