Sha256: 5fe5e2ca14495aa4b95f3aa74f5327c9f19879c73df456cee2e630cafaefcdf5
Contents?: true
Size: 1.55 KB
Versions: 5
Compression:
Stored size: 1.55 KB
Contents
[<< back](README.md) # Example: 05-use Learn how to: * Organize huge amount of groups/targets into several files. * Checking Windows OS infrastructure (host1). 1. [Tree directory](#tree-directory) 2. [Execution section](#execution-section) 3. [Users file](#users-file) 4. [Network file](#network-file) ## Tree directory This example has more files: ```bash $ tree example/learn-04-use example/learn-04-require ├── config.yaml ├── network.rb ├── README.md ├── start.rb └── users.rb ``` * `README.md` and `config.yaml` are the same as previous example. ## Execution section Previous `start.rb` file is now splited in: start.rb, users.rb and network.rb. Let's see current `start.rb` file: ```ruby use 'users' use 'network' play do show export end ``` * `use`, indicates external rb file that will be included/imported into main rb file. It's a good idea to organize project files, when the number of groups/targets is high. ## Users file > Require Windows OS on remote machine. Let's see `users.rb` file ```ruby group "Use file: User configuration" do target "Create user #{gett(:username)}" run "net user", on: :host1 expect get(:username) end ``` ## Network file > Require Windows OS on remote machine. Let's see `network.rb` file: ```ruby group "Use file: Network configuracion" do target "Update computer name with #{gett(:host1_hostname)}" run "hostname", on: :host1 expect_one get(:host1_hostname) target "Ensure DNS Server is working" run "nslookup www.google.es", on: :host1 expect "Nombre:" end ```
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
teuton-2.3.11 | docs/learn/05-use.md |
teuton-2.3.10 | docs/learn/05-use.md |
teuton-2.3.9 | docs/learn/05-use.md |
teuton-2.3.8 | docs/learn/05-use.md |
teuton-2.3.7 | docs/learn/05-use.md |