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

Support !include and !import constructors in awx import -f yaml command #8135

Closed
neoaggelos opened this issue Sep 13, 2020 · 0 comments · Fixed by #8136
Closed

Support !include and !import constructors in awx import -f yaml command #8135

neoaggelos opened this issue Sep 13, 2020 · 0 comments · Fixed by #8136

Comments

@neoaggelos
Copy link
Contributor

ISSUE TYPE
  • Feature Idea
SUMMARY

Support !import and !include with awx import -f yaml command. This is useful when working with a large number of AWX resources. This allows breaking config into smaller files, and having a top-level file like this:

# resources.yaml
projects:
- !include projects/project1.yaml
- !include projects/project2.yaml
job_templates:
- !include jobs/job1.yaml

# ....

Which allows managing resources in individual files (e.g. using a friendly directory structure), and still being able to import with awx import -f yaml < resources.yaml.

SUGGESTED IMPLEMENTATION

Use awxkit.yaml_file.Loader instead of yaml.safe_load in https://github.com/ansible/awx/blob/devel/awxkit/awxkit/cli/resource.py#L143

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 a pull request may close this issue.

1 participant