From 116b6456ccc5d49428c60af6858ffbfcdfd26c2d Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Mon, 17 Mar 2014 21:22:39 +0000 Subject: [PATCH] adding local git repository creation, ansible working directory and ks hosting directory to lockbox group playbook, required variables for lockbox-comm01.qa --- .../lockbox-comm01.qa.fedoraproject.org | 3 +++ playbooks/groups/lockbox.yml | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/inventory/host_vars/lockbox-comm01.qa.fedoraproject.org b/inventory/host_vars/lockbox-comm01.qa.fedoraproject.org index 38ae35c563..b1c4cd457e 100644 --- a/inventory/host_vars/lockbox-comm01.qa.fedoraproject.org +++ b/inventory/host_vars/lockbox-comm01.qa.fedoraproject.org @@ -8,3 +8,6 @@ volgroup: /dev/Guests00 eth0_ip: 10.5.124.210 vmhost: virthost-comm01.qa.fedoraproject.org datacenter: phx2 +gitrepos: + - {name: private, path: 'local'} +ansible_base: /srv/ansible/ diff --git a/playbooks/groups/lockbox.yml b/playbooks/groups/lockbox.yml index 4fa95b640e..cb05d2b51f 100644 --- a/playbooks/groups/lockbox.yml +++ b/playbooks/groups/lockbox.yml @@ -41,3 +41,28 @@ handlers: - include: "{{ handlers }}/restart_services.yml" + + +- name: configure lockbox + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "{{ private }}/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + tasks: + - name: create directories for local git repos + file: path=/srv/git/{{ item.path }} state=directory owner=root group=root mode=1775 + with_items: {{ gitrepos }} + + - name: initialize git repos + command: chdir=/srv/git/{{ item.path }} creates={{ item.path }}/HEAD git init --bare + with_items: {{ gitrepos }} + + - name: create ansible base working directory + file: path=/srv/ansible state=directory owner=root group=root mode=1775 + + - name: create directory for serving kickstarts + file: path=/var/www/html/ks state=directory owner=httpd group=httpd mode=1755