mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
Add frontend role and applications playbook
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Set up domain
|
||||||
|
hosts: frontend
|
||||||
|
remote_user: "{{ ssh_user }}"
|
||||||
|
roles:
|
||||||
|
- frontend
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[frontend]
|
||||||
|
user.uber.space ansible_python_interpreter=/usr/bin/python
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- name: List domains
|
||||||
|
ansible.builtin.command: uberspace web domain list
|
||||||
|
changed_when: false
|
||||||
|
register: domains
|
||||||
|
- name: Set up domain
|
||||||
|
when: domains.stdout.find(frontend_domain) == -1
|
||||||
|
block:
|
||||||
|
- name: Add domain
|
||||||
|
ansible.builtin.command: uberspace web domain add {{ frontend_domain }}
|
||||||
|
register: new_domain
|
||||||
|
changed_when: true
|
||||||
|
- name: Print out important information
|
||||||
|
changed_when: false
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ new_domain.stdout }}"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Set up domains
|
||||||
|
ansible.builtin.import_tasks: domains.yaml
|
||||||
Reference in New Issue
Block a user