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

HostsFile : Add possibility to put a comment on each line added #445

Open
Francois-Rousseau opened this issue Feb 25, 2020 · 2 comments
Open
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@Francois-Rousseau
Copy link

Francois-Rousseau commented Feb 25, 2020

Details of the scenario you tried and the problem that is occurring

When using the resource to add a entry in the HostsFile, there is no possibility to add a comment at the end of line, as we usually do.

The purpose is to leave a trace about why the entry is there.

Verbose logs showing the problem

Suggested solution to the issue

Add a parameter (string) that can be added at end of line when adding an entry.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

- name: Fichier hosts pour installation
  win_dsc:
    resource_name: HostsFile
    HostName: '{{item.Name}}'
    Ensure: Present
    IPAddress: '{{item.IP}}' 
  with_items:
    - '{{ListeHostsPourInstallWAP}}'

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used ('dev' if using current dev branch)

6.1.0.0

@PlagueHO PlagueHO added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Mar 2, 2020
@MKletz
Copy link
Contributor

MKletz commented Sep 17, 2020

Taking a look at this, might require a refactor on the resource to implement properly since there's some duplicated code that would make this challenging as is.

@PlagueHO
Copy link
Member

PlagueHO commented Dec 1, 2020

Happy for anyone to refactor this one @MKletz - does need a bit of attention to clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

3 participants