Last active
December 31, 2015 09:39
-
-
Save ihassin/7968416 to your computer and use it in GitHub Desktop.
Ansible project.yml playbook for blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: webservers | |
user: deploy | |
vars_files: | |
- vars.yml | |
tasks: | |
- name: Make directory for database.yml | |
shell: mkdir -p {{home_dir}}/rails/narui/shared/config | |
- name: Copy database.yml | |
action: template src=templates/database.yml dest={{home_dir}}/rails/{{app_name}}/shared/config/database.yml | |
- name: Create the database | |
mysql_db: name=data_production state=present login_user=root login_password={{mysql_root_password}} | |
- name: Make directory assets | |
shell: "mkdir -p {{home_dir}}/rails/{{app_name}}/shared/assets" | |
- name: Create dummy file for Rails 4/Cap 3 (assets will appear magically) | |
shell: "touch {{home_dir}}/rails/{{app_name}}/shared/assets/manifest.yml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment