Browse Source

updated

master
erin sims 2 years ago
parent
commit
8191a5b95d
5 changed files with 66 additions and 49 deletions
  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 View File

@@ -2,10 +2,8 @@ athena ansible_host=167.71.188.165
Zeus ansible_host=68.183.50.72 Zeus ansible_host=68.183.50.72
Hades ansible_host=104.131.0.100 Hades ansible_host=104.131.0.100
Atreyu ansible_host=159.65.178.119 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] [ams1]


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


[sfo1] [sfo1]


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


[tor1] [tor1]


[synapse]
athena

[prometheus]
athena

[Git]
Zeus

[nextcloud]
[Saltmaster]
Zeus Zeus


[mpdb] [mpdb]
nyc3-mpdb1
nyc3-mpdb2
mpdb1


[matrix] [matrix]
athena athena


[salt_minion]
athena
Zeus

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

[mpdf]
nyc3-mpdf1
nyc3-mpdf2


[consul] [consul]
athena athena
Hades Hades


[prometheus]
athena

[Git]
Zeus

[www_apache] [www_apache]
Zeus Zeus


[controller]
Atreyu
[mpdf]
mpdf1


[Saltmaster]
[salt_minion]
athena
Zeus Zeus


[salt_minon] [salt_minon]
Hades Hades


[controller]
Atreyu

[alertmanager] [alertmanager]
athena athena


[ansible]
athena
Atreyu
mpdf1
mpdb1

[nextcloud]
Zeus

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


+ 5
- 5
playbooks/create_droplet.yml View File

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


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

+ 3
- 3
playbooks/delete_droplet.yml View File

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


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

+ 21
- 0
playbooks/mpdf.conf.j2 View File

@@ -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 View File

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

Loading…
Cancel
Save