Git Product home page Git Product logo

ansible-role-craft's Introduction

ansible-role-craft

This role quickly setup a Craft CMS project. It download and install all dependencies for related project.

Ansible Galaxy

Requirements

This role requires Ansible 2.3.

Install

ansible-galaxy install plumelo.craft

Role Variables

The variables that can be passed to this role and a brief description about them are as follows. (For all variables, take a look at defaults/main.yml)

# prerequisites for clone, build, unzip, permissions, memory cache
craft_pkgs:
  - git
  - build-essential
  - zip
  - unzip
  - acl
  - memcached
# project name, craft user
craft_name: project_name
craft_user: '{{ craft_name }}'
# install php
craft_php_packages:
  - php7.1-fpm
  - php-mysql
  - php-mcrypt
  - php-mbstring
  - php-memcached
  - php-curl
  - php-gd
  - php-zip
  - php-readline
# configure php-fpm
_craft_fpm_settings:
  name: '{{ craft_name }}'
  listen: '/var/run/fpm.{{ craft_name }}.socket'
  user: '{{ craft_user }}'
  group: '{{ craft_user }}'
  listen.owner: www-data
  listen.group: www-data
  chdir: /
# install and configure mysql
craft_mysql_install: true
craft_db_name: '{{ craft_name }}'
craft_db_user: '{{ craft_name }}'
craft_db_pass: '{{ craft_db_user }}'
craft_db_path:
# install and configure nginx
craft_nginx_install: true
_craft_nginx_site:
  template: 'craft.conf.j2'
  server_name: '{{ craft_name }}.local'

craft_nginx_site: {}
craft_nginx_sites:
  '{{ craft_name }}': '{{ _craft_nginx_site| combine(craft_nginx_site) }}'

Examples

- hosts: all
  vars:
    - craft_name: project_name
    - craft_path: /srv
    - craft_user: admin
    - craft_repo: [email protected]:project/project.git
    - craft_db_name: '{{ craft_name }}'
    - craft_db_user: '{{ craft_name }}'
    - craft_db_pass: '{{ craft_db_user }}'
  roles:
    - role: plumelo.craft

Dependencies

roles:
  - nbz4live.php-fpm
  - megheaiulian.mysql
  - jdauphant.nginx
  - plumelo.nginx_src

Licence

BSD

Author Information

plumelo.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.