Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Added support for custom pre/post provisioning tasks. #175

Merged
merged 1 commit into from
Mar 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions provisioning/ansible/config/beetbox.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ beet_mysql_user: beetbox
beet_mysql_password: beetbox
beet_mysql_database: "beetbox"
beet_run_tests: no
beet_custom_pre_tasks: "{{ beet_base }}/.beetbox/tasks/pre/*"
beet_custom_post_tasks: "{{ beet_base }}/.beetbox/tasks/post/*"

# Ansible Galaxy roles.
galaxy_roles:
Expand Down
11 changes: 11 additions & 0 deletions provisioning/ansible/playbook-provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
- config/vagrant.config.yml
- config/local.config.yml

pre_tasks:

- include: "{{ item }}"
with_fileglob:
- "{{ beet_custom_pre_tasks }}"

roles:
- { role: beetbox-init }
- { role: beetbox-known-hosts, when: known_hosts }
Expand All @@ -30,10 +36,15 @@
- { role: beetbox-welcome }

tasks:

- name: Set ownership of beet_user home directory.
file:
path: "/home/{{ beet_user }}"
state: directory
owner: "{{ beet_user }}"
group: "{{ beet_user }}"
recurse: yes

- include: "{{ item }}"
with_fileglob:
- "{{ beet_custom_pre_tasks }}"