diff --git a/scripts/playbook/install_PilotGo.yaml b/scripts/playbook/install_PilotGo.yaml index 2f383b0cab7d0444c8b0771b48b66c72364db3e0..70ac89ada89ebb1796fb0b4f7778f5c7ed6f408d 100644 --- a/scripts/playbook/install_PilotGo.yaml +++ b/scripts/playbook/install_PilotGo.yaml @@ -7,36 +7,6 @@ roles: - redis - mysql - - tasks: - - name: install pilotgo-server - dnf: - name: PilotGo-server - state: present - register: pilotgo_info - ignore_errors: yes - - name: exit when pilotgo-server fail install - fail: - msg: 'dnf install PilotGo-server failed' - when: pilotgo_info.rc != 0 - - name: change PilotGo config - shell: sed -i '/^http_server:/,+1 s/0\.0\.0\.0/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml - - name: change PilotGo config - shell: sed -i '/^socket_server:/,+1 s/0\.0\.0\.0/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml - - name: change PilotGo config - shell: sed -i '/^mysql:/,+1 s/localhost/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml - - name: change passwd - lineinfile: - path: /opt/PilotGo/server/config_server.yaml - regexp: '^#?password' - line: ' password: {{ mysql_password }}' - backrefs: yes - - name: change PilotGo config - shell: sed -i '/^redis:/,+1 s/localhost/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml - - name: change passwd - lineinfile: - path: /opt/PilotGo/server/config_server.yaml - regexp: '^#?redis_pwd' - line: ' redis_pwd: {{ redis_password }}' - backrefs: yes + - pserver + \ No newline at end of file diff --git a/scripts/playbook/roles/pserver/tasks/main,yml b/scripts/playbook/roles/pserver/tasks/main,yml new file mode 100644 index 0000000000000000000000000000000000000000..901ef6507ec3eb5915ece0fa16649ca7ff59f78e --- /dev/null +++ b/scripts/playbook/roles/pserver/tasks/main,yml @@ -0,0 +1,31 @@ +--- +- name: install pilotgo-server + dnf: + name: PilotGo-server + state: present + register: pilotgo_info + ignore_errors: yes +- name: exit when pilotgo-server fail install + fail: + msg: 'dnf install PilotGo-server failed' + when: pilotgo_info.rc != 0 +- name: change PilotGo config + shell: sed -i '/^http_server:/,+1 s/0\.0\.0\.0/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml +- name: change PilotGo config + shell: sed -i '/^socket_server:/,+1 s/0\.0\.0\.0/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml +- name: change PilotGo config + shell: sed -i '/^mysql:/,+1 s/localhost/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml +- name: change passwd + lineinfile: + path: /opt/PilotGo/server/config_server.yaml + regexp: '^#?password' + line: ' password: {{ mysql_password }}' + backrefs: yes +- name: change PilotGo config + shell: sed -i '/^redis:/,+1 s/localhost/{{ groups['standalone'][0] }}/' /opt/PilotGo/server/config_server.yaml +- name: change passwd + lineinfile: + path: /opt/PilotGo/server/config_server.yaml + regexp: '^#?redis_pwd' + line: ' redis_pwd: {{ redis_password }}' + backrefs: yes \ No newline at end of file