This is the Ansible Magento 2 role. It's designed for consumption by playbooks, not for consumption by itself. It installs a version of Magento two from an S3 bucket in a minimal
- It is not hugely portable. It was open sourced as part of an effort to make it so
- It requires infrastructure tailored in a particular format, which is currently undocumented.
There are two ways to install this role:
$ cd path/to/playbook/root
$ cat >> requirements.yaml <<EOF
- src: "https://github.com/sitewards/ansible-role-magento-2"
version: "d5b1404" # <----- Update this to a stable version
name: "sitewards.magento2"
EOF
$ ansible-galaxy install -r requirements.yaml
$ cd path/to/playbook/root
$ mkdir roles/
$ git submodule add https://github.com/littlemanco/ansible-role-magento-2 roles/sitewards.magento2
Include this in another ansible playbook. For sample, consider a generic server playbook:
---
# $PLAYBOOK_ROOT/server.yaml
- name: "server"
hosts: all
become: true
become_user: "root"
Add the reference for the role:
# $PLAYBOOK_ROOT/server.yaml
# ...
become_user: "root"
roles
- "sitewards.magento2"
This will allow the role to be discovered. That's it!
Configuration is defined in defaults/main.yml
. It must be configured before use.