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

docker-compose - Adding validated state and no_interpolate option #169

Closed

Conversation

Ajpantuso
Copy link
Collaborator

SUMMARY

Adds a new state validated along with a new option no_interpolate which is the equivalent of docker-compose config
Implements #24

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/modules/docker-compose.py

ADDITIONAL INFORMATION
  • Original request was just for validating configs with no output which is already covered by check_mode so the validated state was extended to actually display output like docker-compose config.
  • no-interpolate adds the ability to show unsubstituted environment variables in the config output.

@Ajpantuso Ajpantuso force-pushed the docker_compose_validate branch from 314d75e to 2b2053d Compare June 29, 2021 17:50
@Ajpantuso Ajpantuso marked this pull request as ready for review June 29, 2021 18:59
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that we should add this as a state. I think it would be better to have this as an _info module; maybe docker_compose_validate_info?

@@ -1,4 +0,0 @@
---
minor_changes:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase to latest main so these 'fake' changes go away? They're making reviewing harder :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a real change. I missed moving this to changelogs/fragments in #162 so now it's just hanging out in root after 1.8.0.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops. I completely missed that...

I'll do the move in a separate commit (and add a note that this was already added in 1.8.0).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll close this and look into an info module instead.

- The resulting configuration from one or more compose files.
- Equivalent to the output of C(docker-compose config).
returned: when success and I(state=validated)
type: dict
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type: dict
type: dict
version_added: 1.9.0

@Ajpantuso
Copy link
Collaborator Author

Ajpantuso commented Jun 30, 2021

I'm not sure that we should add this as a state. I think it would be better to have this as an _info module; maybe docker_compose_validate_info?

Yeah, I also considered this. If I go that route then I guess it could be docker_compose_config_info and just implement the features of docker-compose config.

@Ajpantuso Ajpantuso closed this Jul 1, 2021
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.

2 participants