simp-beaker-helpers 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +19 -4
 - data/lib/simp/beaker_helpers.rb +65 -7
 - metadata +2 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 4956f5f8e1a5a81d0f8daeb6ee58c54516756b96
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e45cc0c1a5f3a609d049755994fdd2fc72edfd40
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 087b061992ae56669a7600eebe9562ed1fe5dc24333506aa367bf28d24f028f2d2f163e76e45b51a890060588a47a40f55a6ee4b5602ce3b04aaaf00f99e5103
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 4e96ebc13c03aa9c54bf75bb1a7f45db7ffd688f0518ba0a98c5419b2be546f510c31731f11a289d40cae50142158afb8962b504f77afe9c4b31374443363e6e
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -117,12 +117,27 @@ Nodes in your nodesets will create YUM repository entries according to the 
     | 
|
| 
       117 
117 
     | 
    
         
             
            following Hash:
         
     | 
| 
       118 
118 
     | 
    
         | 
| 
       119 
119 
     | 
    
         
             
            ```yaml
         
     | 
| 
      
 120 
     | 
    
         
            +
            ---
         
     | 
| 
      
 121 
     | 
    
         
            +
            yum_repos:
         
     | 
| 
      
 122 
     | 
    
         
            +
               <repo_name>:
         
     | 
| 
      
 123 
     | 
    
         
            +
                 <yum_resource_parameter>: <value>
         
     | 
| 
      
 124 
     | 
    
         
            +
            ```
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
            The `baseurl` and `gpgkey` parameters can also take an Array if you need to
         
     | 
| 
      
 127 
     | 
    
         
            +
            point at more than one location.
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
            This would look like the following:
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
            ```yaml
         
     | 
| 
      
 132 
     | 
    
         
            +
            ---
         
     | 
| 
       120 
133 
     | 
    
         
             
            yum_repos:
         
     | 
| 
       121 
134 
     | 
    
         
             
               <repo_name>:
         
     | 
| 
       122 
     | 
    
         
            -
                  
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                   -  
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
      
 135 
     | 
    
         
            +
                 baseurl:
         
     | 
| 
      
 136 
     | 
    
         
            +
                   - http://some.random.host
         
     | 
| 
      
 137 
     | 
    
         
            +
                   - https://some.other.random.host
         
     | 
| 
      
 138 
     | 
    
         
            +
                 gpgkey:
         
     | 
| 
      
 139 
     | 
    
         
            +
                   - https://my.gpg.host
         
     | 
| 
      
 140 
     | 
    
         
            +
                   - https://my.other.gpg.host
         
     | 
| 
       126 
141 
     | 
    
         
             
            ```
         
     | 
| 
       127 
142 
     | 
    
         | 
| 
       128 
143 
     | 
    
         
             
            ## Methods
         
     | 
    
        data/lib/simp/beaker_helpers.rb
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Simp; end
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Simp::BeakerHelpers
         
     | 
| 
       4 
     | 
    
         
            -
              VERSION = '1. 
     | 
| 
      
 4 
     | 
    
         
            +
              VERSION = '1.5.0'
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
              # use the `puppet fact` face to look up facts on an SUT
         
     | 
| 
       7 
7 
     | 
    
         
             
              def pfact_on(sut, fact_name)
         
     | 
