Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-08 Thread Vamsi krishna
Hi vincent,

mee to facing the same issue...
changing the tmp directory means, what you mean??

you mean to change that in our hosts 

can u explain litttle bit clear...

On Friday, July 19, 2013 at 9:30:53 AM UTC-7, Vincent Hardion wrote:
>
> I have just pull the last version but it is the same behaviour.
>
> ~/projects/cfg-maxlab-ansible/etc/ansible% ansible-playbook --version
> ansible-playbook 1.3 (devel f4b1e426ea) last updated 2013/07/19 18:08:52 
> (GMT +200)
>
> TASK: [ensure NTP point out to the ntp server] * 
> failed: [computerA.se] => {"failed": true, "item": ""}
> msg: Could not replace file: 
> /home/xxx/.ansible/tmp/ansible-1374250532.29-44727094344629/source to 
> /etc/ntp.conf: [Errno 13] Permission denied: 
> '/home/xxx/.ansible/tmp/ansible-1374250532.29-44727094344629/source'
>
>
> By changing the temp directory it works.
>
> Thank you Michael and Brian.
>
> Vincent
>
>
> On Fri, Jul 19, 2013 at 5:54 PM, Michael DeHaan  > wrote:
>
>> But yes, Brian is correct.   The ansible remote temp path should probably 
>> be configured and forced to /tmp in this case.
>>
>>
>>
>>
>> On Fri, Jul 19, 2013 at 11:54 AM, Michael DeHaan > > wrote:
>>
>>> Just for clarification, have you tried the development branch as of 
>>> about 20 minutes ago?
>>>
>>> Some code changes in that regard and want to make sure you're trying 
>>> latest before I try to replicate things.
>>>
>>> --Michael
>>>
>>>
>>>
>>>
>>> On Fri, Jul 19, 2013 at 4:26 AM, Vincent Hardion >> > wrote:
>>>
 Thanks for your answer.
 Effectively with the version of ansible is better. So I tried first 
 with 1.2 (rpm from epel) but it happens with release1.2.1 and even the 
 development branch.

 I'm the owner of ~/.ansible. But now you talk about "unique" maybe one 
 thing: the home directory is nfs mount. So when I launch ansible from 
 computer A to computer B, ansible use the same "drive" space.

 This pull request can be more explicit : 
 https://github.com/ansible/ansible/pull/3587.

 Best regards,
 Vincent

 -- 
 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 .
 For more options, visit https://groups.google.com/groups/opt_out.
  
  

>>>
>>>
>>>
>>> -- 
>>> Michael DeHaan >
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>>
>>
>>
>> -- 
>> Michael DeHaan >
>> CTO, AnsibleWorks, Inc.
>> http://www.ansibleworks.com/
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Ansible Project" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/ansible-project/yCN_yXa_GkM/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> ansible-proje...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4bae621f-b1d9-4ed7-87db-3dc76678b30f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-08 Thread Vamsi krishna
When i am creating directory i am getting permission denied...

ansible version 2.4.3

"msg": "There was an issue creating /etc/ as requested: [Errno 13] 
Permission denied: b'/etc/'

On Thursday, March 8, 2018 at 5:03:59 PM UTC-8, Vamsi krishna wrote:
>
> Hi vincent,
>
> mee to facing the same issue...
> changing the tmp directory means, what you mean??
>
> you mean to change that in our hosts 
>
> can u explain litttle bit clear...
>
> On Friday, July 19, 2013 at 9:30:53 AM UTC-7, Vincent Hardion wrote:
>>
>> I have just pull the last version but it is the same behaviour.
>>
>> ~/projects/cfg-maxlab-ansible/etc/ansible% ansible-playbook --version
>> ansible-playbook 1.3 (devel f4b1e426ea) last updated 2013/07/19 18:08:52 
>> (GMT +200)
>>
>> TASK: [ensure NTP point out to the ntp server] * 
>> failed: [computerA.se] => {"failed": true, "item": ""}
>> msg: Could not replace file: 
>> /home/xxx/.ansible/tmp/ansible-1374250532.29-44727094344629/source to 
>> /etc/ntp.conf: [Errno 13] Permission denied: 
>> '/home/xxx/.ansible/tmp/ansible-1374250532.29-44727094344629/source'
>>
>>
>> By changing the temp directory it works.
>>
>> Thank you Michael and Brian.
>>
>> Vincent
>>
>>
>> On Fri, Jul 19, 2013 at 5:54 PM, Michael DeHaan  
>> wrote:
>>
>>> But yes, Brian is correct.   The ansible remote temp path should 
>>> probably be configured and forced to /tmp in this case.
>>>
>>>
>>>
>>>
>>> On Fri, Jul 19, 2013 at 11:54 AM, Michael DeHaan <
>>> mic...@ansibleworks.com> wrote:
>>>
 Just for clarification, have you tried the development branch as of 
 about 20 minutes ago?

 Some code changes in that regard and want to make sure you're trying 
 latest before I try to replicate things.

 --Michael




 On Fri, Jul 19, 2013 at 4:26 AM, Vincent Hardion  
 wrote:

> Thanks for your answer.
> Effectively with the version of ansible is better. So I tried first 
> with 1.2 (rpm from epel) but it happens with release1.2.1 and even the 
> development branch.
>
> I'm the owner of ~/.ansible. But now you talk about "unique" maybe one 
> thing: the home directory is nfs mount. So when I launch ansible from 
> computer A to computer B, ansible use the same "drive" space.
>
> This pull request can be more explicit : 
> https://github.com/ansible/ansible/pull/3587.
>
> Best regards,
> Vincent
>
> -- 
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>



 -- 
 Michael DeHaan 
 CTO, AnsibleWorks, Inc.
 http://www.ansibleworks.com/


