From 671e34aee7798fe1212ae4132c17c93b6535d0bf Mon Sep 17 00:00:00 2001 From: erin sims Date: Tue, 7 Jun 2022 00:20:42 +0000 Subject: [PATCH] updated mpd files --- hosts | 50 +++++++++++++++++++++--------------- playbooks/create_droplet.yml | 2 +- playbooks/delete_droplet.yml | 2 +- playbooks/mpdb.conf | 27 ------------------- playbooks/mpdb.conf.j2 | 11 ++++++++ playbooks/mpdb.yaml | 10 +++++++- playbooks/mpdf.conf | 38 --------------------------- playbooks/mpdf.conf.j2 | 26 +++++-------------- playbooks/mpdf.yaml | 4 ++- 9 files changed, 61 insertions(+), 109 deletions(-) delete mode 100644 playbooks/mpdb.conf create mode 100644 playbooks/mpdb.conf.j2 delete mode 100644 playbooks/mpdf.conf diff --git a/hosts b/hosts index 0d7f181..67e2d2a 100644 --- a/hosts +++ b/hosts @@ -2,8 +2,10 @@ 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 -mpdf1 ansible_host=167.99.123.56 -mpdb1 ansible_host=143.198.21.87 +mpdf1 ansible_host=157.245.126.201 +mpdf2 ansible_host=68.183.151.54 +mpdb1 ansible_host=157.245.116.105 +mpdb2 ansible_host=159.65.241.29 [ams1] @@ -27,7 +29,9 @@ Zeus Hades Atreyu mpdf1 +mpdf2 mpdb1 +mpdb2 [sfo1] @@ -39,11 +43,22 @@ mpdb1 [tor1] -[Saltmaster] +[Git] +Zeus + +[www_apache] Zeus +[controller] +Atreyu + +[mpdf] +mpdf1 +mpdf2 + [mpdb] mpdb1 +mpdb2 [matrix] athena @@ -51,31 +66,19 @@ athena [synapse] athena -[consul] -athena -Hades - -[prometheus] +[salt_minion] athena - -[Git] Zeus -[www_apache] +[Saltmaster] Zeus -[mpdf] -mpdf1 - -[salt_minion] +[consul] athena -Zeus - -[salt_minon] Hades -[controller] -Atreyu +[prometheus] +athena [alertmanager] athena @@ -84,13 +87,20 @@ athena athena Atreyu mpdf1 +mpdf2 mpdb1 +mpdb2 [nextcloud] Zeus +[salt_minon] +Hades + [Thrace_Test] +mpdb2 mpdb1 +mpdf2 mpdf1 Atreyu Hades diff --git a/playbooks/create_droplet.yml b/playbooks/create_droplet.yml index 481509d..aff3cdb 100644 --- a/playbooks/create_droplet.yml +++ b/playbooks/create_droplet.yml @@ -5,7 +5,7 @@ vars: mpdf: - 'nyc3-mpdf' - count: 1 + count: 2 mpdb: - 'nyc3-mpdb' tasks: diff --git a/playbooks/delete_droplet.yml b/playbooks/delete_droplet.yml index 5280fba..b96efa1 100644 --- a/playbooks/delete_droplet.yml +++ b/playbooks/delete_droplet.yml @@ -5,7 +5,7 @@ vars: mpdf: - 'nyc3-mpdf' - count: 1 + count: 3 mpdb: - 'nyc3-mpdb' tasks: diff --git a/playbooks/mpdb.conf b/playbooks/mpdb.conf deleted file mode 100644 index de886c5..0000000 --- a/playbooks/mpdb.conf +++ /dev/null @@ -1,27 +0,0 @@ -Server side /etc/mpd.conf: - - -audio_output { - -type "httpd" name "My HTTP Stream" - -encoder "vorbis" # optional, vorbis or lame - -port "8000" # - -bind_to_address "your-server-IP-addr-here" # optional, IPv4 or IPv6 - -quality "5.0" # do not define if bitrate is d$ - -always_on "yes" - -tags "yes" - -format "44100:16:1" - -max_clients "0" # optional 0=no limit - -} - - - diff --git a/playbooks/mpdb.conf.j2 b/playbooks/mpdb.conf.j2 new file mode 100644 index 0000000..155b8ce --- /dev/null +++ b/playbooks/mpdb.conf.j2 @@ -0,0 +1,11 @@ +hostname "{{ server_ip_remote }}" +name "{{ server_name_remote }}" +password "{{ password_remote }}" +portnumber {{ port_numberi_remote }}" +useauth "{{ use_auth_remote }}" +music_directory "{{ music_directory_remote }}" + +database { + plugin "proxy" + host "fileserver.local" +} diff --git a/playbooks/mpdb.yaml b/playbooks/mpdb.yaml index 4bf2edd..f0423bc 100644 --- a/playbooks/mpdb.yaml +++ b/playbooks/mpdb.yaml @@ -2,7 +2,15 @@ gather_facts: false vars: tasks: - - name: Install mpd on hosts + - name: Install mpdb on hosts apt: name: mpd state: present + - name: setup config on hosts + template: + src: mpdf.conf.j2 + dest: /etc/mpd.conf + owner: root + group: root + notify: + - restart mpd diff --git a/playbooks/mpdf.conf b/playbooks/mpdf.conf deleted file mode 100644 index 306de16..0000000 --- a/playbooks/mpdf.conf +++ /dev/null @@ -1,38 +0,0 @@ -[Default] - -hostname="localhost" - -name="Default" - -password="" - -portnumber="6600" - -useauth="0" - -music directory="" - -db update time="12345678901" - -[] - -[Remote] - -hostname="your-server-IP-addr-here" - -name="Remote" - -password="" - -portnumber="8000" - -useauth="0" - -music directory="" - -db update time="12345678901" - -[] - - - diff --git a/playbooks/mpdf.conf.j2 b/playbooks/mpdf.conf.j2 index 0efd142..d7e8647 100644 --- a/playbooks/mpdf.conf.j2 +++ b/playbooks/mpdf.conf.j2 @@ -1,21 +1,7 @@ -[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" -[] - - +hostname "{{ hostname }}" +name "{{ default }}" +password "{{ password }}" +portnumber "{{ port }}" +useauth "{{ use_auth }}" +music directory "{{ music_directory }}" diff --git a/playbooks/mpdf.yaml b/playbooks/mpdf.yaml index ae46a7c..8006d79 100644 --- a/playbooks/mpdf.yaml +++ b/playbooks/mpdf.yaml @@ -2,7 +2,7 @@ gather_facts: false vars: tasks: - - name: Install mpd on hosts + - name: Install mpdf on hosts apt: name: mpd state: present @@ -10,5 +10,7 @@ template: src: mpdf.conf.j2 dest: /etc/mpd.conf + owner: root + group: root notify: - restart mpd