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

Add chmod+x option to copy command #160

Merged
merged 3 commits into from
Nov 4, 2023
Merged

Add chmod+x option to copy command #160

merged 3 commits into from
Nov 4, 2023

Conversation

umputun
Copy link
Owner

@umputun umputun commented Nov 4, 2023

This is a typical flow - copy a file to the remote system and make it executable. This is often needed to deploy and run remote scripts. Currently, copy command preserves chmod flags from the source file, so making the source script executable will do the trick, however, sometimes, changing the permissions of the source file is undesirable.

This PR adds a new copy flag chmod+x: true , i.e.

- name: copy file and make it executable
  copy:
    - {"src": "testdata/script.sh", "dst": "/tmp/script.sh", "chmod+x": true}

In addition, this PR also bumps deps and brings go to the latest 1.21 version

@umputun umputun merged commit 1bc91ba into master Nov 4, 2023
5 checks passed
@umputun umputun deleted the chmod-x branch November 4, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant