diff --git a/ansible/roles/cluster-build/tasks/main.yaml b/ansible/roles/cluster-build/tasks/main.yaml index ce7be945baea5e28129258c945deb1c63ce0db44..36a1f34b2fd2ca5f08b54123275d1476090ad460 100644 --- a/ansible/roles/cluster-build/tasks/main.yaml +++ b/ansible/roles/cluster-build/tasks/main.yaml @@ -27,7 +27,7 @@ script: ./templates/install.sh register: build -- debug: var=build.stdout_lines +# - debug: var=build.stdout_lines # - debug: var=ansible_default_ipv4.address @@ -47,8 +47,11 @@ # - name: Reboot machine # become: yes # reboot: -# reboot_timeout: 3000 +# reboot_timeout: 3000MGVjNGJjYTU2ZmZmZGQx + - name: Reboot CouchDB script: ./templates/reboot.sh '{{ ansible_default_ipv4.address }}' + register: reboot +- debug: var=reboot.stdout_lines \ No newline at end of file diff --git a/ansible/roles/cluster-build/templates/reboot.sh b/ansible/roles/cluster-build/templates/reboot.sh index 1690415342d52d7ccfa8dd71d3e5276e81777a1d..b5d37449ee555c5e65a1ddfb96a850ed2ca06c9d 100644 --- a/ansible/roles/cluster-build/templates/reboot.sh +++ b/ansible/roles/cluster-build/templates/reboot.sh @@ -2,8 +2,9 @@ # declare -a conts=(`sudo docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n1 -d'\n'`) export node="$1" -echo "== Stop the containers: ==" -sudo docker stop couchdb${node} +sudo docker restart couchdb${node} +# echo "== Stop the containers: ==" +# sudo docker stop couchdb${node} -echo "== Start the containers (and wait a bit while they boot): ==" -sudo docker start couchdb${node} \ No newline at end of file +# echo "== Start the containers (and wait a bit while they boot): ==" +# sudo docker start couchdb${node} \ No newline at end of file diff --git a/ansible/roles/cluster-build/templates/run.sh b/ansible/roles/cluster-build/templates/run.sh index c78908825569c2d370966696140a7d9894b1bd05..c2aae402daa529c8e41af606b131bdc93b6a029e 100644 --- a/ansible/roles/cluster-build/templates/run.sh +++ b/ansible/roles/cluster-build/templates/run.sh @@ -50,7 +50,7 @@ echo "cd /opt/couchdb/etc/;echo ${NOOENAME} >> vm.args" sudo docker exec -u root -it couchdb${node} /bin/sh -c "export node=${node}; cd /opt/couchdb/etc/;echo -name couchdb@${node} >> vm.args;exit" sudo docker exec -u root -it couchdb${node} /bin/sh -c "export cookie=${cookie};cd /opt/couchdb/etc/;echo -setcookie ${cookie} >> vm.args;exit" # sudo docker exec -u root -it couchdb${node} /bin/sh -c "export flag=${flag};cd /opt/couchdb/etc/;echo ${flag} >> vm.args;exit" -sudo docker exec -u root -it couchdb${node} /bin/sh -c "cd /opt/couchdb/etc/;sed -it 's/max 9110/max 9200/g' vm.args;exit" +sudo docker exec -u root -it couchdb${node} /bin/sh -c "cd /opt/couchdb/etc/;sed -it 's/max 9100/max 9200/g' vm.args;exit" # for cont in "${conts[@]}"; do sudo docker exec -u root -it ${cont} bash edit-vm.sh; done #sudo docker exec -it couchdb bash