Giter Site home page Giter Site logo

sous-chefs / winrm Goto Github PK

View Code? Open in Web Editor NEW
5.0 39.0 11.0 185 KB

Development repository for the winrm cookbook

Home Page: https://supermarket.chef.io/cookbooks/winrm

License: Apache License 2.0

Ruby 100.00%
chef-cookbook chef-resource winrm chef hacktoberfest managed-by-terraform

winrm's Introduction

WinRM Cookbook

Cookbook Version Build Status OpenCollective OpenCollective License

Installs and configures WinRM on a Windows System

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

  • Windows 2012 / 2012 R2
  • Windows 2016
  • Windows 2019
  • Windows 2022

Chef

  • Chef 15.4+

Additional Requirements

  • PowerShell must already be installed

Resources

winrm_listener_config

Configure winrm listeners on a host. Previously this resource was named winrm and that legacy name will continue to function.

Actions

  • :create - configure a listener

Properties

  • hostname - Used for creating the listeners and finding the certificate thumbprint or creating a new one, default node['fqdn']
  • trusted_hosts - Trusted hosts to allow connections from, default '*'
  • max_shell_memory - Max memory allowed for each remote shell, default 1024
  • thumbprint - Specify a certificate thumbprint to use, if nil will looks for certificate matching hostname, default nil
  • listen_http - Enable HTTP listener, default true
  • listen_https - Enable HTTPS listener, default true
  • allow_unencrypted - Wether to allow unencrypted WinRM connections, default true
  • allow_basic_auth - Enable Basic Authentication, default true
  • generate_cert - Whether to generate a cert if none is found, default true
  • add_firewall_rule - Whether to create a firewall rule which allows WinRM access, default true

Examples

winrm_listener_config 'default' do
  listen_http false
  allow_unencrypted false
end

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

winrm's People

Contributors

axelrtgs avatar damacus avatar ev0ldave avatar johnroesler avatar kitchen-porter avatar larry-herz avatar p0rkjello avatar pcross616 avatar powerschill avatar ramereth avatar renovate[bot] avatar rjaros87 avatar rpunt avatar tas50 avatar xorima avatar xorimabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winrm's Issues

Run latest cookstyle

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

Chef have released updated cookstyle rules, we should therefore run the auto fix against the cookbook

  1. Ensure you are on the latest stable chef-workstation
  2. Run cookstyle -a

Issue sprouted from sous-chefs/meta/issues/111. If not applicable then issue should be closed.

Update Changelog

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

Update all CHANGELOGs to follow standard defined at https://keepachangelog.com/

Issue sprouted from sous-chefs/meta/issues/101. If not applicable then issue should be closed.

Update builds to be parallel

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

As part of our build process we should build each possible operating system separately

  1. Ensure you have dokken setup and working:
  2. dokken: aliased to KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen
  3. run dokken list, you should see a list of builds with dokken as the provider
  4. download: https://github.com/sous-chefs/repo-management/blob/master/scripts/circleci_maker.rb and make this executable
  5. run: dokken list -j | ./circleci_maker.rb > .circleci/config.yml

Issue sprouted from sous-chefs/meta/issues/112. If not applicable then issue should be closed.

Cert created on "listen_http" instead of "listen_https"

Cookbook version

3.0.0

Chef-client version

13

Platform Details

Windows 2016

Scenario:

Configure winrm using http only

Steps to Reproduce:

listen_https false
generate_cert false

Expected Result:

cert is not generated.

Actual Result:

generate_cert is not used anywhere in listener_config.rb. The block below also checks new_resource.listen_http instead of new_resource.listen_https

  # If no certificate found and generateCert is true try to generate a self signed cert
  if new_resource.listen_http && new_resource.thumbprint.nil? && load_thumbprint.empty?
    Chef::Log.warn('Inside Create Cert')
    cookbook_file "#{Chef::Config[:file_cache_path]}\\selfssl.exe" do
      source 'selfssl.exe'
    end

Name attribute required in cookbook metadata

Chef 12 has stricter metadata requirements so we get this when knifing cookbook to Chef Server:

Chef::Exceptions::MetadataNotValid: Cookbook loaded at path(s) [/Users/timgood01/Development/cookbooks/winrm] has invalid metadata: The `name' attribute is required in cookbook metadata

Please add cookbook name to metadata.rb This is easy for us to fix locally, of course, but our version of the winrm cookbook maintains a dependency on this one.

Remove .rubocop.yml with Dangerfile

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

If the only thing in the .rubocop/yml is Dangerfile
Run the latest cookstyle
Remove .rubpopo.yml

Issue sprouted from sous-chefs/meta/issues/108. If not applicable then issue should be closed.

problem with file permissions on non-english windows

System Error Code: 1332
System Error Message: Nie zostało wykonane mapowanie między nazwami kont a identyfikatorami zabezpieczeń.

it's from line 31 - you use name 'Everyone', but it's only defined on english-language windows.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • sous-chefs/.github 3.1.1
  • actions/checkout v4
  • actionshub/chef-install 3.0.0
  • actionshub/test-kitchen 3.0.0
.github/workflows/stale.yml
  • actions/stale v9

  • Check this box to trigger a request for Renovate to run again on this repository

selfssl.exe default behavior assigned generated certificate to site ID 1

Cookbook version

2.0.0

Chef-client version

12

Platform Details

2008R2 & 2012R2

Scenario:

If there is an HTTPS binding on site ID 1 with an existing certificate, running selfssl.exe will replace that binding with the self-signed certificate.

command "#{Chef::Config[:file_cache_path]}\selfssl.exe /T /N:cn=#{new_resource.Hostname} /V:3650 /Q"

Steps to Reproduce:

  1. Create HTTPS binding and bind site ID 1 to a certificate
  2. Run default value in this cookbook to enable winrm https, winrm "default".
  3. winrm "default" will generate a certificate and bind it to site ID 1, replacing the previous cert binding in step 1.

Expected Result:

SSL binding does not change for Site ID 1

Actual Result:

SSL binding changes for Site ID 1

Notes:

I forked it and used certreq to generate the cert instead, let me know what y'all think and I can make a pull request

retsyudduyster@2582f68

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.