浏览代码

Initial commit

Sven Velt 7 年之前
当前提交
fb06fdadb3
共有 2 个文件被更改,包括 32 次插入0 次删除
  1. 13 0
      files/rc.local
  2. 19 0
      tasks/main.yml

+ 13 - 0
files/rc.local

@@ -0,0 +1,13 @@
+#!/bin/sh -e
+#
+# rc.local -- Added for compatibility with systemd
+#
+# Enable with:
+#
+# $ systemctl unmask rc-local
+# $ systemctl enable rc-local
+# $ systemctl start rc-local
+#
+
+exit 0
+

+ 19 - 0
tasks/main.yml

@@ -0,0 +1,19 @@
+---
+- name: Copy /etc/rc.local if not exists
+  copy:
+    src: rc.local
+    dest: /etc/rc.local
+    owner: root
+    group: root
+    mode: "0755"
+    force: no
+    backup: yes
+  register: rclocalcreated
+
+
+- name: Enable rc-local
+  service:
+    name: rc-local
+    enabled: yes
+    state: restarted
+