Changes between Version 14 and Version 15 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
- Timestamp:
- 03/16/15 12:10:39 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
v14 v15 68 68 === (a) Create a starter Ansible playbook === 69 69 70 A playbook is a YAML file containing a list of Ansible commands. To get started creating your Ansible playbook, copy the following into a file called lab.yaml:70 A playbook is a YAML file containing a list of Ansible tasks. To get started creating your Ansible playbook, copy the following into a file called lab.yaml: 71 71 72 72 {{{ … … 104 104 This is a bit trickier: how to get the host's IP address? The IP address visible inside the slicelet (as reported in the variable ''ansible_eth0.ipv4.address'') is a private address -- it is not the control address of the host. There are a number of ways that you could discover the control address, including running '''dig +short''' on the host’s name (see if you can find a variable that contains the host's name; HINT: you need it to SSH into the slicelet) or by running '''curl''' against a webserver that reports the client’s externally visible address. 105 105 106 || [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' The '''ansible''' command-line tool is a good way to try out Ansible commands before putting them in your playbook. ||106 || [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' The '''ansible''' command-line tool is a good way to try out Ansible commands before putting them in your playbook. Look at the examples in part 1 above. || 107 107 108 108 || [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' Usually in an Ansible playbook you reference a variable by surrounding it in double curly brackets: ''{{ ansible_eth0.ipv4.address }}'' ||