{"action":"created","issue":{"url":"https://api.github.com/repos/geerlingguy/ansible-role-nodejs/issues/10","labels_url":"https://api.github.com/repos/geerlingguy/ansible-role-nodejs/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/geerlingguy/ansible-role-nodejs/issues/10/comments","events_url":"https://api.github.com/repos/geerlingguy/ansible-role-nodejs/issues/10/events","html_url":"https://github.com/geerlingguy/ansible-role-nodejs/issues/10","id":111942432,"number":10,"title":"node version assertion and apt-get syntax are conflicting","user":{"login":"wyaeld","id":157392,"avatar_url":"https://avatars.githubusercontent.com/u/157392?v=3","gravatar_id":"","url":"https://api.github.com/users/wyaeld","html_url":"https://github.com/wyaeld","followers_url":"https://api.github.com/users/wyaeld/followers","following_url":"https://api.github.com/users/wyaeld/following{/other_user}","gists_url":"https://api.github.com/users/wyaeld/gists{/gist_id}","starred_url":"https://api.github.com/users/wyaeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyaeld/subscriptions","organizations_url":"https://api.github.com/users/wyaeld/orgs","repos_url":"https://api.github.com/users/wyaeld/repos","events_url":"https://api.github.com/users/wyaeld/events{/privacy}","received_events_url":"https://api.github.com/users/wyaeld/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-17T03:55:24Z","updated_at":"2015-11-16T09:14:19Z","closed_at":"2015-11-11T18:37:36Z","body":"Runs into problem when trying to install 4.2\r\n\r\ntasks assert that the version is 4.x\r\nThis causes the apt-get command to become\r\n`apt-get install 4.x.*` which is a version that the nodesource debian packages actually have.\r\n\r\n4 would work.  Becomes 4.*, apt end up with 4.2.1\r\n4.2 also works.\r\n\r\nHowever 4 or 4.2 fail the assertion since its not in the form 4.x\r\n\r\nAdditional complication though that the nodesource repos still need to be 4.x\r\n\r\nI'm currently working around this by introducing a `nodesource_version=4.x` variable along with the `nodejs_version=4.2`, but open to ideas if you see a better way."},"comment":{"url":"https://api.github.com/repos/geerlingguy/ansible-role-nodejs/issues/comments/156961974","html_url":"https://github.com/geerlingguy/ansible-role-nodejs/issues/10#issuecomment-156961974","issue_url":"https://api.github.com/repos/geerlingguy/ansible-role-nodejs/issues/10","id":156961974,"user":{"login":"martypitt","id":348852,"avatar_url":"https://avatars.githubusercontent.com/u/348852?v=3","gravatar_id":"","url":"https://api.github.com/users/martypitt","html_url":"https://github.com/martypitt","followers_url":"https://api.github.com/users/martypitt/followers","following_url":"https://api.github.com/users/martypitt/following{/other_user}","gists_url":"https://api.github.com/users/martypitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martypitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martypitt/subscriptions","organizations_url":"https://api.github.com/users/martypitt/orgs","repos_url":"https://api.github.com/users/martypitt/repos","events_url":"https://api.github.com/users/martypitt/events{/privacy}","received_events_url":"https://api.github.com/users/martypitt/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T09:14:19Z","updated_at":"2015-11-16T09:14:19Z","body":"This continues to fail for me:\r\n\r\n```\r\nTASK: [geerlingguy.nodejs | Add Nodesource repositories for Node.js.] *********\r\nskipping: [default]\r\n\r\nTASK: [geerlingguy.nodejs | Ensure Node.js and npm are installed.] ************\r\nskipping: [default]\r\n\r\nTASK: [geerlingguy.nodejs | Configure Debian repo version.] *******************\r\nok: [default]\r\n\r\nTASK: [geerlingguy.nodejs | Add Nodesource apt key.] **************************\r\nok: [default]\r\n\r\nTASK: [geerlingguy.nodejs | Add NodeSource repositories for Node.js.] *********\r\nok: [default] => (item=deb https://deb.nodesource.com/node_4.x trusty main)\r\nok: [default] => (item=deb-src https://deb.nodesource.com/node_4.x trusty main)\r\n\r\nTASK: [geerlingguy.nodejs | Ensure Node.js and npm are installed.] ************\r\nfailed: [default] => {\"failed\": true}\r\nstderr: E: Version '4.x*' for 'nodejs' was not found\r\n\r\nstdout: Reading package lists...\r\nBuilding dependency tree...\r\nReading state information...\r\n\r\nmsg: '/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"   install 'nodejs=4.x*'' failed: E: Version '4.x*' for 'nodejs' was not found\r\n\r\n\r\nFATAL: all hosts have already failed -- aborting\r\n\r\nPLAY RECAP ********************************************************************\r\n           to retry, use: --limit @/Users/martin.pitt/playbook.retry\r\n\r\ndefault                    : ok=14   changed=2    unreachable=0    failed=1\r\n\r\nAnsible failed to complete successfully. Any error output should be\r\nvisible above. Please fix these errors and try again.\r\n```\r\n\r\n"}}