Module: PuppetX::EnterpriseModules::Oracle::CreateOnly
- Defined in:
- lib/puppet_x/enterprisemodules/oracle/create_only.rb
Overview
docs
Instance Method Summary collapse
- #create_only? ⇒ Boolean
- #create_only_insync?(is, should) ⇒ Boolean
- #insync?(is) ⇒ Boolean
- #update? ⇒ Boolean
Instance Method Details
#create_only? ⇒ Boolean
21 22 23 |
# File 'lib/puppet_x/enterprisemodules/oracle/create_only.rb', line 21 def create_only? resource[:create_only].include?(name.to_s) end |
#create_only_insync?(is, should) ⇒ Boolean
25 26 27 28 29 30 31 32 |
# File 'lib/puppet_x/enterprisemodules/oracle/create_only.rb', line 25 def create_only_insync?(is, should) if update? && create_only? Puppet.info "Skipping property change of #{name}, because it is on the create_only list." if is != should true else is.to_s == should.to_s end end |
#insync?(is) ⇒ Boolean
13 14 15 |
# File 'lib/puppet_x/enterprisemodules/oracle/create_only.rb', line 13 def insync?(is) create_only_insync?(is, should) end |
#update? ⇒ Boolean
17 18 19 |
# File 'lib/puppet_x/enterprisemodules/oracle/create_only.rb', line 17 def update? resource.provider.ensure.to_s != 'absent' end |