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

Command Module Doesn't Do Shell Expansions #120

Open
corysabol opened this issue May 7, 2020 · 0 comments
Open

Command Module Doesn't Do Shell Expansions #120

corysabol opened this issue May 7, 2020 · 0 comments
Labels
bug low Low Priority

Comments

@corysabol
Copy link
Contributor

corysabol commented May 7, 2020

The katana command module doesn't seem to handle shell expansions very well. In the case of trying to use it to install kubectl with the following command:

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl

It fails to fetch the file and instead resolved the subshell command as part of the URL.

Example yaml:

- name: Download kubectl bin
  command:
    cwd: /usr/bin
    cmd: curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl

It might make sense to add the ability to pass shell=True to the subprocess.run() call in found here -

results = subprocess.run(command_list, cwd=params.get('cwd'))

@corysabol corysabol added bug low Low Priority labels May 7, 2020
@corysabol corysabol added this to the 5.0 beta - AWS Workspace milestone May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug low Low Priority
Projects
None yet
Development

No branches or pull requests

1 participant