Sha256: 38b3d8b872168e6608af525e842ad628e0c2bbc495fb26dfa679f8c267ecd20a

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 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
```

```
+--------------------------+
| GROUP: Using file: users |
+--------------------------+
(001) target      Create user get(username)
      weight      1.0
      run         'id get(username)' on host1
      expect      ["uid=", "(get(username))", "gid="] (Array)

+----------------------------+
| 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

9 entries across 9 versions & 1 rubygems

Version Path
teuton-2.9.2 docs/learn/07-target_weight.md
teuton-2.9.1 docs/learn/07-target_weight.md
teuton-2.9.0 docs/learn/07-target_weight.md
teuton-2.8.0 docs/learn/07-target_weight.md
teuton-2.7.3 docs/learn/07-target_weight.md
teuton-2.7.2 docs/learn/07-target_weight.md
teuton-2.7.1 docs/learn/07-target_weight.md
teuton-2.7.0 docs/learn/07-target_weight.md
teuton-2.6.0 docs/learn/07-target_weight.md