| 
         @@ -187,15 +187,73 @@ DEFAULT_KERNEL_TITLE=`/sbin/grubby --info=\\\${DEFAULT_KERNEL_INFO} | grep -m1 t 
     | 
|
| 
       187 
187 
     | 
    
         
             
              #       - <URL to GPGKEY1>
         
     | 
| 
       188 
188 
     | 
    
         
             
              #       - <URL to GPGKEY2>
         
     | 
| 
       189 
189 
     | 
    
         
             
              def enable_yum_repos_on( suts = hosts )
         
     | 
| 
      
 190 
     | 
    
         
            +
                repo_attrs = [
         
     | 
| 
      
 191 
     | 
    
         
            +
                  :assumeyes,
         
     | 
| 
      
 192 
     | 
    
         
            +
                  :bandwidth,
         
     | 
| 
      
 193 
     | 
    
         
            +
                  :cost,
         
     | 
| 
      
 194 
     | 
    
         
            +
                  :deltarpm_metadata_percentage,
         
     | 
| 
      
 195 
     | 
    
         
            +
                  :deltarpm_percentage,
         
     | 
| 
      
 196 
     | 
    
         
            +
                  :descr,
         
     | 
| 
      
 197 
     | 
    
         
            +
                  :enabled,
         
     | 
| 
      
 198 
     | 
    
         
            +
                  :enablegroups,
         
     | 
| 
      
 199 
     | 
    
         
            +
                  :exclude,
         
     | 
| 
      
 200 
     | 
    
         
            +
                  :failovermethod,
         
     | 
| 
      
 201 
     | 
    
         
            +
                  :gpgcakey,
         
     | 
| 
      
 202 
     | 
    
         
            +
                  :gpgcheck,
         
     | 
| 
      
 203 
     | 
    
         
            +
                  :http_caching,
         
     | 
| 
      
 204 
     | 
    
         
            +
                  :include,
         
     | 
| 
      
 205 
     | 
    
         
            +
                  :includepkgs,
         
     | 
| 
      
 206 
     | 
    
         
            +
                  :keepalive,
         
     | 
| 
      
 207 
     | 
    
         
            +
                  :metadata_expire,
         
     | 
| 
      
 208 
     | 
    
         
            +
                  :metalink,
         
     | 
| 
      
 209 
     | 
    
         
            +
                  :mirrorlist,
         
     | 
| 
      
 210 
     | 
    
         
            +
                  :mirrorlist_expire,
         
     | 
| 
      
 211 
     | 
    
         
            +
                  :priority,
         
     | 
| 
      
 212 
     | 
    
         
            +
                  :protect,
         
     | 
| 
      
 213 
     | 
    
         
            +
                  :provider,
         
     | 
| 
      
 214 
     | 
    
         
            +
                  :proxy,
         
     | 
| 
      
 215 
     | 
    
         
            +
                  :proxy_password,
         
     | 
| 
      
 216 
     | 
    
         
            +
                  :proxy_username,
         
     | 
| 
      
 217 
     | 
    
         
            +
                  :repo_gpgcheck,
         
     | 
| 
      
 218 
     | 
    
         
            +
                  :retries,
         
     | 
| 
      
 219 
     | 
    
         
            +
                  :s3_enabled,
         
     | 
| 
      
 220 
     | 
    
         
            +
                  :skip_if_unavailable,
         
     | 
| 
      
 221 
     | 
    
         
            +
                  :sslcacert,
         
     | 
| 
      
 222 
     | 
    
         
            +
                  :sslclientcert,
         
     | 
| 
      
 223 
     | 
    
         
            +
                  :sslclientkey,
         
     | 
| 
      
 224 
     | 
    
         
            +
                  :sslverify,
         
     | 
| 
      
 225 
     | 
    
         
            +
                  :target,
         
     | 
| 
      
 226 
     | 
    
         
            +
                  :throttle,
         
     | 
| 
      
 227 
     | 
    
         
            +
                  :timeout
         
     | 
| 
      
 228 
     | 
    
         
            +
                ]
         
     | 
| 
      
 229 
     | 
    
         
            +
             
     | 
| 
       190 
230 
     | 
    
         
             
                Array(suts).each do |sut|
         
     | 
| 
       191 
231 
     | 
    
         
             
                  if sut['yum_repos']
         
     | 
| 
       192 
232 
     | 
    
         
             
                    sut['yum_repos'].each_pair do |repo, metadata|
         
     | 
| 
       193 
     | 
    
         
            -
                      repo_manifest =  
     | 
| 
       194 
     | 
    
         
            -
             
     | 
| 
       195 
     | 
    
         
            -
             
     | 
| 
       196 
     | 
    
         
            -
             
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
                       
     | 
| 
      
 233 
     | 
    
         
            +
                      repo_manifest = %(yumrepo { #{repo}:)
         
     | 
| 
      
 234 
     | 
    
         
            +
             
     | 
| 
      
 235 
     | 
    
         
            +
                      repo_manifest_opts = []
         
     | 
| 
      
 236 
     | 
    
         
            +
             
     | 
| 
      
 237 
     | 
    
         
            +
                      # Legacy Support
         
     | 
| 
      
 238 
     | 
    
         
            +
                      urls = !metadata[:url].nil? ? metadata[:url] : metadata[:baseurl]
         
     | 
| 
      
 239 
     | 
    
         
            +
                      if urls
         
     | 
| 
      
 240 
     | 
    
         
            +
                        repo_manifest_opts << 'baseurl => ' + '"' + Array(urls).flatten.join('\n        ').gsub('$','\$') + '"'
         
     | 
| 
      
 241 
     | 
    
         
            +
                      end
         
     | 
| 
      
 242 
     | 
    
         
            +
             
     | 
| 
      
 243 
     | 
    
         
            +
                      # Legacy Support
         
     | 
| 
      
 244 
     | 
    
         
            +
                      gpgkeys = !metadata[:gpgkeys].nil? ? metadata[:gpgkeys] : metadata[:gpgkey]
         
     | 
| 
      
 245 
     | 
    
         
            +
                      if gpgkeys
         
     | 
| 
      
 246 
     | 
    
         
            +
                        repo_manifest_opts << 'gpgkey => ' + '"' + Array(gpgkeys).flatten.join('\n       ').gsub('$','\$') + '"'
         
     | 
| 
      
 247 
     | 
    
         
            +
                      end
         
     | 
| 
      
 248 
     | 
    
         
            +
             
     | 
| 
      
 249 
     | 
    
         
            +
                      repo_attrs.each do |attr|
         
     | 
| 
      
 250 
     | 
    
         
            +
                        if metadata[attr]
         
     | 
| 
      
 251 
     | 
    
         
            +
                          repo_manifest_opts << "#{attr} => '#{metadata[attr]}'"
         
     | 
| 
      
 252 
     | 
    
         
            +
                        end
         
     | 
| 
      
 253 
     | 
    
         
            +
                      end
         
     | 
| 
      
 254 
     | 
    
         
            +
             
     | 
| 
      
 255 
     | 
    
         
            +
                      repo_manifest = repo_manifest + %(\n#{repo_manifest_opts.join(",\n")}) + "\n}"
         
     | 
| 
      
 256 
     | 
    
         
            +
             
     | 
| 
       199 
257 
     | 
    
         
             
                      apply_manifest_on(sut, repo_manifest, :catch_failures => true)
         
     | 
| 
       200 
258 
     | 
    
         
             
                    end
         
     | 
| 
       201 
259 
     | 
    
         
             
                  end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: simp-beaker-helpers
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.5.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Tessmer
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2016-06-17 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: beaker
         
     | 
| 
         @@ -87,4 +87,3 @@ test_files: 
     | 
|
| 
       87 
87 
     | 
    
         
             
            - spec/acceptance/nodesets/default.yml
         
     | 
| 
       88 
88 
     | 
    
         
             
            - spec/acceptance/pki_tests_spec.rb
         
     | 
| 
       89 
89 
     | 
    
         
             
            - spec/spec_helper_acceptance.rb
         
     | 
| 
       90 
     | 
    
         
            -
            has_rdoc: 
         
     |