All Projects → andywimmer → ansible-grav

andywimmer / ansible-grav

Licence: MIT license
Ansible playbook to install NGINX, PHP7-FPM and Grav CMS

Projects that are alternatives of or similar to ansible-grav

grav-plugin-advanced-pagecache
Grav AdvancedPageCache Plugin
Stars: ✭ 19 (+58.33%)
Mutual labels:  grav
grav-plugin-langswitcher
Grav LangSwitcher Plugin
Stars: ✭ 22 (+83.33%)
Mutual labels:  grav
openwrt-configuration-ansible
OpenWrt configuration for router + dumb access points with Ansible playbook for centralised management
Stars: ✭ 31 (+158.33%)
Mutual labels:  ansible-playbook
arch-ansible
An Ansible playbook to install Arch Linux
Stars: ✭ 33 (+175%)
Mutual labels:  ansible-playbook
lynis-ansible
Ansible snippets and code for Lynis
Stars: ✭ 38 (+216.67%)
Mutual labels:  ansible-playbook
snipcart-gatsby-grav
Grav as Headless CMS Tied to Gatsby with GraphQL Schema
Stars: ✭ 27 (+125%)
Mutual labels:  grav
grav-skeleton-gravcart
The Grav Shopping Cart skeleton
Stars: ✭ 11 (-8.33%)
Mutual labels:  grav
action-ansible-playbook
⚙️ A GitHub Action for running Ansible playbooks
Stars: ✭ 133 (+1008.33%)
Mutual labels:  ansible-playbook
fedora-workstation
An opinionated playbook for setting up a Fedora Workstation.
Stars: ✭ 35 (+191.67%)
Mutual labels:  ansible-playbook
grav-plugin-mathjax
This plugin allows you to include math formulas in your web pages, either using TeX and LaTeX notation, and/or as MathML.
Stars: ✭ 18 (+50%)
Mutual labels:  grav
keycloak-kubernetes
Keycloak deployment into Kubernetes cluster
Stars: ✭ 25 (+108.33%)
Mutual labels:  ansible-playbook
ansible-playbook-examples
Ansible playbook samples using Rest API calls for Pure Storage products
Stars: ✭ 25 (+108.33%)
Mutual labels:  ansible-playbook
ansible
The Deep Security Agent is easy to deploy automatically in any environment
Stars: ✭ 26 (+116.67%)
Mutual labels:  ansible-playbook
grav-plugin-external-links
This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client.
Stars: ✭ 15 (+25%)
Mutual labels:  grav
grav-plugin-api
A REST API plugin for GravCMS
Stars: ✭ 24 (+100%)
Mutual labels:  grav
grav-plugin-comments
Grav Comments Plugin
Stars: ✭ 52 (+333.33%)
Mutual labels:  grav
grav-skeleton-open-publishing-space
Leverage a fast version-controlled workflow using the editor of your choice in the creation, sharing and collaborative editing of Markdown-based Grav site content. Includes Admin Panel and Git Sync.
Stars: ✭ 17 (+41.67%)
Mutual labels:  grav
ansible-taskrunner
Ansible Taskrunner - ansible-playbook wrapper with YAML-abstracted python click cli options!
Stars: ✭ 14 (+16.67%)
Mutual labels:  ansible-playbook
grav-theme-boxify
"Boxify" is a Grav port of One Page Website Template by Peter Finlan for Codrops
Stars: ✭ 17 (+41.67%)
Mutual labels:  grav
swiss-army
Ansible-driven configuration management for maintaining a preferred environment (base system and app dotfiles / configurations)
Stars: ✭ 44 (+266.67%)
Mutual labels:  ansible-playbook

Ansible Grav

This playbook installs NGINX, PHP7 and Grav. It also installs required and recommended PHP modules and tweaks php.ini and NGINX configs based on Grav recommendations. These configs come from what appear in the Grav documentation.

Master branch will install Grav Admin 'Vanilla' single page site. If you would like to experiment with the Gantry 5 Helium Skeleton site, you will need to clone that branch instead. Instructions are below.

