Skip to content

Commit

Permalink
Allow external roles to be installed to galaxy_roles (theforeman#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
akofink authored and ehelms committed Aug 2, 2016
1 parent d41fb79 commit cbb16dc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ Gemfile.lock
*.pyc
user_playbooks/*.yml
user_playbooks/*.yaml
playbooks/galaxy_roles
requirements.yml
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ static:

Boxes can be further customized by declaring Ansible playbooks to be run during provisioning. One or more playbooks can be specified and will be executed sequentially. An ignored directory can be used to put playbooks into 'user_playbooks' without worrying about adding them during a git commit.

Ansible roles may also be installed directly using the [`ansible-galaxy` command](http://docs.ansible.com/ansible/galaxy.html#the-ansible-galaxy-command-line-tool). These roles will be installed at `playbooks/galaxy_roles` and will be ignored by git. You may also specify roles in a `requirements.yml`, which you can use to install all desired roles with `ansible-galaxy install -r requirements.yml`

```
ansible:
box: centos7-katello-nightly
Expand Down
2 changes: 1 addition & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
callback_plugins = $PWD/playbooks/callback_plugins/
nocows = 1
inventory = $PWD/playbooks/inventory/vagrant.py
roles_path = $PWD/playbooks/roles
roles_path = $PWD/playbooks/galaxy_roles:$PWD/playbooks/roles
retry_files_save_path = $HOME/.ansible/retry-files
private_key_file = $HOME/.vagrant.d/insecure_private_key
remote_user = vagrant
Expand Down
5 changes: 5 additions & 0 deletions requirements.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# from galaxy
- src: yatesr.timezone

# from GitHub
- src: https://github.com/bennojoy/nginx

0 comments on commit cbb16dc

Please sign in to comment.