>>>
>>>
>>> -- 
>>> Michael DeHaan 
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Ansible Project" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/ansible-project/yCN_yXa_GkM/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> ansible-proje...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1dfc6268-635b-4e92-849d-a701ef2b526a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-08 Thread Toshio Kuratomi
There's a configuration option, remote_tmp.  Setting that to a system
directory (like /tmp or /var/tmp ) can fix this error.

On Mar 8, 2018 5:04 PM, "Vamsi krishna"  wrote:

> Hi vincent,
>
> mee to facing the same issue...
> changing the tmp directory means, what you mean??
>
> you mean to change that in our hosts
>
> can u explain litttle bit clear...
>
> On Friday, July 19, 2013 at 9:30:53 AM UTC-7, Vincent Hardion wrote:
>>
>> I have just pull the last version but it is the same behaviour.
>>
>> ~/projects/cfg-maxlab-ansible/etc/ansible% ansible-playbook --version
>> ansible-playbook 1.3 (devel f4b1e426ea) last updated 2013/07/19 18:08:52
>> (GMT +200)
>>
>> TASK: [ensure NTP point out to the ntp server] *
>> failed: [computerA.se] => {"failed": true, "item": ""}
>> msg: Could not replace file: /home/xxx/.ansible/tmp/ansible
>> -1374250532.29-44727094344629/source to /etc/ntp.conf: [Errno 13]
>> Permission denied: '/home/xxx/.ansible/tmp/ansibl
>> e-1374250532.29-44727094344629/source'
>>
>>
>> By changing the temp directory it works.
>>
>> Thank you Michael and Brian.
>>
>> Vincent
>>
>>
>> On Fri, Jul 19, 2013 at 5:54 PM, Michael DeHaan 
>> wrote:
>>
>>> But yes, Brian is correct.   The ansible remote temp path should
>>> probably be configured and forced to /tmp in this case.
>>>
>>>
>>>
>>>
>>> On Fri, Jul 19, 2013 at 11:54 AM, Michael DeHaan <
>>> mic...@ansibleworks.com> wrote:
>>>
 Just for clarification, have you tried the development branch as of
 about 20 minutes ago?

 Some code changes in that regard and want to make sure you're trying
 latest before I try to replicate things.

 --Michael




 On Fri, Jul 19, 2013 at 4:26 AM, Vincent Hardion 
 wrote:

> Thanks for your answer.
> Effectively with the version of ansible is better. So I tried first
> with 1.2 (rpm from epel) but it happens with release1.2.1 and even the
> development branch.
>
> I'm the owner of ~/.ansible. But now you talk about "unique" maybe one
> thing: the home directory is nfs mount. So when I launch ansible from
> computer A to computer B, ansible use the same "drive" space.
>
> This pull request can be more explicit : https://github.com/ansible/a
> nsible/pull/3587.
>
> Best regards,
> Vincent
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



 --
 Michael DeHaan 
 CTO, AnsibleWorks, Inc.
 http://www.ansibleworks.com/


>>>
>>>
>>> --
>>> Michael DeHaan 
>>> CTO, AnsibleWorks, Inc.
>>> http://www.ansibleworks.com/
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Ansible Project" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/ansible-project/yCN_yXa_GkM/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> ansible-proje...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>> --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/4bae621f-b1d9-4ed7-87db-3dc76678b30f%40googlegroups.
> com
> 
> .
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPrnkaQNX9ii%2BVJBzZ7b0ehru%2Boxq%3Dd0btSPKYYZxjBYGLLaEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-09 Thread Vamsi krishna
Hello @Toshio ,

Thanks for your response, i tried and i changed in the ansible.cfg file to 
remote_tmp: /var/tmp and still same error
Yaml file i am using 
 name: using
 hosts: all
 tasks:
   - name: creates directory
 file:
   path: /etc/
   state: directory
   owner: root
   group: root
   mode: 0755

Error i am getting 

"msg": "There was an issue creating /etc/ as requested: [Errno 13] 
Permission denied: b'/etc/'  


Any help.

thanks 

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c0a24201-6403-4207-836b-2b10d7ff558b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-09 Thread Toshio Kuratomi
Your having a different problem than the person you replied to.  Your issue
is that you don't have permission on the directory that you are asking
ansible to create (/etc/ ).  The original poster was having problems
with an internal ansible temporary directory.

For your issue, you need the user you are logging into the remote machine
as to have permission to create that directory *or* you need to use
ansible's become facilities to become a user with sufficient permissions to
create the directory.

For instance, on my machines ansible will log into the remote machine as an
unprivilrged user and then use sudo with password to become root.  Using
your playing, I'd invoke ansible with a commandline like this:

ansible-playbook --become --become-user=root -K test.yml




On Mar 9, 2018 10:06 AM, "Vamsi krishna"  wrote:

> Hello @Toshio ,
>
> Thanks for your response, i tried and i changed in the ansible.cfg file to
> remote_tmp: /var/tmp and still same error
> Yaml file i am using
>  name: using
>  hosts: all
>  tasks:
>- name: creates directory
>  file:
>path: /etc/
>state: directory
>owner: root
>group: root
>mode: 0755
>
> Error i am getting
>
> "msg": "There was an issue creating /etc/ as requested: [Errno 13]
> Permission denied: b'/etc/'
>
>
> Any help.
>
> thanks
>
> --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/ansible-project/c0a24201-6403-4207-836b-2b10d7ff558b%
> 40googlegroups.com
> 
> .
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPrnkaQXniuo8555%2Bh1MFZyaR%2BrRquicX38dy%3D0Z6qtqYQgR6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.