2 sudo tasks in one play, 1 succeeds, the other fails

15 views
Skip to first unread message

Martin van der Poel

unread,
Oct 18, 2014, 7:09:00 AM10/18/14
to ansible...@googlegroups.com
So, i'm creating a role to auto install megatools, but i'm having trouble using sudo in a specific command, got the task / playbook and sh output here: https://gist.github.com/mvdpoel/288ef389abc5329e3ebd

Just works:

- name: Ensure packages are installed (Debian Family).
  sudo: true
  apt: >
    name={{ item }}
    state=installed
  with_items: __required_packages
  when: ansible_os_family == 'Debian'

Does NOT work:

- name: "Make install"
  sudo: yes
  shell: "make install"
  args:
    chdir: "/home/{{ansible_ssh_user}}/{{ src_folder.stdout }}"



the apt module seems to do fine, but when i do make install it whines over permission denied :)
two tasks in the same book, no useful errors, no useful logs, nothing ;)


sooo, wtf :)


Dan Farrell

unread,
Oct 19, 2014, 10:08:00 AM10/19/14
to ansible...@googlegroups.com
Hi,

Have you tried using 'true' instead of 'yes' in the make install task?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e2521c4f-a211-4bd1-8902-638b89d0d38c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages