This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
ENV_VAR1: value123 | |
ENV_VAR2: '{{ .site }}-value' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_oneview_hw_network_type(client, hw) | |
enclosure = find_oneview_resource(:Enclosure, client, uri: hw['locationUri']) | |
logical_enclosure = find_oneview_resource(:LogicalEnclosure, client, uri: enclosure['logicalEnclosureUri']) | |
interconnect_type_uris = [] # List of InterconnectType URIs in this LogicalEnclosure | |
return 'unmanaged' if logical_enclosure['logicalInterconnectUris'].blank? | |
logical_enclosure['logicalInterconnectUris'].each do |li_uri| | |
li = find_oneview_logical_interconnect!(client, uri: li_uri) | |
# Keep track of the LogicalInterconnect URIs for this LogicalEnclosure | |
interconnect_type_uris |= li['interconnectMap']['interconnectMapEntries'].map { |e| e['permittedInterconnectTypeUri'] }.compact | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: test_package | |
# Recipe:: default | |
# | |
# This recipe is meant to show the issues with the package resource, specifically | |
# using Yum, where multiple packages need to be installed/updated at once. It was | |
# executed with Kitchen-vagrant with the "centos-7.2" platform name. Nothing fancy. | |
# Make sure my yum cache is clean. Gets around some 404 errors for old mirrors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef/provisioning' | |
with_driver 'oneview' | |
machine 'web01' do | |
machine_options :driver_options => { | |
:server_template => 'Template - Web Server', | |
:os_build => 'CHEF-RHEL-6.5-x64', | |
:host_name => 'chef-web01', |