Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make fetch use slurp when sudo is set? #1020

Closed
jpmens opened this issue Sep 7, 2012 · 3 comments
Closed

make fetch use slurp when sudo is set? #1020

jpmens opened this issue Sep 7, 2012 · 3 comments
Milestone

Comments

@jpmens
Copy link
Contributor

jpmens commented Sep 7, 2012

0.7 release: using fetch module, I experience the following of which I'd consider the first a bug, the rest cosmetic or documentation issues: (All examples running in a Playbook with sudo: true)

  1. fetch cannot retrieve, say, /etc/sudoers (mode 0640). Verbose shows msg=no read permission on remote file, not transferring, ignored, changed: false; this is a bug.
  2. Fetching a non-existent file from remote shows up as "ok" (green). Probably fine, ought to be documented though.

BTW, solved the first with

- action: command install -m 444 /etc/sudoers /etc/sudoers.pre-ansible creates /etc/sudoers.pre-ansible
- action: fetch ....

Just gotta love Ansible! :-)

@mpdehaan
Copy link
Contributor

mpdehaan commented Sep 7, 2012

Seems like you were just running as a user without permission on the file?

Not a bug?

On Fri, Sep 7, 2012 at 5:45 AM, JP Mens notifications@github.com wrote:

0.7 release: using fetch module, I experience the following of which I'd
consider the first a bug, the rest cosmetic or documentation issues: (All
examples running in a Playbook with sudo: true)

  1. fetch cannot retrieve, say, /etc/sudoers (mode 0640). Verbose shows msg=no
    read permission on remote file, not transferring, ignored, changed:
    false; this is a bug.
  2. Fetching a non-existent file from remote shows up as "ok" (green).
    Probably fine, ought to be documented though.

BTW, solved the first with

  • action: command install -m 444 /etc/sudoers /etc/sudoers.pre-ansible creates /etc/sudoers.pre-ansible
  • action: fetch ....

Just gotta love Ansible! :-)


Reply to this email directly or view it on GitHubhttps://github.com//issues/1020.

@jpmens
Copy link
Contributor Author

jpmens commented Sep 7, 2012

I wrote:

All examples running in a Playbook with sudo: true

I think it is a bug: I can copy to the machine and overwrite any file, so I should be able to fetch any file from that same machine. :)

@mpdehaan
Copy link
Contributor

mpdehaan commented Sep 7, 2012

Ah, that.

We would have to make fetch use slurp if sudo is set.

Doable, just not a good fit for large files.

On Fri, Sep 7, 2012 at 2:54 PM, JP Mens notifications@github.com wrote:

I wrote:

All examples running in a Playbook with sudo: true

I think it is a bug: I can copy to the machine and overwrite any file,
so I should be able to fetch any file from that same machine. :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/1020#issuecomment-8375059.

@dhozac dhozac closed this as completed in a9c292d Nov 18, 2012
dhozac added a commit that referenced this issue Nov 20, 2012
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants