项目作者: MWojtowicz

项目描述 :
An Ansible role that deploy your application just the same way like Capistrano.
高级语言:
项目地址: git://github.com/MWojtowicz/ansible-deployment.git
创建时间: 2017-12-24T00:23:26Z
项目社区:https://github.com/MWojtowicz/ansible-deployment

开源协议:

下载


Ansible Role: Deployment

An Ansible role that deploy your application just the same way like Capistrano.

What means Capistrano way?

Capistrano is software written in Ruby, which allows you to deploy your application on remote node.
Here is how it works:

  1. On remote node you should have in project workdir directories /shared, /repository and /deployments.
  2. In /repository directory there is a copy of your source repo (GIT/SVN etc.)
  3. When you do deploy, capistrano copies repository directory into /deployments dir.
    Name of copied directory is different - it’s always current timestamp (like /deployments/20171108123453).
  4. Next step is to make symlinks of all directories/files from /shared directory into the new deployment directory.
    It allows you to share upload dir or logs directory between deployments.
  5. Last step is to create or change symlink /current to point to the latest deployment from /deployments

Requirements

There aren’t any requirements for this role.

Role variables

Available variables are listed below, along with default values (see defaults/main.yml).

Workdir for the role. Inside there will be deployed all applications. It can be also customised per project.
  1. deployment_default_workdir: ""
Project owner and group. It can be also customised per project.
  1. deployment_default_owner: ""
  2. deployment_default_group: ""
How many latest releases have to keep
  1. deployment_keep_releases: 5
Project deployments data
  1. deployment_projects: []
Example of project deployed with almost all defaults
  1. deployment_projects: []
  2. - name: project.name
  3. repository: git@github.com:some/repo
Example of project deployed with all options customized
  1. deployment_projects: []
  2. - name: project.name
  3. workdir: /var/www
  4. repository: git@github.com:some/repo
  5. version: "HEAD"
  6. owner: apache
  7. group: apache
  8. shared_files:
  9. - any/path/to/mount/in/dir/deployment/dir
  10. ssh_opts: ""
  11. keep_releases: 2

Dependencies

None.

Example Playbook

  1. - hosts: webservers
  2. vars_files:
  3. - vars/main.yml
  4. roles:
  5. - { role: MWojtowicz.deployment }

License

MIT / BSD

Author Information

This role was created in 2017 by Michal Wojtowicz.