summaryrefslogtreecommitdiffstats
path: root/vagrant_support
diff options
context:
space:
mode:
authorSebastin Santy <sebastinssanty@gmail.com>2017-06-08 19:37:52 +0200
committerDylan William Hardison <dylan@hardison.net>2017-06-08 19:37:52 +0200
commit0a7f9d271efb4f97aaddcb39c173e986f5357d59 (patch)
treeabf505007669982c23f3c0b125ee5651a78feba1 /vagrant_support
parentef7f6526d83caf6a39dc8ed6c96a2c8675ae4011 (diff)
downloadbugzilla-0a7f9d271efb4f97aaddcb39c173e986f5357d59.tar.gz
bugzilla-0a7f9d271efb4f97aaddcb39c173e986f5357d59.tar.xz
Skipping some steps in ansible for rapid debugging (#92)
* Adding --no-templates to checksetup * my proposed changes
Diffstat (limited to 'vagrant_support')
-rw-r--r--vagrant_support/apache.yml2
-rwxr-xr-xvagrant_support/bmo-checksetup.j26
-rw-r--r--vagrant_support/checksetup.yml5
-rw-r--r--vagrant_support/playbook.yml4
-rw-r--r--vagrant_support/update.yml23
5 files changed, 36 insertions, 4 deletions
diff --git a/vagrant_support/apache.yml b/vagrant_support/apache.yml
index e4399f612..c7159371c 100644
--- a/vagrant_support/apache.yml
+++ b/vagrant_support/apache.yml
@@ -4,9 +4,11 @@
src: apache.j2
dest: /etc/httpd/conf.d/bugzilla.conf
mode: 0644
+ when: LAZY == 0
- name: enable httpd
service: name=httpd enabled=yes
+ when: LAZY == 0
- name: restart httpd
service: name=httpd state=restarted
diff --git a/vagrant_support/bmo-checksetup.j2 b/vagrant_support/bmo-checksetup.j2
index c35a323c3..a2695d0cf 100755
--- a/vagrant_support/bmo-checksetup.j2
+++ b/vagrant_support/bmo-checksetup.j2
@@ -3,10 +3,10 @@
cd /vagrant
if [[ ! -f ~/localconfig || ! -f /data/params ]]; then
- perl checksetup.pl /home/vagrant/checksetup_answers.txt
- perl checksetup.pl /home/vagrant/checksetup_answers.txt
+ perl checksetup.pl "$@" /home/vagrant/checksetup_answers.txt
+ perl checksetup.pl "$@" /home/vagrant/checksetup_answers.txt
else
cp ~/localconfig /vagrant
- perl checksetup.pl < /dev/null
+ perl checksetup.pl "$@" < /dev/null
cp /vagrant/localconfig ~/
fi
diff --git a/vagrant_support/checksetup.yml b/vagrant_support/checksetup.yml
index 6b54ef18d..580cc9dd9 100644
--- a/vagrant_support/checksetup.yml
+++ b/vagrant_support/checksetup.yml
@@ -4,12 +4,14 @@
src: bmo-checksetup.j2
dest: /usr/local/bin/bmo-checksetup
mode: 0755
+ when: LAZY == 0
- name: bmo generate data script
template:
src: bmo-generate-data.j2
dest: /usr/local/bin/bmo-generate-data
mode: 0755
+ when: LAZY == 0
- name: bmo checksetup answers
template:
@@ -18,10 +20,11 @@
owner: vagrant
group: vagrant
mode: 0644
+ when: LAZY == 0
- name: run checksetup
become: false
- shell: sg apache -c '/usr/local/bin/bmo-checksetup'
+ shell: sg apache -c '/usr/local/bin/bmo-checksetup --no-templates'
- name: generate data
become: false
diff --git a/vagrant_support/playbook.yml b/vagrant_support/playbook.yml
index f89d5295e..f5ff7335a 100644
--- a/vagrant_support/playbook.yml
+++ b/vagrant_support/playbook.yml
@@ -168,11 +168,15 @@
mode: 0755
- include: checksetup.yml
+ vars:
+ LAZY: 0
- include: cron.yml
- include: jobqueue.yml
- include: push.yml
- include: email.yml
- include: apache.yml
+ vars:
+ LAZY: 0
- include: devtools.yml
- name: fix owner of /vagrant/template_cache
diff --git a/vagrant_support/update.yml b/vagrant_support/update.yml
new file mode 100644
index 000000000..879345c57
--- /dev/null
+++ b/vagrant_support/update.yml
@@ -0,0 +1,23 @@
+---
+- hosts: web
+ become: true
+ tasks:
+
+ - name: add local symlink
+ file: path=/vagrant/local src=/opt/bmo/local state=link force=true
+
+ - name: make bmo data dir
+ file: path=/data state=directory owner=vagrant group=apache mode=0775
+
+ - name: fix owner of /vagrant
+ file: path=/vagrant state=directory owner=vagrant group=apache recurse=yes
+
+ - name: add data symlink
+ file: path=/vagrant/data src=/data state=link force=true
+
+ - include: checksetup.yml
+ vars:
+ LAZY: 1
+ - include: apache.yml
+ vars:
+ LAZY: 1 \ No newline at end of file