capistrano_setup
Ansible role capistrano_setup
An ansible role for creating the default project structure when using Capistrano as your application deployment tool.
GitHub | Version | Issues | Pull Requests | Downloads |
---|---|---|---|---|
Example Playbook
This example is taken from molecule/default/converge.yml
and is tested on each push, pull request and release.
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
roles:
- role: buluma.capistrano_setup
capistrano_setup_users:
- name: capistrano project
username: capistrano
group: docker
shell: ''
comment: ''
uid: 1750
home: /
createhomedir: false
password: "{{ 'itsasecret' | password_hash('sha512') }}"
update_password: on_create
upload_key: false
project_directory: "capistrano"
placeholder: files/index.txt
capistrano_setup_users_deleted:
- name: buluma
remove: false
The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: yes
gather_facts: no
roles:
- role: buluma.bootstrap
Also see a full explanation and example on how to use these roles.
Role Variables
The default values for the variables are set in defaults/main.yml
:
---
# defaults file for capistrano_setup
capistrano_setup_users:
# - username: docker // project username
# name: buluma // name of the project or some extra information you want to put in the users comment field
# group: docker
# groups: 'docker, docker2' // list of groups the user belongs to
# shell: '' // user shell
# comment: ''
# uid: 1750 // user id
# home: / // path of the users home directory
# createhomedir: false // indicate if you want to create the home directory
# password: "{{ 'itsasecret' | password_hash('sha512') }}" // password for the project user
# update_password: on_create
# upload_key: false
# project_directory: "capistrano" // possible subdirectory inside the users home directory for your project structure
# placeholder: files/index.txt // placeholder file so you can have a dummy deployment when your project is not deployed yet
# pub_key: // public key to use when deploying through capistrano
# upload_key: // indicate if you want to upload the public key
capistrano_setup_users_deleted:
# - name: name of the user you want to remove
# remove: false // indicate if you want to remove the users home directory
Requirements
- pip packages listed in requirements.txt.
State of used roles
The following roles are used to prepare a system. You can prepare your system in another way.
Requirement | GitHub | Version |
---|---|---|
buluma.bootstrap |
Context
This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.
Here is an overview of related roles:
Compatibility
This role has been tested on these container images:
container | tags |
---|---|
Fedora | all |
Ubuntu | all |
opensuse | all |
EL | all |
The minimum version of Ansible required is 2.12, tests have been done to:
- The previous version.
- The current version.
- The development version.
If you find issues, please register them in GitHub
Changelog
License
Author Information
An ansible role for creating the default project structure when using Capistrano as your application deployment tool.
ansible-galaxy install buluma/ansible-role-capistrano_setup