Skip to content

"msg": "You need to be root to perform this command.\n" #2

@jringoot

Description

@jringoot

Just a tiny remark: When you have the above, mostly one will want/need to use another user than root, at least to access the system.
Instead of using -u root one may prefer to add --sudo, so that the non-root ansible user will try to execute the command using sudo.
eg:
ansible ws01 -m yum -a 'pkg=vim-enhanced state=installed' -i hosts -u remadmin --sudo

Where remadmin is a user that can do keybased ssh to the system ws01 and is a nopasswd sudoer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions