1 .. Modifications Copyright © 2017-2018 AT&T Intellectual Property.
3 .. Licensed under the Creative Commons License, Attribution 4.0 Intl.
4 (the "License"); you may not use this documentation except in compliance
5 with the License. You may obtain a copy of the License at
7 .. https://creativecommons.org/licenses/by/4.0/
9 .. Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
16 Ansible JSON Key Value Description
17 -------------------------------------------------------------
19 The following provides the key value pairs that must be contained in the
20 JSON file supporting APPC/SDN-C Ansible action.
22 Table B1. Ansible JSON File key value description
23 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 .. csv-table:: **TOSCA Definition**
26 :file: Ansible JSON File Key Value Description.csv
31 Ansible JSON file example:
37 "PlaybookName": "<VNFCode>/<Version>/ansible/configure/site.yml",
41 "ne_id_vip": "vfdb9904vm001oam001",
42 "floating_ip_address_vip": "1xx.2yy.zzz.109",
46 "ne_id": "vfdb9904vm001oam001",
47 "fixed_ip_address": "1xx.2yy.zzz.109"
50 "ne_id": "vfdb9904vm002oam001",
51 "fixed_ip_address": "1xx.2yy.zzz.110"
60 "ne_id": "vfdb9904vm003rdb001",
61 "fixed_ip_address": "1xx.2yy.zzz.105"
64 "ne_id": "vfdb9904vm004rdb001",
65 "fixed_ip_address": "1xx.2yy.zzz.106"
71 "InventoryNames": "None",
72 "EnvParameters": {"vnf_instance": "$vnf-instance", "Retry": 3, "Wait": 5, "ConfigFile":"config.txt", "healthcheck_type": "$healthcheck_type", "target_vm_list": ["$ne-id1","..."] },
73 "FileParameters": {"config.txt":"db_ip=10.1.1.1, sip_timer=10000"}
76 In the above example, the Ansible Server Rest API code will:
78 #. Process the "FileParameters" dictionary and generate a file named
79 'config.txt' with contents set to the value of the 'config.txt' key.
81 #. Execute the playbook named '<VNFCode>/<Version>/ansible/configure/site.yml'
82 on nodes with listed IP addresses (or FQDNs) respectively while providing
83 the following key value pairs to the playbook: Retry=3, Wait=5,
86 #. If execution time of the playbook exceeds 60 secs (across all hosts),
87 it will be terminated.
89 #. Inventory hosts file to be build with only IP addresses (or FQDNs), IP
90 addresses and VM names, or IP addresses and VNFC names depending on
91 InventoryNames setting in the template(s) passed to Ansible Server as part
92 of the Rest API request. In a later section with Ansible examples, examples
93 of supported inventory hosts file formats are shared.