The latest versions of Amazon Linux, CentOS, Debian, Fedora and Ubuntu are currently supported, though there are a few inconsistencies in the configuration (specific PHP7 version, inclusion of YAML parser, etc). Check the QA section for an up-to-date distro/host compatibility matrix. If you don't care what distro you run I would recommend Ubuntu 16.04/16.04.2 at this time.

Pre-installation

Install Ansible on your host or 'control' machine per the instructions

  • macOS: $ sudo easy_install pip && sudo pip install ansible

Usage

Clone repo

Two branches are available:

  • Master will install Grav Admin 'Vanilla' single-page site
  • Gantry will install Grav Gantry 5 Helium Skeleton site

Grav Admin 'Vanilla'

  1. $ cd /your/dev/folder

  2. $ git clone https://github.com/andywimmer/ansible-grav.git && cd ansible-grav

Grav Gantry 5 Helium Skeleton

  1. $ cd /your/dev/folder

  2. $ git clone -b gantry https://github.com/andywimmer/ansible-grav.git && cd ansible-grav

Modify hosts file

[prod]
server-ip domain= ansible_python_interpreter=/usr/bin/python3
  1. Change server-ip to target IP

  2. Add FQDN after domain= such as:

    • domain=yourdomain.com

    • or

    • domain=subdomain.example.xyz

    • do not include the 'www'

Note that some targets (like Ubuntu) ship with Python3 only, so the hosts file must contain the parameter ansible_python_interpreter=/usr/bin/python3

Modify ansible.cfg file

[defaults]
inventory=hosts
stdout_callback=skippy
remote_user=root
private_key_file=/path/to/.ssh/key_rsa
  1. Change remote_user if necessary

  2. Change private_key_file accordingly

Test Ansible target connection

  1. $ cd /path/to/ansible-grav

  2. $ ansible -m ping all

Should result in:

XX.XX.XX.XX | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

Run playbook

  • $ ansible-playbook provisions.yml

Post-installation

  1. Navigate to FQDN or IP.

  2. Grav Admin will prompt you to create an admin user. Fill out the form and continue to the dashboard.

  3. The dashboard my display purple bar(s) indicating update(s) to Grav and/or Plugins are available. Ensure Grav update is applied before attempting to update Plugins via Dashboard > Plugins > Update All Plugins.

  4. Navigate to Configuration > System > Caching section and set Cache driver to APCu.

  5. Use your browser to navigate to your FQDN or IP address to view the default Grav welcome page.

  6. Get Grav'n!

Grav notes

  • Fully explore the Configuration tabs and hover over the option title to display a bit more info on that setting.

  • Enabling Markdown extra in Configuration > System > Markdown section is recommended.

  • Caching is critical and Grav flushes caches upon system changes, so you will probably never want to disable caching - however the setting is there in Configuration > System > Caching.

  • If you aren't developing a custom theme for Grav or otherwise modifying the CSS or JS, you should enable those two pipelines under the Configuration > System > Assets section.

  • The Configuration > Site tab is where you may specify a site title, author name & email address, custom taxonomies, etc.

  • The Configuration > Info tab serves as a phpinfo();

Caveats

This playbook does not create any users or lock down your sshd_config by disabling root login or password authentication - all of which are recommended if using for production.

This playbook deletes /var/www/html prior to installing Grav. For a fresh VPS you're probably fine with that - but you know, warning anyway. Also /var/www/html is the default webroot regardless of the standard distribution defaults. This will likely change.

This playbook does not install Grav with SSL enabled in the NGINX site. Read the documentation for more information on enabling SSL with an origin certificate.

QA

I have a deep QA background and test heavily before pushing commits. If you find a bug please file a ticket in the issue tracker and I will investigate 🤓

The following matrix outlines current distro/host compatibility for this playbook. Click s to view the ticket in the issue tracker. Version numbers displayed come from the host's UI.

These are the only hosts I have accounts with currently - they seem like popular ones. If you run this playbook on a different host/distro combination with success or failure, please let me know in the issue tracker, or send me a referral to said host so I can verify.

AWS DigitalOcean Google Cloud Vultr
Amazon Linux 2017.03.1
CentOS '7'
CentOS 7.3.1611
Debian '8'
Debian 8.8
Debian 9.0
Fedora 25
Ubuntu 16.04
Ubuntu 16.04.2
Ubuntu 16.10
Ubuntu 17.04
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].