Apt install with ansible -


i use ansible scripts set environment (ubuntu) in amazon ec2 , vagrant box. try set same environment @ germanvps (ubuntu minimal). installing packages apt doesn't seem work.

i run

ansible-playbook -i ansible/live -u priidu ansible/caselaw.yml -s -vvvv --start-at-task="install" 

which gives following error.

failed: [master] => (item=postgresql-9.4,postgresql-contrib-9.4,postgresql-server-dev-9.4,python-psycopg2) => {"failed": true, "item": "postgresql-9.4,postgresql-contrib-9.4,postgresql-server-dev-9.4,python-psycopg2"} stderr: e: dpkg interrupted, must manually run 'sudo dpkg --configure -a' correct problem.   msg: '/usr/bin/apt-get -y -o "dpkg::options::=--force-confdef" -o "dpkg::options::=--force-confold"   install 'postgresql-server-dev-9.4' 'python-psycopg2'' failed: e: dpkg interrupted, must manually run 'sudo dpkg --configure -a' correct problem.    fatal: hosts have failed -- aborting 

then try

ansible-playbook -i ansible/live -u priidu ansible/caselaw.yml -s -vvvv --start-at-task="dpkg configure" 

and following error message

failed: [master] => (item=postgresql-9.4,postgresql-contrib-9.4,postgresql-server-dev-9.4,python-psycopg2) => {"failed": true, "item": "postgresql-9.4,postgresql-contrib-9.4,postgresql-server-dev-9.4,python-psycopg2", "parsed": false} become-success-grensagvuewehoylwpjytnkzpwwqgsre killed openssh_6.2p2, osslshim 0.9.8r 8 dec 2011 debug1: reading configuration data /users/priidukull/.ssh/config debug1: reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 51: applying options * debug1: auto-mux: trying existing master debug2: fd 3 setting o_nonblock debug2: mux_client_hello_exchange: master version 4 debug3: mux_client_forwards: request forwardings: 0 local, 0 remote debug3: mux_client_request_session: entering debug3: mux_client_request_alive: entering debug3: mux_client_request_alive: done pid = 54431 debug3: mux_client_request_session: session request sent debug1: mux_client_request_session: master session id: 2 debug3: mux_client_read_packet: read header failed: broken pipe debug2: received exit status master 0 shared connection <<hostname>> closed.   fatal: hosts have failed -- aborting 

what going on there , how can start solving puzzle?

edit: relevant part of playbook

- name: dpkg configure   shell: dpkg --configure -a  - name: install   apt: name={{ item }} update_cache=yes   with_items:     - postgresql-9.4     - postgresql-contrib-9.4     - postgresql-server-dev-9.4     - python-psycopg2 

edit 2: added playbook commands.

edit 3: issue vanished when increased ram 64mb 512mb.

i met issue when try install docker via ansible-playbook.

i'v try increase ram 512mb 1024mb. didn't work.

and found solution below:

delete files in /var/lib/dpkg/updates , try again !!

anyway works me!


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -