added bacula-conf.py
configure and restart bacula-fd
This commit is contained in:
parent
284f7fbf25
commit
3ad8b29178
@ -7,7 +7,6 @@ import argparse
|
||||
parser = argparse.ArgumentParser(description='Process some integers.')
|
||||
parser.add_argument('-d', '--debug', dest='debug', action='store_true',
|
||||
help='debug: show what would be sent')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
hostname = socket.gethostname()
|
||||
@ -17,7 +16,6 @@ ip = socket.gethostbyname(hostname)
|
||||
|
||||
API_ENDPOINT = "http://192.168.0.140:5000/register"
|
||||
|
||||
|
||||
def get_ip():
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
try:
|
||||
@ -42,7 +40,7 @@ elif platform.system() == "Linux":
|
||||
else:
|
||||
raise ValueError
|
||||
|
||||
if not fqdn.endswith(".liebchen.fkp"):
|
||||
if not "." in fqdn:
|
||||
fqdn += ".liebchen.fkp"
|
||||
|
||||
data = {
|
||||
|
@ -41,11 +41,13 @@
|
||||
apt:
|
||||
name: bacula-fd
|
||||
default_release: jammy-proposed
|
||||
|
||||
- name: Install script for bacula-fd configuration
|
||||
copy:
|
||||
src: bacula-conf.py
|
||||
dest: /usr/local/bin/bacula-conf.py
|
||||
mode: 0700
|
||||
|
||||
- name: run configuration for bacula-fd
|
||||
command: /usr/local/bin/bacula-conf.py
|
||||
- name: Restart service bacula-fd
|
||||
|
Loading…
Reference in New Issue
Block a user