oracle-samples / knife-oci

Chef Knife Plugin for Oracle Cloud Infrastructure
https://cloud.oracle.com/cloud-infrastructure
Other
12 stars 15 forks source link

How to run recipe which is powershell script using parameters #57

Closed ghost closed 6 years ago

ghost commented 6 years ago

I have recipe which is of powershell commands

powershell_script "run-isci" do code <<-EOH Set-Service -Name msiscsi -StartupType Automatic Start-Service msiscsi New-IscsiTargetPortal -TargetPortalAddress 165.xx.xx.xx Connect-IscsiTarget -NodeAddress iqn.2015.xxxx.xx -TargetPortalAddress 165.xx.xx.xx -IsPersistent $True

EOH end

I am getting values 165.xx.xx.xx and iqn.2015.xxxx.xx from another recipe and i wanted to pass it to this recipe. How i can achieve this?

briangustafson commented 6 years ago

This is a general Chef question that may be better addressed in other forums. However, I believe that you should be able to use Node attributes for this, https://docs.chef.io/attributes.html.