Skip to content

DO-Solutions/ansible-nginx-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-nginx-backend

Configure nginx backends on DigitalOcean Droplets that are configured to listen on the private network (eth1)

Requirements

Be sure to place your content in a directory in the role's files/ directory.

Role Variables

The following dictionary can be set in either the defaults/main.yml or group_vars/group-name/vars.yml.

  • nginx_sync_files: Name of the directory holding your site's content.

  • example1: This is used as the configuration file name used by nginx in site-{available,enabled}.

  • doc_root: Location for your site's document root.

  • server_name: This will be what nginx uses to determine what server block to use.

    sites: example1: doc_root: /var/www/vhosts/example.com server_name: example.com

    nginx_sync_files: "example.com"

Example Playbook

ansible-galaxy install -r requirements.yml

Once it's installed in your roles directory, you can use the following in your playbook.

- hosts: web_node
  roles:
     - { role: ansible-nginx-backend }
  become: True

License

GPL-3.0

About

Configure nginx backends on a DigitalOcean Droplets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published