Sorry, it's old command. I've tried -s already. Same thing.

2014-12-04 22:08 GMT+03:00 James Cammarata <[email protected]>:

> I see you're using "-S", which is --su. You will want to use -s or --sudo
> instead.
>
> On Thu, Dec 4, 2014 at 1:00 PM, Paul Letskiy <[email protected]> wrote:
>
>> Thank you for your answer!
>>
>> Looks like sudo problems:
>>
>> "msg": "'/usr/bin/aptitude safe-upgrade' failed: E: Could not open lock
>> file /var/lib/dpkg/lock - open (13: Permission denied)\nE: Unable to lock
>> the administration directory (/var/lib/dpkg/), are you root?\n",
>>
>> But my user is sudo user with NOPASSWD. And I can do "apt-get update" or
>> "apt-get safe-upgrade" on server without any problems.
>>
>> 2014-12-04 21:10 GMT+03:00 James Cammarata <[email protected]>:
>>
>>> Hi Paul,
>>>
>>> Looking at your options you've not specified any action for apt to take
>>> beyond updating the cache (the only -a option you show is
>>> "update_cache=yes"), which itself should be an error. I believe you want to
>>> add "upgrade=safe", so please let us know if it still hangs after adding
>>> that.
>>>
>>>
>>> On Thu, Dec 4, 2014 at 10:37 AM, Paul Letskiy <[email protected]> wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm trying Ansible without playbooks. Just oneliner from console. Want
>>>> to do 'apt-get update' on remote server.
>>>>
>>>> Here is ansible.cfg:
>>>>
>>>> [defaults]
>>>> remote_port = 2224
>>>> remote_user = che
>>>> sudo_user = che
>>>>
>>>> Here is command:
>>>>
>>>> >ansible my.domain.com -vvvv -S -m apt -a update_cache=yes
>>>>
>>>> Che in sudo users on my.domain.com machine and can perform commands
>>>> without password.
>>>>
>>>> Here is command output:
>>>>
>>>> <my.domain.com> ESTABLISH CONNECTION FOR USER: che
>>>> <my.domain.com> REMOTE_MODULE apt update_cache=yes
>>>> <my.domain.com> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o
>>>> ControlPersist=60s -o ControlPath="/Users/che/.ansible/cp/ansible-
>>>>  ssh-%h-%p-%r" -o Port=2224 -o KbdInteractiveAuthentication=no -o
>>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased
>>>>  ,publickey -o PasswordAuthentication=no -o ConnectTimeout=10
>>>> my.domain.com /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1
>>>>  417710259.52-145934245462641 && chmod a+rx
>>>> $HOME/.ansible/tmp/ansible-tmp-1417710259.52-145934245462641 && echo
>>>> $HOME/.ansible/t    mp/ansible-tmp-1417710259.52-145934245462641'
>>>> <my.domain.com> PUT
>>>> /var/folders/5t/3h0pmhsj0m1_ry0kdwq9jg5h0000gn/T/tmpF2t29z TO
>>>> /home/che/.ansible/tmp/ansible-tmp-1417710259.    52-145934245462641/apt
>>>> <my.domain.com> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o
>>>> ControlPersist=60s -o ControlPath="/Users/che/.ansible/cp/ansible-
>>>>  ssh-%h-%p-%r" -o Port=2224 -o KbdInteractiveAuthentication=no -o
>>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased
>>>>  ,publickey -o PasswordAuthentication=no -o ConnectTimeout=10
>>>> my.domain.com /bin/sh -c 'su root -c "/bin/sh -c '"'"'echo SUDO-SUC
>>>>  CESS-mtfrixxottefdaxagqopjyeswrarmlxn; LANG=en_US.UTF-8
>>>> LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/che/.ansible/tmp/ansible-tmp-
>>>>  1417710259.52-145934245462641/apt; rm -rf
>>>> /home/che/.ansible/tmp/ansible-tmp-1417710259.52-145934245462641/
>>>> >/dev/null 2>&1'"'"'    "'
>>>>
>>>> And just get stuck. Is it normal, or I must find where is a problem?
>>>>
>>>> --
>>>> Best regards,
>>>> Pavel "Che" Letskiy
>>>>
>>>> --
>>>> 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/CALxmVWbvL3yi2RxDUv44MFT2wt-zu6jccmngPUexL0h0d8CNcw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/ansible-project/CALxmVWbvL3yi2RxDUv44MFT2wt-zu6jccmngPUexL0h0d8CNcw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> 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/CAMFyvFjg9vtXyceJ%2Bq1%2Bb5NbTivftTfd7U7bGKs1Evna3sf-ig%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAMFyvFjg9vtXyceJ%2Bq1%2Bb5NbTivftTfd7U7bGKs1Evna3sf-ig%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Best regards,
>> Pavel "Che" Letskiy
>>
>> --
>> 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/CALxmVWbjMdxwX9qxVYome1LR%3DegON8AhAZO5Pfew1s2k0OATvA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CALxmVWbjMdxwX9qxVYome1LR%3DegON8AhAZO5Pfew1s2k0OATvA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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/CAMFyvFi9zKGfs_jMQZGwLVGzwe2EaJQi0aUnNy6h_kwCfDumnQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAMFyvFi9zKGfs_jMQZGwLVGzwe2EaJQi0aUnNy6h_kwCfDumnQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
С уважением,
Павел "Che" Лецкий

-- 
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/CALxmVWZqjBaGRo4V--_kdHPp%2BS5%3DyR8Pq0JAntXq%2BX47u%2BhHxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to