Ich habe ein Vagrant vm (Ubuntu) erstellt und Ansible installiert. Ich kann meinen localhost anpingen, das bedeutet zu meinem vm. Ich habe ein Playbook geschrieben, um nodejs zu installieren.Installieren von nodejs über Ansible playbook
---
- hosts: node #it contains localhost
gather_facts: no
tasks:
- name: install node.js
shell: apt-get install nodejs
sudo: yes
Wenn ich das Playbook den Status zeigen Erfolg zeigen. Nach meinem Verständnis sollte es nodejs und auch npm in meinem vm installieren. Wenn ich jedoch node -v
eintippe, wird angezeigt, dass es noch nicht installiert ist.
[email protected]:/vagrant_data$ ansible-playbook ping.yml
PLAY [node] *******************************************************************
TASK: [install node.js] *******************************************************
changed: [localhost]
PLAY RECAP ********************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
[email protected]:/vagrant_data$ node -v
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
Ask your administrator to install one of them
Was mache ich hier falsch?