fansible/ansible-provisioning-tywin

Version '4.2.3' for nodejs was not found

Closed this issue · 4 comments

Commands:

$ python ~/tywin/generate.py
NodeJs project detected...
What's the name of the project? (Default:tuto-js)
Do you need ubuntu-mysql[y/N] ?
Do you need ubuntu-postgresql[y/N] ?
Do you need ubuntu-mongodb[y/N] ?
The role ubuntu-apt has been added to the provisioning
The role create-www-data-user has been added to the provisioning
The role nodejs has been added to the provisioning
The role ubuntu-nodejs-nginx has been added to the provisioning
The provisioning has been generated. Check out the `devops` directory

[...]

$ ansible-playbook -i devops/provisioning/hosts/vagrant devops/provisioning/playbook.yml

PLAY [Provisioning tuto-js] ***************************************************

GATHERING FACTS ***************************************************************
ok: [10.0.0.10]

TASK: [ubuntu-apt | Update the apt cache.] ************************************
ok: [10.0.0.10]

TASK: [ubuntu-apt | Install dependencies.] ************************************
ok: [10.0.0.10] => (item=python-apt,aptitude)

TASK: [ubuntu-apt | Install repositories.] ************************************
skipping: [10.0.0.10]

TASK: [ubuntu-apt | Remove repositories.] *************************************
skipping: [10.0.0.10]

TASK: [ubuntu-apt | Upgrade all packages.] ************************************
ok: [10.0.0.10]

TASK: [ubuntu-apt | Install packages.] ****************************************
changed: [10.0.0.10] => (item=git)

TASK: [ubuntu-apt | Remove packages.] *****************************************
skipping: [10.0.0.10]

TASK: [create-www-data-user | update www-data shell] **************************
changed: [10.0.0.10]

TASK: [create-www-data-user | set correct permissions for ssh dir] ************
changed: [10.0.0.10]

TASK: [nodejs | Install dependencies] *****************************************
ok: [10.0.0.10]

TASK: [nodejs | Add APT key] **************************************************
changed: [10.0.0.10]

TASK: [nodejs | Add APT repository] *******************************************
changed: [10.0.0.10] => (item=deb https://deb.nodesource.com/node_4.x trusty main)
changed: [10.0.0.10] => (item=deb-src https://deb.nodesource.com/node_4.x trusty main)

TASK: [nodejs | Install nodejs] ***********************************************
failed: [10.0.0.10] => {"failed": true}
stderr: E: Version '4.2.3*' for 'nodejs' was not found

stdout: Reading package lists...
Building dependency tree...
Reading state information...

**msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'nodejs=4.2.3*'' failed: E: Version '4.2.3*' for 'nodejs' was not found**


FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/flavianh/playbook.retry

10.0.0.10                  : ok=10   changed=5    unreachable=0    failed=1

My command history:

  666  python ~/tywin/generate.py
  667  vagrant up
  668  xclip -sel clip < ~/.ssh/id_rsa_vagrant.pub
  669  vagrant ssh
  670  ssh 10.0.0.10
  671  ssh-keygen -f "/home/flavianh/.ssh/known_hosts" -R 10.0.0.10
  672  ssh 10.0.0.10
  673  ssh vagrant@10.0.0.10

Ansible version: 1.9.5 (yup, I downgraded)

  • Tried to update roles/nodejs content's with the newest code from https://github.com/Stouts/Stouts.nodejs.
  • Tried to modify /home/flavianh/tywin/roles_files/nodejs/defaults/main.yml with the new values from Stouts.nodejs. The new file is:
---

nodejs_enabled: yes                       # The role is enabled
nodejs_version: 5.9.0
nodejs_major_version: 5.x                 # This will determine the repo from nodejs.org used
nodejs_install: pkg                       # Install nodejs from packages, sources or binary
                                          # (pkg|src|bin)

nodejs_npm_modules: []                    # List modules which will be installed

nodejs_home: /usr/lib/nodejs              # The directory where nodejs will be installed
nodejs_src_url: "http://nodejs.org/dist/v{{nodejs_version}}/node-v{{nodejs_version}}.tar.gz"
nodejs_bin_url: "http://nodejs.org/dist/v{{nodejs_version}}/node-v{{nodejs_version}}-{{ansible_system|lower}}-x{{ansible_userspace_bits|replace('32', '86')}}.tar.gz"

No change in the playbook result:

TASK: [nodejs | Install nodejs] ***********************************************
failed: [10.0.0.10] => {"failed": true}
stderr: E: Version '5.9.0*' for 'nodejs' was not found

stdout: Reading package lists...
Building dependency tree...
Reading state information...

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'nodejs=5.9.0*'' failed: E: Version '5.9.0*' for 'nodejs' was not found


FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/flavianh/playbook.retry

10.0.0.10                  : ok=10   changed=0    unreachable=0    failed=1

@traxair I see you are in Paris. If you want we can meet to work on it ?

@traxair Have you succeed to install the nodeJs you are looking for manually ?

It's a problem with the role https://github.com/Stouts/Stouts.nodejs.

You have found here that the right version to use is 4.4.0 for ubuntu trusty.
If you see something better to do please tell me :)