Still I got an error message:

fatal: [mydomain.com]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "daemon_reload": false,
            "enabled": true,
            "masked": null,
            "name": "wildfly",
            "no_block": false,
            "state": "stopped",
            "user": false
        }
    },
    "msg": "Unable to enable service wildfly: Failed to execute operation: 
Interactive authentication required.\n"
}

W dniu poniedziałek, 30 października 2017 15:54:09 UTC+1 użytkownik Karn 
Kumar napisał:
>
> What if you use `service module just the sake for rather systemd..  pls 
> try below and see how it goes   
> it looks like a bug with systemd ..
>
> - name: start WildFly service
>   service:
>     name: WildFly
>     state: started
>     enabled: True
>
>
> On Monday, October 30, 2017 at 4:37:48 PM UTC+5:30, Dev wrote:
>>
>> Hello everyone,
>>
>> I'm using the following construction to start and stop wildfly service:
>>
>>
>> - hosts: appserver
>>   remote_user: jenkins
>>   tasks:
>>
>>   - name: Stop WildFly
>>     become: true
>>     become_user: wildfly
>>     become_method: sudo
>>     systemd:
>>       name: wildfly
>>       state: stopped
>>
>>   - name: Start WildFly
>>     become: true
>>     become_user: wildfly
>>     become_method: sudo
>>     systemd:
>>       name: wildfly
>>       state: started
>>
>>
>> But in every time and after many combinations I'm still geting an error 
>> message:
>>
>> Unable to stop service wildfly: Failed to stop wildfly.service: 
>> Interactive authentication required.
>>
>> Similar construction (without systemcmd module) works fine:
>>
>>
>>   - name: Stop WildFly
>>     command: sudo systemctl stop wildfly
>>     become: true
>>     become_user: wildfly
>>
>>
>> And I don't have any problems to switch to user wildfly using sudo, in 
>> the unix command line.
>>
>> Do you have any ideas what could be wrong?
>>
>> Ansible version: 2.3.2.0
>> Python version: 2.7.5
>> OS: RHEL 7.4
>>
>

-- 
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/6ea4bd18-58e6-425b-9a06-3edaae8efb61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to