Closed ghost closed 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?
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.
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?