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

Adding a utility method for adding host entries #420

Merged
merged 8 commits into from Nov 17, 2014

Conversation

Projects
None yet
4 participants
@liamjbennett
Contributor

liamjbennett commented Aug 22, 2014

As much as this is a infrastructure-smell in the linux world, adding
hosts entries is still all to common in the windows world. This method
allows host entries to be configured to meet that need.

It can also be used when developing with vagrant to make sure that the
master and agent vms can see each other properly.

Adding a utility method for adding host entries
As much as this is a infrastructure-smell in the linux world, adding
hosts entries is still all to common in the windows world. This method
allows host entries to be configured to meet that need.

It can also be used when developing with vagrant to make sure that the
master and agent vms can see each other properly.
@puppetlabs-jenkins

This comment has been minimized.

Show comment
Hide comment
@puppetlabs-jenkins

puppetlabs-jenkins Aug 22, 2014

Contributor

Can one of the admins verify this patch?

Contributor

puppetlabs-jenkins commented Aug 22, 2014

Can one of the admins verify this patch?

1 similar comment
@puppetlabs-jenkins

This comment has been minimized.

Show comment
Hide comment
@puppetlabs-jenkins

puppetlabs-jenkins Aug 22, 2014

Contributor

Can one of the admins verify this patch?

Contributor

puppetlabs-jenkins commented Aug 22, 2014

Can one of the admins verify this patch?

hosts_file = "C:\\Windows\\System32\\Drivers\\etc\\hosts"
host_entry = "#{opts['ip']}`t`t#{opts['name']}"
on host, powershell("\$text = \\\"#{host_entry}\\\"; Add-Content -path '#{hosts_file}' -value \$text")
else

This comment has been minimized.

@anodelman

anodelman Sep 24, 2014

Contributor

The else case here should just log "nothing to do for this platform" - since it is now win only.

@anodelman

anodelman Sep 24, 2014

Contributor

The else case here should just log "nothing to do for this platform" - since it is now win only.

@liamjbennett

This comment has been minimized.

Show comment
Hide comment
@liamjbennett

liamjbennett Sep 24, 2014

Owner

This powershell function is created in puppetlabs#460

Owner

liamjbennett commented on lib/beaker/dsl/install_utils.rb in 90a19c8 Sep 24, 2014

This powershell function is created in puppetlabs#460

@anodelman

This comment has been minimized.

Show comment
Hide comment
@anodelman

anodelman Nov 4, 2014

Contributor

test this please

Contributor

anodelman commented Nov 4, 2014

test this please

@puppetlabs-jenkins

This comment has been minimized.

Show comment
Hide comment
@puppetlabs-jenkins
Contributor

puppetlabs-jenkins commented Nov 4, 2014

@anodelman

This comment has been minimized.

Show comment
Hide comment
@anodelman

anodelman Nov 10, 2014

Contributor

Please fix spec. Ping me if you are having trouble diagnosing.

Contributor

anodelman commented Nov 10, 2014

Please fix spec. Ping me if you are having trouble diagnosing.

@sschneid

This comment has been minimized.

Show comment
Hide comment
@sschneid

sschneid Nov 17, 2014

Contributor

+1

Contributor

sschneid commented Nov 17, 2014

+1

anodelman added a commit that referenced this pull request Nov 17, 2014

Merge pull request #420 from liamjbennett/host_entry_method
Adding a utility method for adding host entries

@anodelman anodelman merged commit e3a338f into puppetlabs:master Nov 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment