Selaa lähdekoodia

updated

master
erin sims 2 vuotta sitten
vanhempi
commit
8191a5b95d
5 muutettua tiedostoa jossa 66 lisäystä ja 49 poistoa
  1. +31
    -41
      hosts
  2. +5
    -5
      playbooks/create_droplet.yml
  3. +3
    -3
      playbooks/delete_droplet.yml
  4. +21
    -0
      playbooks/mpdf.conf.j2
  5. +6
    -0
      playbooks/mpdf.yaml

+ 31
- 41
hosts Näytä tiedosto

@@ -2,10 +2,8 @@ athena ansible_host=167.71.188.165
Zeus ansible_host=68.183.50.72
Hades ansible_host=104.131.0.100
Atreyu ansible_host=159.65.178.119
nyc3-mpdf1 ansible_host=138.197.103.140
nyc3-mpdf2 ansible_host=165.227.113.33
nyc3-mpdb1 ansible_host=167.99.48.86
nyc3-mpdb2 ansible_host=104.248.7.84
mpdf1 ansible_host=167.99.123.56
mpdb1 ansible_host=143.198.21.87

[ams1]

@@ -28,10 +26,8 @@ athena
Zeus
Hades
Atreyu
nyc3-mpdf1
nyc3-mpdf2
nyc3-mpdb1
nyc3-mpdb2
mpdf1
mpdb1

[sfo1]

@@ -43,65 +39,59 @@ nyc3-mpdb2

[tor1]

[synapse]
athena

[prometheus]
athena

[Git]
Zeus

[nextcloud]
[Saltmaster]
Zeus

[mpdb]
nyc3-mpdb1
nyc3-mpdb2
mpdb1

[matrix]
athena

[salt_minion]
athena
Zeus

[ansible]
[synapse]
athena
Atreyu
nyc3-mpdf1
nyc3-mpdf2
nyc3-mpdb1
nyc3-mpdb2

[mpdf]
nyc3-mpdf1
nyc3-mpdf2

[consul]
athena
Hades

[prometheus]
athena

[Git]
Zeus

[www_apache]
Zeus

[controller]
Atreyu
[mpdf]
mpdf1

[Saltmaster]
[salt_minion]
athena
Zeus

[salt_minon]
Hades

[controller]
Atreyu

[alertmanager]
athena

[ansible]
athena
Atreyu
mpdf1
mpdb1

[nextcloud]
Zeus

[Thrace_Test]
nyc3-mpdb2
nyc3-mpdb1
nyc3-mpdf2
nyc3-mpdf1
mpdb1
mpdf1
Atreyu
Hades
Zeus


+ 5
- 5
playbooks/create_droplet.yml Näytä tiedosto

@@ -5,7 +5,7 @@
vars:
mpdf:
- 'nyc3-mpdf'
count: 5
count: 1
mpdb:
- 'nyc3-mpdb'
tasks:
@@ -15,7 +15,7 @@
region: nyc3
image: debian-11-x64
wait_timeout: 100
name: "mpdb{{ item }}"
name: "mpdf{{ item }}"
size_id: s-1vcpu-1gb
state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
@@ -24,7 +24,7 @@
- 'ansible'
- 'mpdf'
register: created_droplets
loop: "{{ range(1,count+1)|list }}"
loop: "{{ range(1,count| int + 1) }}"

- name: create backend droplets
digital_ocean_droplet:
@@ -32,7 +32,7 @@
region: nyc3
image: debian-11-x64
wait_timeout: 100
name: "mpdf{{ item }}"
name: "mpdb{{ item }}"
size_id: s-1vcpu-1gb
state: present
oauth_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
@@ -41,5 +41,5 @@
- 'ansible'
- 'mpdb'
register: created_droplets
loop: "{{ range(1,count+1)|list }}"
loop: "{{ range(1,count|int + 1) }}"

+ 3
- 3
playbooks/delete_droplet.yml Näytä tiedosto

@@ -5,7 +5,7 @@
vars:
mpdf:
- 'nyc3-mpdf'
count: 5
count: 1
mpdb:
- 'nyc3-mpdb'
tasks:
@@ -24,7 +24,7 @@
- 'ansible'
- 'mpdf'
register: deleted_droplets
loop: "{{ range(1,count+1)|list }}"
loop: "{{ range(1,count|int + 1) }}"

- name: delete backend droplets
digital_ocean_droplet:
@@ -41,5 +41,5 @@
- 'ansible'
- 'mpdb'
register: deleted_droplets
loop: "{{ range(1,count+1)|list }}"
loop: "{{ range(1,count|int + 1) }}"

+ 21
- 0
playbooks/mpdf.conf.j2 Näytä tiedosto

@@ -0,0 +1,21 @@
[Default]
hostname="{{ hostname }}"
name="{{ default }}"
password="{{ password }}"
portnumber="{{ port }}"
useauth=" {{ use_auth }}"
music directory="{{ music_directory }}"
db update time="12345678901"
[]
[Remote]
hostname="{{ server_ip_remote }}"
name="{{ server_name_remote }}"
password="{{ password_remote }}"
portnumber="{{ port_numberi_remote }}"
useauth="{{ use_auth_remote }}"
music directory= "{{ music_directory_remote }}"
db update time="12345678901"
[]




+ 6
- 0
playbooks/mpdf.yaml Näytä tiedosto

@@ -6,3 +6,9 @@
apt:
name: mpd
state: present
- name: setup config on hosts
template:
src: mpdf.conf.j2
dest: /etc/mpd.conf
notify:
- restart mpd

Ladataan…
Peruuta
Tallenna