| 21 | `omni` comes with a script, `readyToLogin` which finds the login information for nodes in your slice. |
| 22 | |
| 23 | As of `omni` version 2.8, it has an `--ansible-inventory` flag which generates the Ansible inventory, which is a flat file which tells ansible the name and login information for your nodes. |
| 24 | |
| 25 | {{{ |
| 26 | #!div style="background: #ffd; border: 3px ridge; width: 800px;" |
| 27 | On your local machine: |
| 28 | |
| 29 | {{{ |
| 30 | #!python |
| 31 | readyToLogin MYSLICE --useSliceAggregates --ansible-inventory -o |
| 32 | cat inventory |
| 33 | ansible all -m ping -i inventory |
| 34 | }}} |
| 35 | }}} |
| 36 | |
| 37 | {{{ |
| 38 | $ cat inventory |
| 39 | client ansible_ssh_host=pc3.instageni.clemson.edu ansible_ssh_port=33850 |
| 40 | server ansible_ssh_host=pcvm3-6.instageni.clemson.edu |
| 41 | |
| 42 | $ ansible all -m ping -i inventory |
| 43 | client | success >> { |
| 44 | "changed": false, |
| 45 | "ping": "pong" |
| 46 | } |
| 47 | |
| 48 | server | success >> { |
| 49 | "changed": false, |
| 50 | "ping": "pong" |
| 51 | } |
| 52 | }}} |
| 53 | |