diff options
| author | lijia <[email protected]> | 2020-06-17 14:42:27 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2020-06-17 14:42:27 +0800 |
| commit | 729277e1cfffe0bfe10596fa1838f73d24f40747 (patch) | |
| tree | f61b01d9102a620c23b81628699f604e9b143266 | |
| parent | 6af65a219f87a52eb4d3a24e0813e15b50600963 (diff) | |
恢复部署houyi.service
| -rw-r--r-- | roles/active_defence/files/service/houyi.service | 12 | ||||
| -rw-r--r-- | roles/active_defence/tasks/main.yml | 8 | ||||
| -rw-r--r-- | xxg_env/hosts.xxg | 4 |
3 files changed, 18 insertions, 6 deletions
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 |
