diff --git a/infra/static-vultr/ansible/.gitignore b/infra/static-vultr/ansible/.gitignore new file mode 100644 index 0000000..3c2e90b --- /dev/null +++ b/infra/static-vultr/ansible/.gitignore @@ -0,0 +1,2 @@ +inventory.ini +known_hosts diff --git a/infra/static-vultr/ansible/files/temper.tv b/infra/static-vultr/ansible/files/temper.tv.conf similarity index 100% rename from infra/static-vultr/ansible/files/temper.tv rename to infra/static-vultr/ansible/files/temper.tv.conf diff --git a/infra/static-vultr/ansible/static-host-setup.yml b/infra/static-vultr/ansible/static-host-setup.yml new file mode 100644 index 0000000..3d9eb2b --- /dev/null +++ b/infra/static-vultr/ansible/static-host-setup.yml @@ -0,0 +1,7 @@ +# This playbook basically guarantees that the host is in a production ready state +--- +- hosts: webhost + remote_user: root + tasks: + - name: Setup nginx + import_tasks: tasks/nginx-setup.yml diff --git a/infra/static-vultr/ansible/tasks/nginx-setup.yml b/infra/static-vultr/ansible/tasks/nginx-setup.yml index 922ccdd..9c2fcbb 100644 --- a/infra/static-vultr/ansible/tasks/nginx-setup.yml +++ b/infra/static-vultr/ansible/tasks/nginx-setup.yml @@ -17,18 +17,18 @@ src: "files/{{ item }}" dest: /etc/nginx/sites-available/ loop: - - shockrah.xyz - - resume.shockrah.xyz - - temper.tv + - shockrah.xyz.conf + - resume.shockrah.xyz.conf + - temper.tv.conf - name: Enable the site configs with sym links file: src: "/etc/nginx/sites-available/{{ item }}" dest: "/etc/nginx/sites-enabled/{{ item }}" state: link loop: - - shockrah.xyz - - resume.shockrah.xyz - - temper.tv + - shockrah.xyz.conf + - resume.shockrah.xyz.conf + - temper.tv.conf - name: Restart nginx conf to pick up new config changes service: name: nginx