Added the repository and version as variables

Make the role fully idempotent by pinning the version and also use a variable
for setting the repository.
This commit is contained in:
Giancarlo Razzolini 2018-03-02 20:11:37 -03:00
parent 2db718179c
commit 3d54465fab
No known key found for this signature in database
GPG key ID: F22FB1D78A77AEAB
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,9 @@
archwiki_dir: '/srv/http/archwiki'
archwiki_domain: 'wiki.archlinux.org'
archwiki_user: 'archwiki'
archwiki_repository: 'https://git.archlinux.org/vhosts/wiki.archlinux.org.git'
archwiki_version: 157cc33b0b4459e02b0a573277e092b79bc849b1
archwiki_socket: '/run/php-fpm/archwiki.socket'
archwiki_db: 'archwiki'

View file

@ -24,7 +24,7 @@
file: path=/var/log/nginx/{{ archwiki_domain }} state=directory owner=root group=root mode=0755
- name: clone archwiki repo
git: repo=https://git.archlinux.org/vhosts/{{ archwiki_domain }}.git dest="{{ archwiki_dir }}/public"
git: repo={{ archwiki_repository }} dest="{{ archwiki_dir }}/public" version={{ archwiki_version }}
become: true
become_user: "{{ archwiki_user }}"
register: release