Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhojpatrick/ansible-example-apache
Example Apache Web Server project using Vagrant/VirtualBox to demonstrate how to use Ansible to configure a basic Apache Web Server.
https://github.com/nhojpatrick/ansible-example-apache
ansible vagrant virtualbox
Last synced: about 1 month ago
JSON representation
Example Apache Web Server project using Vagrant/VirtualBox to demonstrate how to use Ansible to configure a basic Apache Web Server.
- Host: GitHub
- URL: https://github.com/nhojpatrick/ansible-example-apache
- Owner: nhojpatrick
- License: mit
- Created: 2020-04-29T11:08:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-16T18:24:19.000Z (about 4 years ago)
- Last Synced: 2024-10-14T11:36:53.521Z (2 months ago)
- Topics: ansible, vagrant, virtualbox
- Language: HTML
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Ansible Example of Apache
## Requirements
* Vagrant v2.2.7 (may work with any v2.x)
* VirtualBox v6.1.6 (may work with any v6.x)## Tested Combinations
The following have been tested, other combinations might work;
- Vagrant v2.2.7 + VirtualBox v6.1.6 + CentOS 7
## Quick Start
Simple as, ` vagrant up`, and a new vm will be created, with 3 websites hosted.
You will need to and the following lines in your host/local hosts file.
```
127.0.0.1 alpha.example.tld
127.0.0.1 bravo.example.tld
```Then in your browser visit any of these url's.
- http://localhost:8181/index.html
- http://alpha.example.tld:8181/index.html
- http://bravo.example.tld:8181/index.htmlThe source for these is under the `www` directory and is copied into the vm when the ansible playbook runs. So live update do not currently work.
## Notes
The files `setup_*.yaml` are used as a work around to install the latest version of ansible, including git so that ansible galaxy can install from github.
This setup uses a patch version of the ansible galaxy role 'geerlingguy.apache'. The patch means only tasks that require `become`, instead of running the whole galaxy role with `become`.
- Patched Version https://github.com/nhojpatrick/geerlingguy_ansible-role-apache/tree/setup-needs-become
- Origional Version https://github.com/geerlingguy/ansible-role-apache