https://github.com/escalopa/ansible-apahce-site-deployer
Apache2 site deploy with Ansible
https://github.com/escalopa/ansible-apahce-site-deployer
ansible ansible-playbook apache2
Last synced: 25 days ago
JSON representation
Apache2 site deploy with Ansible
- Host: GitHub
- URL: https://github.com/escalopa/ansible-apahce-site-deployer
- Owner: escalopa
- Created: 2022-11-11T22:56:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-13T16:50:33.000Z (over 3 years ago)
- Last Synced: 2025-01-19T15:20:48.565Z (over 1 year ago)
- Topics: ansible, ansible-playbook, apache2
- Language: Jinja
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible-apahce-site-deployer
Auto deploy site with ansible
## Deploy your site
### Install ansible (Ubuntu)
If you have a different distribution than `ubuntu` then refer to the ansible installation documentation [here](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
```shell
curl "https://raw.githubusercontent.com/escalopa/script-installer/main/scripts/ansible.sh" | bash
```
### Git clone repo & CD in
```
git clone https://github.com/escalopa/ansible-apahce-site-deployer.git && cd ansible-apahce-site-deployer
```
### Copy your server private key
Replace `KEY_NAME` with the name of your private key or change the whole path if your key is in different location
```
cp ~/.ssh/KEY_NAME ./credentials/ansible
```
### Set hostname in yaml files
- Change hostname in `hosts.yaml` to the ip address of your host (Or the name bound to the ip address)
- Change hostname in `deployer.yaml` exactly under the line `hosts` to the ip address of your host (Or the name bound to the ip address)
### Run playbook
Now we are ready to go, run the playbook with
```shell
ansible-playbook deployer.yaml
```
---
**Useful links about ansible**
[ansible-apt](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_module.html)
[ansible-file](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html)
[ansible-unarchive](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html)
[ansible-template](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html)