aadl.docker-nginx-alpine
docker-nginx-alpine
This Ansible role helps you manage and run the Alpine Nginx Docker container.
It is based on marvinpinto/ansible-role-docker-nginx but has been updated for newer versions of Ansible (greater than 2.1) and is designed to use the Alpine Nginx image.
Requirements
To use this role, you need to have a relatively recent version of docker-py
and docker
installed, as it relies on Ansible's docker module.
Examples
To install this module from Ansible Galaxy, run the following command in the './roles' directory:
ansible-galaxy install aadl.docker-nginx-alpine -p ./roles
To use it in your playbook, you can do it like this, provided that you have Docker set up:
- hosts: 'servers'
roles:
- role: 'aadl.docker-nginx-alpine'
become: yes
nginx_conf: |
user root;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}
Check out the defaults/main.yml file for role variables that you can change! If you need a playbook to install Docker itself, you can refer to the marvinpinto.docker Galaxy role.
License
Author Information
- Marvin Pinto
- Ryan Eby
Informazioni sul progetto
Ansible role to manage and run the alpine nginx docker container.
Installa
ansible-galaxy install aadl.docker-nginx-alpine
Licenza
mit
Download
161
Proprietario