Trying to install a program from ansible playbook on vagrant but ends up failing

0 votes

I'm using vagrant with an ansible playbook that installs a few programs on an Ubuntu image. But one of the program keeps failing:

Vagrant file:

config.vm.provision :ansible do |ansible|
  ansible.verbose = "vvv"
  ansible.playbook = "provisioning/playbook.yml"
end

Console output:

ASK: [Install vim] *********************************************************** 
failed: [default] => {"failed": true}
...
Jan 13 in Ansible by rajni
36 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Rajni, you can register the variable aptout and then print it.

- hosts: localhost
  sudo: true
  tasks:
    - name: get vi
      apt: state=latest name=vim
      register: aptout

        - debug: var=aptout
answered Jan 13 by Mike
What does aptout do?

Related Questions In Ansible

0 votes
1 answer

unable to build grails war on a vagrant machine using ansible

Try and run the command using shell ...READ MORE

answered Jul 2, 2018 in Ansible by ajs3033
• 7,120 points
48 views
0 votes
1 answer

Hey I'm trying to execute a playbook but I get the following error:

Hey, you have a syntax error as ...READ MORE

answered Mar 26 in Ansible by Kalgi
• 36,690 points
13 views
0 votes
1 answer

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 13, 2018 in Ansible by DareDev
• 6,710 points
106 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.