#######################################################################################################
This repository and the role associated are deprecated in favor of the Manala Ansible Collection
You will find informations on its usage on the collection repository
#######################################################################################################
❗ Report issues and send Pull Requests in the main Ansible Role repository ❗
This role will deal with Deployment.
It's part of the Manala Ansible stack but can be used as a stand alone component.
None.
None.
Using ansible galaxy cli:
ansible-galaxy install manala.deploy
Using ansible galaxy requirements file:
- src: manala.deploy
Name | Default | Type | Description |
---|---|---|---|
The include
strategy allows to use a custom strategy to deliver the code to the server.
Example that extracts an archive from AWS S3:
manala_deploy_strategy: include
manala_deploy_strategy_include_name: "{{ playbook_dir }}/tasks/deploy-s3-archive.yml"
manala_deploy_strategy_include_options:
s3_object: "/app/{{ app_version | default('master') }}/latest.tar.gz"
tasks/deploy-s3-archive.yml
- name: strategy/s3
block:
- name: strategy/s3 > Create tmp dir
tempfile:
state: directory
suffix: manala_deploy
register: deploy_tmp
- name: strategy/s3 > Get S3 archive
aws_s3:
bucket: releases
object: "{{ manala_deploy_strategy_include_options.s3_object }}"
dest: "{{ deploy_tmp.path }}/archive.tar.gz"
mode: get
- name: strategy/s3 > Create release dir
file:
path: "{{ deploy_helper.new_release_path }}/"
state: directory
- name: strategy/s3 > Unarchive
unarchive:
src: "{{ deploy_tmp.path }}/archive.tar.gz"
dest: "{{ deploy_helper.new_release_path }}"
remote_src: yes
Without options
manala_deploy_tasks:
- foo
- foo: ~
when: "'deploy_demo_master' in group_names"
Single or default option
manala_deploy_tasks:
- foo: bar
- foo: bar
when: "'deploy_demo_master' in group_names"
Multiple options
manala_deploy_tasks:
- foo:
baz: bar
bar: baz
- foo:
baz: bar
bar: baz
when: "'deploy_demo_master' in group_names"
- hosts: servers
roles:
- { role: manala.deploy }
MIT
Manala (http://www.manala.io/)