Sha256: 395418ba18e9fe12c2dd9e45a5340bcc8b17ba6aba39841ef861d219655fda50

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

[<< back](README.md)

# Target weight

* Changing default target weight:

```ruby
# File: network.rb

group "Using file: network" do
  target "Update computer name with #{get(:hostname)}"
  run "hostname", on: :host1
  expect_one get(:hostname)

  target "Ensure DNS Server is working", weight: 2.0
  run "host www.google.es", on: :host1
  expect "www.google.es has address "
end
```

```
❯ teuton check examples/07-target_weight

+--------------------------+
| GROUP: Using file: users |
+--------------------------+
(001) target      Create user get(username)
      weight      1.0
      run         'id get(username)' on host1
      expect      get(username) (String)

+----------------------------+
| GROUP: Using file: network |
+----------------------------+
(002) target      Update computer name with get(hostname)
      weight      1.0
      run         'hostname' on host1
      expect_one  get(hostname) (String)

(003) target      Ensure DNS Server is working
      weight      2.0
      run         'host www.google.es' on host1
      expect      www.google.es has address  (String)
```

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
teuton-2.5.0 docs/learn/07-target_weight.md
teuton-2.4.5 docs/learn/07-target_weight.md
teuton-2.4.4 docs/learn/07-target_weight.md
teuton-2.4.3 docs/learn/07-target_weight.md
teuton-2.4.2 docs/learn/07-target_weight.md