diff --git a/scripts/playbook/host-standalone b/scripts/playbook/host-standalone index 293ff64d46367cd6538723bcfb557e7a29f8a37f..9ee0aa60706de3d471da5c6324b30003bd1567fc 100644 --- a/scripts/playbook/host-standalone +++ b/scripts/playbook/host-standalone @@ -1,2 +1,2 @@ [standalone] -10.41.160.164 \ No newline at end of file +1.1.1.1 \ No newline at end of file diff --git a/scripts/playbook/multi-machine.yml b/scripts/playbook/multi-machine.yml index 61499e9572312bc345ae80479efec800ab341c45..7f708bc8f9ae21f61c7fda2a0f958cd04bc63d23 100644 --- a/scripts/playbook/multi-machine.yml +++ b/scripts/playbook/multi-machine.yml @@ -32,8 +32,8 @@ password: '{{ mysql_password }}' priv: '*.*:ALL,GRANT' state: present -- name: install mysql for PilotGo platform - hosts: mysql +- name: install pserver PilotGo platform + hosts: pserver become: yes become_user: root diff --git a/scripts/playbook/roles/pserver/tasks/main,yml b/scripts/playbook/roles/pserver/tasks/main,yml index 901ef6507ec3eb5915ece0fa16649ca7ff59f78e..a8f9cf72dd3c18ff4f23515a53ed977a07b68ea3 100644 --- a/scripts/playbook/roles/pserver/tasks/main,yml +++ b/scripts/playbook/roles/pserver/tasks/main,yml @@ -10,11 +10,11 @@ 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 + shell: sed -i '/^http_server:/,+1 s/0\.0\.0\.0/{{ ansible_default_ipv4['address'] }}/' /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 + shell: sed -i '/^socket_server:/,+1 s/0\.0\.0\.0/{{ ansible_default_ipv4['address'] }}/' /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 + shell: sed -i '/^mysql:/,+1 s/localhost/{{ ansible_default_ipv4['address'] }}/' /opt/PilotGo/server/config_server.yaml - name: change passwd lineinfile: path: /opt/PilotGo/server/config_server.yaml @@ -22,7 +22,7 @@ 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 + shell: sed -i '/^redis:/,+1 s/localhost/{{ ansible_default_ipv4['address'] }}/' /opt/PilotGo/server/config_server.yaml - name: change passwd lineinfile: path: /opt/PilotGo/server/config_server.yaml diff --git a/scripts/playbook/roles/redis/tasks/main.yml b/scripts/playbook/roles/redis/tasks/main.yml index 939dbdd418b4a22e1c34a0fa2dbc266e754c6359..d15012391f2dde04c4de2d35cb405c1e0664e5e8 100644 --- a/scripts/playbook/roles/redis/tasks/main.yml +++ b/scripts/playbook/roles/redis/tasks/main.yml @@ -10,14 +10,14 @@ when: rpm_info.rc == 0 - name: install redis 6 through euler repo dnf: - name: redis6 + name: redis-6* state: present ignore_errors: yes - name: change bind lineinfile: path: /etc/redis/redis.conf regexp: '^#?bind' - line: 'bind {{ groups["standalone"][0] }}' + line: 'bind {{ ansible_default_ipv4['address'] }}' backrefs: yes - name: change daemonize lineinfile: