Skip to content
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

set security value as upcase #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

set security value as upcase #30

wants to merge 1 commit into from

Conversation

XnS
Copy link

@XnS XnS commented Apr 2, 2020

At the moment the security variable is set in lower/downcase, but its read in uppercase. DB2 itself also stores the value in uppercase only, even if you set it in lowercase.

example:

f00@f00:~> db2 list node directory show detail | grep Security
 Security type                  = SSL

read:

args << "SECURITY #{@resource[:security].upcase}" if @resource[:security]

write:

newproperty(:security) do
desc "Specifies the node will be security enabled, valid values are ssl, ns and server"
munge do |value|
value.downcase
end
end

Therefore the value differs on every run and the module tries to fix it:

f00:~ # puppet agent --enable; puppet agent -tv; puppet agent --disable
[...]
Notice: /Stage[main]/Fleetboard::Profiles::Db2_catalog/Db2_catalog_node[ZU5AD000]/security: security changed 'SSL' to 'ssl' (corrective)
Notice: Applied catalog in 11.46 seconds

f00:~ # puppet agent --enable; puppet agent -tv; puppet agent --disable
[...]
Notice: /Stage[main]/Fleetboard::Profiles::Db2_catalog/Db2_catalog_node[ZU5AD000]/security: security changed 'SSL' to 'ssl' (corrective)
Notice: Applied catalog in 11.76 seconds

This change sets the value in uppercase so it matches the DB2 output and stays the same between puppet runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant