An open API service indexing awesome lists of open source software.

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

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)