Skip to content

Instantly share code, notes, and snippets.

@ihassin
Last active December 31, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihassin/7968416 to your computer and use it in GitHub Desktop.
Save ihassin/7968416 to your computer and use it in GitHub Desktop.
Ansible project.yml playbook for blog post
- 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