Sign inSign up

hpierce/docker-ansible-project

By hpierce

Updated almost 10 years ago

Solution to problem using ansible-server and client.

Image
0

1.1K

hpierce/docker-ansible-project repository overview

docker-ansible-project

Build a LEMP server on Ubuntu 16.04 using Ansible

The following technologies were used:

  • Ansible
  • Nginx
  • MySQL
  • PHP 7.0
Clone this repository
# git clone [email protected]:hpierce/docker-ansible-project.git
# cd docker-ansible-project
Run an ansible client in the background

It is bare bones Ubuntu 16.04 It will be a web application so use port 8080

# docker run -d -p 8080:80 hpierce/docker-ansible-client
Get the ip of the ansible client with get_ip.sh
# ./get_ip.sh

It should be 172.17.0.2, unless you already have something running.

Build and run the ansible server

This uses hpierce/docker-ansible-server as the base

# docker build -t ansible .
# docker run -h ansible -it ansible /bin/bash
root@ansible:/# 
Install LEMP on client using ansible server

If the ip of the client is 172.17.0.2 then you can run this

root@ansible:/# ansible-playbook /root/lemp.yml
Otherwise use that ip address on the command line

Example 172.17.0.3

root@ansible:/# ansible-playbook /root/lemp.yml -i 172.17.0.3,

Tag summary

Content type

Image

Digest

Size

274.8 MB

Last updated

almost 10 years ago

docker pull hpierce/docker-ansible-project