Nomad now responds to the basic nomad.nigel.local DNS name
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
- setup
|
||||
- name: Ensure nigel can use sudo without password
|
||||
become: true
|
||||
tags:
|
||||
- setup
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sudoers
|
||||
state: present
|
||||
@@ -20,4 +22,12 @@
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- nomad
|
||||
- nomad
|
||||
- name: Setup the reverse proxy outside of nomad
|
||||
tags: proxy
|
||||
ansible.builtin.include_tasks:
|
||||
file: reverse_proxy.yaml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- proxy
|
||||
29
ansible/roles/local-server-head/tasks/reverse_proxy.yaml
Normal file
29
ansible/roles/local-server-head/tasks/reverse_proxy.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
- name: Keep /etc/hosts up to date
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/hosts
|
||||
src: host-file
|
||||
mode: "0644"
|
||||
- name: Ensure nginx is setup as latest
|
||||
ansible.builtin.apt:
|
||||
name: nginx
|
||||
- name: Copy the nomad.conf to available configurations
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/nginx/sites-available/{{ item }}"
|
||||
mode: "0644"
|
||||
loop:
|
||||
- nomad.conf
|
||||
- sanity.conf
|
||||
- name: Link the nomad.conf to sites-enabled
|
||||
ansible.builtin.file:
|
||||
path: "/etc/nginx/sites-enabled/{{ item }}"
|
||||
state: link
|
||||
src: "/etc/nginx/sites-available/{{ item }}"
|
||||
mode: "0644"
|
||||
loop:
|
||||
- nomad.conf
|
||||
- sanity.conf
|
||||
- name: Restart nginx
|
||||
ansible.builtin.systemd_service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
Reference in New Issue
Block a user