Been banging my head against this since yesterday, hoping someone is able 
to shed some insight on my issues.

I have a simple role that I'm trying to install java with:

---
- name: Install JDK
  yum:
    name: /tmp/jdk.rpm
    state: present


This works on my test servers without issue. I am trying to run this on a 
real server at this point and am running into issues with permissions.

My inventory file is basic:

[severs]
host1

and my playbook is as follows:
---
- name: Install JDK
  hosts: servers
  remote_user: myuser
  become: true
  become_user: myuser
  become_method: sudo
  become_flags: '-s /bin/sh'
  roles:
  - jdk

I've tried quite a few different combinations of setting the become_user to 
nobody, root, leaving it out, and so on, but have had no success. If I 
login to the server manually and run a sudo yum install /tmp/jdk as 
'myuser' it works fine, and the playbook will actually run after (stating 
there is nothing to change). Does anyone have any suggestions?

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/cff84da6-3154-4018-9ec2-278e734ff741%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to