diff --git a/docs/install_guide.md b/docs/install_guide.md index 5d1118425c540a07d13775b7f51888e41f639936..58ad154004493553f845f179c1785e22d3674205 100644 --- a/docs/install_guide.md +++ b/docs/install_guide.md @@ -68,4 +68,4 @@ file:输出到path下的指定文件。 ```bash # agent端启动 $ ./agent & -``` \ No newline at end of file +``` diff --git a/scripts/playbook/group_vars/all b/scripts/playbook/group_vars/all new file mode 100644 index 0000000000000000000000000000000000000000..31374876de37dcdc0a909aba92cc5811345769ad --- /dev/null +++ b/scripts/playbook/group_vars/all @@ -0,0 +1,2 @@ +--- +redis_password: "PilotGo13579!" \ No newline at end of file diff --git a/scripts/playbook/host-standalone b/scripts/playbook/host-standalone new file mode 100644 index 0000000000000000000000000000000000000000..9ee0aa60706de3d471da5c6324b30003bd1567fc --- /dev/null +++ b/scripts/playbook/host-standalone @@ -0,0 +1,2 @@ +[standalone] +1.1.1.1 \ No newline at end of file diff --git a/scripts/playbook/install_PilotGo.yaml b/scripts/playbook/install_PilotGo.yaml new file mode 100644 index 0000000000000000000000000000000000000000..34cdbb318fe9455c4e8cb3e5d7722f669897eb47 --- /dev/null +++ b/scripts/playbook/install_PilotGo.yaml @@ -0,0 +1,32 @@ +--- +- name: install PilotGo platform + hosts: standalone + become: yes + become_user: root + tasks: + - name: check redis rpm + shell: rpm -qa | grep -e 'redis*4*' + register: rpm_info + ignore_errors: yes + - name: uninstall redis4 + dnf: + name: redis + state: absent + when: rpm_info.rc == 0 + - name: install redis 6 through euler repo + dnf: + name: redis6 + state: present + ignore_errors: yes + - name: change redis.conf + shell: sed -i 's#bind 0.0.0.0#bind {{ groups['standalone'][0] }}#g' /etc/redis/redis.conf + - name: change passwd + lineinfile: + path: /etc/redis/redis.conf + regexp: '^#?requirepass' + line: 'requirepass {{ redis_password }}' + backrefs: yes + - name: restart redis service + service: + name: redis + state: restarted \ No newline at end of file