ansible: install bacula-fd
authorKristof Provost <kp@FreeBSD.org>
Sun, 28 Apr 2024 21:16:11 +0000 (23:16 +0200)
committerKristof Provost <kp@FreeBSD.org>
Sun, 28 Apr 2024 21:16:11 +0000 (23:16 +0200)
ansible/roles/router/tasks/bacula-fd.yaml [new file with mode: 0644]
ansible/roles/router/tasks/main.yaml
ansible/roles/router/templates/bacula/bacula-fd-iapetus.saturn.sigsegv.be.conf [new file with mode: 0644]

diff --git a/ansible/roles/router/tasks/bacula-fd.yaml b/ansible/roles/router/tasks/bacula-fd.yaml
new file mode 100644 (file)
index 0000000..fdde5c5
--- /dev/null
@@ -0,0 +1,46 @@
+- name: Install bacula
+  community.general.pkgng:
+    name: bacula15-client
+    state: present
+  become: true
+- name: Install bacula-fd.conf
+  template:
+    src: "bacula/bacula-fd-{{ hostname }}.conf"
+    dest: "/usr/local/etc/bacula/bacula-fd.conf"
+    owner: root
+    group: wheel
+    mode: 0600
+  become: true
+- name: Install CA cert
+  template:
+    src: "cacerts/sigsegv.be.pem"
+    dest: "/usr/local/etc/bacula/sigsegv.be.pem"
+    owner: root
+    group: bacula
+    mode: 0644
+  become: true
+- name: Install host certificate
+  template:
+    src: "certs/{{ hostname }}.pem"
+    dest: "/usr/local/etc/bacula/{{ hostname }}.pem"
+    owner: root
+    group: bacula
+    mode: 0644
+  become: true
+- name: Install host private key
+  template:
+    src: "private/{{ hostname }}.key"
+    dest: "/usr/local/etc/bacula/{{ hostname }}.key"
+    owner: root
+    group: bacula
+    mode: 0640
+  become: true
+- name: bacula-fd enable
+  community.general.sysrc:
+    name: bacula_fd_enable
+    value: "YES"
+- name: Start bacula-fd
+  ansible.builtin.service:
+    name: bacula-fd
+    state: started
+  become: true
index 7d9f3f2..03abcb8 100644 (file)
@@ -32,3 +32,6 @@
   import_tasks: ipsec.yaml
 - name: dynamic dns
   import_tasks: dyndns.yaml
+- name: bacula-fd
+  import_tasks: bacula-fd.yaml
+
diff --git a/ansible/roles/router/templates/bacula/bacula-fd-iapetus.saturn.sigsegv.be.conf b/ansible/roles/router/templates/bacula/bacula-fd-iapetus.saturn.sigsegv.be.conf
new file mode 100644 (file)
index 0000000..cda5a11
--- /dev/null
@@ -0,0 +1,67 @@
+$ANSIBLE_VAULT;1.1;AES256
+39626439356363646461323839383336323938373561636365313138363963656666366430356562
+6237303930353832323730663437623332656539396531300a663464363838373334663962373039
+38343466353563393962303330663337336361363135316335346432636631643038666363616630
+3264633836663838340a353330363936386133633730356236333966666331323566336133623133
+33353761636263623365303031633936303864623937393062363164636639383262653835343239
+66313732303462643339353361396165393739656134633231306265323634306161363166353135
+32353466613633613162333262626363666335343330613933303434633766326364333962393465
+38393465363637656332663737386338643564326264373761386532376532383235636530393464
+31383532393863663665306438356565346566643734623837663066363265353239383261363361
+65396436326361353165616261333564346534663766393839643336313665383063323439353833
+31303864353036353632663464626231393632663033343661316131313064633864393664323261
+33373733626539623963613761333433613065633636376565646432653836353561346631616162
+37626439336539626437376538303439326534343334356430396430323365643833303461613639
+61336337626631383536383861373031343832393034633662393433636434323461666531326431
+30353866653862356635326532373262356534323161623835623236623731333234303538616135
+35383462366637613235616365636165626666643930643766326632346362626662373761393632
+36383039333537623562353366323066353031316131386332323331656239303630663539386236
+36303565656631656332313230643834316532366232386632386363623631626630636230643439
+61383439313837343162633234663530333231356166396636356237616266663131306532636530
+37333565643937356435323331366131626533646662613561646232643435373033343562393466
+38616262333237373832633630643030396262303164653561393738326433653236353132646333
+62353861326261636464653237383366383436383132306335633631623136383064356363353332
+62393034356331373538393363303436323262633234316139386530323133633437666464313934
+38633933306633633136646531336165396636396463643538626331343764353034326539376433
+38356463333165323937363361663833333732383933646238376162666132353438303364393632
+34393630386561623635633732373063623836323432373462643238666461396136643234323162
+31306137343436343931353332613332656634636265643666653337643139633762643331633235
+37623631646434303339383637303132623666363336666233616130363365316461343133643837
+37633932663763383839326565383061313830653864313234656461373231316137316566393938
+65383038316661323534633931333363376261316437623838363661366538323237643662373035
+65653239333637633839383561343465353161396364373463323265633564366437326635643838
+65643235653963613835396336393638366464666333396363303233323837353065623335653938
+63353334383366323465313734326466323436386530623333623334326462333638316133393264
+38333830646262633733623530653564383665623939323161313639376666313631313561666134
+34643130353164373362323638376561373966666437393662383063373937313033356163343965
+37623061663338653435616637373261633866376136663334306336316532333961313165633965
+61643761393034396465306633633036323665353732626565343631306365343137326162666330
+31363430356130613136306164363364613964333935623837336565316563316663393966316463
+36343262353630396137333735356566356235306366613064336362326132336564613931663761
+61393736616136386363663639636462613661376461386163353732633063303930373465353164
+39663136393466376262626263376137376234666164323063376636356662323466326430663431
+61666163313565633531383830323462646461663539303466333364316662326331306137363438
+62396437313061346662653665613437656164633437343333656433616431633061396632366336
+39366462396261343632333563326633646537313334663230353866383362333134323662643433
+65343630393965333839373331613161386132303733313030323362386161303235626566303763
+66303831633732326462396665646237383963383935393965393139313066353539636131636632
+32663238623636396562353832346564653932323939323130316531373163663532626232623538
+35336435623733396134666464343334323765396539646335643663646130623161663731623234
+37313036633761626135393464636665373630303862333761643734643836313537383438636638
+39656631373965653264323531393961343930633732646632313766313434363839313438363939
+66343139623666313031353236366138383336623962353539636231323839353466316463376663
+32666239383265353565396365643962343538333134626432313762663663326230323065353833
+32363934356264663930643939643538373664363966623530323461636139623738663031653136
+61323465343232353362303563353262663462386663656237643762343331653564613163353961
+38343338623966303134613233663166313963386461663536346434393461333434353338306138
+66353732333964393836633731666437636461393261636662343165383136633839653163613935
+33306536666331313732323163313133616334616437623861333639613638613161333532636362
+66323461626330636134333965383439373039373366343632613934663833643636346235326362
+35313962393062626138633965323465323266646639373261303435643637643438376661333965
+34653039666264623937323138316430376265313963393361313538666262373030626565643530
+64376430336232383934386161303630643937646134333631626665636335333065313137333261
+33353361363136663466633435363163633039393439303837326266656665363163313636643563
+38623062363233336566316162393464356237613234616634363733363463633064313734393130
+65313438333362333064346366303761613635316330643739333530316239653966616234653465
+34336332313230313763353561353132313964356363663232353737346331313235376137346133
+6331383530633665303435363666396339363766346636636534