Open
Conversation
|
Best reviewed: commit by commit
Optimal code review plan
|
myii
suggested changes
Aug 25, 2020
Comment on lines
+80
to
+102
| {% if 'module' in remi_settings %} | ||
| {% for module,opts in remi_settings.module.items() %} | ||
| {% if opts.disabled|default(False) %} | ||
| disable_module_{{ module }}: | ||
| cmd.run: | ||
| - name: dnf -y module disable {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | ||
| - unless: dnf module --disabled list {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | ||
| {% else %} | ||
| reset_module_{{ module }}: | ||
| cmd.run: | ||
| - name: dnf -y module reset {{ module }} | ||
| - onlyif: dnf module --enabled list {{ module }} | ||
| {% if opts.version|default(False) %} | ||
| - unless: dnf module --enabled list {{ module }}:{{ opts.version }} | ||
| {% endif %} | ||
|
|
||
| enable_module_{{ module }}: | ||
| cmd.run: | ||
| - name: dnf -y module enable {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | ||
| - unless: dnf module --enabled list {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% endif %} |
Contributor
There was a problem hiding this comment.
To make this a little easier to follow, would you mind applying the following indentation, or something similar?
Suggested change
| {% if 'module' in remi_settings %} | |
| {% for module,opts in remi_settings.module.items() %} | |
| {% if opts.disabled|default(False) %} | |
| disable_module_{{ module }}: | |
| cmd.run: | |
| - name: dnf -y module disable {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| - unless: dnf module --disabled list {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| {% else %} | |
| reset_module_{{ module }}: | |
| cmd.run: | |
| - name: dnf -y module reset {{ module }} | |
| - onlyif: dnf module --enabled list {{ module }} | |
| {% if opts.version|default(False) %} | |
| - unless: dnf module --enabled list {{ module }}:{{ opts.version }} | |
| {% endif %} | |
| enable_module_{{ module }}: | |
| cmd.run: | |
| - name: dnf -y module enable {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| - unless: dnf module --enabled list {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| {% endif %} | |
| {% endfor %} | |
| {% endif %} | |
| {% if 'module' in remi_settings %} | |
| {% for module,opts in remi_settings.module.items() %} | |
| {% if opts.disabled|default(False) %} | |
| disable_module_{{ module }}: | |
| cmd.run: | |
| - name: dnf -y module disable {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| - unless: dnf module --disabled list {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| {% else %} | |
| reset_module_{{ module }}: | |
| cmd.run: | |
| - name: dnf -y module reset {{ module }} | |
| - onlyif: dnf module --enabled list {{ module }} | |
| {% if opts.version|default(False) %} | |
| - unless: dnf module --enabled list {{ module }}:{{ opts.version }} | |
| {% endif %} | |
| enable_module_{{ module }}: | |
| cmd.run: | |
| - name: dnf -y module enable {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| - unless: dnf module --enabled list {{ module }}{% if opts.version|default(False) %}:{{ opts.version }}{% endif %} | |
| {% endif %} | |
| {% endfor %} | |
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Manage DNF modules
Primary type
[build]Changes related to the build system[chore]Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]Changes to the continuous integration configuration[feat]A new feature[fix]A bug fix[perf]A code change that improves performance[refactor]A code change that neither fixes a bug nor adds a feature[revert]A change used to revert a previous commit[style]Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]Documentation changes[test]Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE?No.
Related issues and/or pull requests
Close #13
Documentation checklist
README(e.g.Available states).pillar.example.