From 729277e1cfffe0bfe10596fa1838f73d24f40747 Mon Sep 17 00:00:00 2001 From: lijia Date: Wed, 17 Jun 2020 14:42:27 +0800 Subject: 恢复部署houyi.service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/active_defence/files/service/houyi.service | 12 ++++++++++++ roles/active_defence/tasks/main.yml | 8 ++++---- xxg_env/hosts.xxg | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 roles/active_defence/files/service/houyi.service diff --git a/roles/active_defence/files/service/houyi.service b/roles/active_defence/files/service/houyi.service new file mode 100644 index 0000000..1563b89 --- /dev/null +++ b/roles/active_defence/files/service/houyi.service @@ -0,0 +1,12 @@ +[Unit] +Description=houyi service +Wants=network-online.target + +[Service] +WorkingDirectory=/opt/houyi/bin +ExecStart=/opt/houyi/bin/houyi +Restart=always +RestartSec=5s + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/roles/active_defence/tasks/main.yml b/roles/active_defence/tasks/main.yml index 124e661..02e5333 100644 --- a/roles/active_defence/tasks/main.yml +++ b/roles/active_defence/tasks/main.yml @@ -158,10 +158,10 @@ dest: /opt/houyi/bin/houyi_etc/maat_test.json tags: template -#- name: "copy houyi.service to destination server" -# synchronize: -# src: "{{ role_path }}/files/service/houyi.service" -# dest: "/usr/lib/systemd/system" +- name: "copy houyi.service to destination server" + synchronize: + src: "{{ role_path }}/files/service/houyi.service" + dest: "/usr/lib/systemd/system" #- name: "copy sapp.service to destination server" # synchronize: diff --git a/xxg_env/hosts.xxg b/xxg_env/hosts.xxg index d1efbf8..d7d4ff7 100644 --- a/xxg_env/hosts.xxg +++ b/xxg_env/hosts.xxg @@ -1,9 +1,9 @@ [all:vars] ansible_user=root -install_sapp=true +install_sapp=false [active_defence] -192.168.40.133 +192.168.40.85 [tsg-all:children] active_defence -- cgit v1.2.3