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

Have ansible-pull use python imports/functions instead of run_cmd #26867

Closed
robinro opened this issue Jul 16, 2017 · 8 comments
Closed

Have ansible-pull use python imports/functions instead of run_cmd #26867

robinro opened this issue Jul 16, 2017 · 8 comments
Labels
affects_2.4 This issue/PR affects Ansible v2.4 c:cli/pull easyfix This issue is considered easy to fix by aspiring contributors. feature This issue/PR relates to a feature request. hacktoberfest has_pr This issue has an associated PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@robinro
Copy link
Contributor

robinro commented Jul 16, 2017

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

pull

ANSIBLE VERSION

devel

CONFIGURATION
OS / ENVIRONMENT
SUMMARY

run_cmd is used in lib/ansible/cli/pull.py to call ansible and ansible-playbook. It would be less error prone and more performant to use python to import/call the corresponding modules instead of running shell commands.

STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
@robinro
Copy link
Contributor Author

robinro commented Jul 16, 2017

I might work on this in the future but am also happy to assist other people and especially newcomers on tackling this.

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 c:cli/pull feature_idea needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jul 16, 2017
@alikins alikins removed the needs_triage Needs a first human triage before being processed. label Jul 17, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_idea labels Mar 2, 2018
@Akasurde Akasurde added the easyfix This issue is considered easy to fix by aspiring contributors. label Jun 5, 2018
@akshay196
Copy link
Contributor

@robinro I would be happy to work on this. :)

@bcoca
Copy link
Member

bcoca commented Jul 17, 2018

https://github.com/bcoca/ansible/tree/pull_fix <= i had approached this at one time

@akshay196
Copy link
Contributor

@bcoca Thanks for informing. I will look into another issue.

@bcoca
Copy link
Member

bcoca commented Jul 17, 2018

not what i meant, i was offering as a starting point, I'm not currently working on it

@akshay196
Copy link
Contributor

@bcoca Okay. Then I will take help of that. :)

@robinro
Copy link
Contributor Author

robinro commented Jul 18, 2018

@akshay196 Feel free to open a PR as "WIP" early, I'd be happy to help.

akshay196 added a commit to akshay196/ansible that referenced this issue Sep 17, 2018
Fixes ansible#26867

Using Python imports/functions to call ansible and ansible-playbook would be
less error prone and more performance instead of running shell
commands(using run_cmd).

* Use of AdHocCLI to run ansible command

* Use of PlaybookCLI to run ansible-playbook

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
@ansibot ansibot added the has_pr This issue has an associated PR. label Jul 28, 2019
@bcoca
Copy link
Member

bcoca commented Dec 18, 2020

Hi!

Thanks very much for your submission to Ansible. It sincerely means a lot to us that you've taken time to contribute.

Unfortunately, we are going to decline this feature reqeust because the stability gains are in our view not worth the effort to re-implement the tool from scratch, but we are open to submissions in this regard.

However, we're absolutely always up for discussion.
Since this is a really busy project, we don't always see comments on closed tickets, but want to encourage open dialog.

You can stop by the development list, and we'd be glad to talk about it - and we might even be persuaded otherwise!

In the future, sometimes starting a discussion on the development list prior to implementing a feature can make getting things included a little easier, but it's not always necessary.

Thank you once again for this and your interest in Ansible!

@bcoca bcoca closed this as completed Dec 18, 2020
@ansible ansible locked and limited conversation to collaborators Jan 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 c:cli/pull easyfix This issue is considered easy to fix by aspiring contributors. feature This issue/PR relates to a feature request. hacktoberfest has_pr This issue has an associated PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants