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

Conditional check within Install Docker Task is Improvable #2

Open
jimbo8098 opened this issue Apr 1, 2021 · 0 comments
Open

Conditional check within Install Docker Task is Improvable #2

jimbo8098 opened this issue Apr 1, 2021 · 0 comments

Comments

@jimbo8098
Copy link
Owner

jimbo8098 commented Apr 1, 2021

Currently, the task is structured in the code blocks below:

- name: Install latest Docker version
win_dsc:
resource_name: PackageManagement
Name: "docker"
ProviderName: DockerMsftProvider
notify:
- Restart server following Docker changes
when: docker.version == "latest"

- name: Install specific Docker version
win_dsc:
resource_name: PackageManagement
Name: "docker"
ProviderName: DockerMsftProvider
RequiredVersion: "{{ docker.version }}"
notify:
- Restart server following Docker changes
when: docker.version != "latest"

This should be converted to ensure that docker.version exists prior to the equality check otherwise it will fail if you diverge some of the variables within the docker dict.

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

No branches or pull requests

1 participant