* See the License for the specific language governing permissions and
* limitations under the License.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*
def callback (Id, Result, Output, Log, returncode):
def callback (Id, Result, Output, Log, returncode):
if key in TestRecord[Id]['Output']['Output']:
data["Results"][key]["Output"] = TestRecord[Id]['Output']['Output'][key]
if key in TestRecord[Id]['Output']['Output']:
data["Results"][key]["Output"] = TestRecord[Id]['Output']['Output'][key]
s = requests.Session()
r = s.post(TestRecord[Id]['CallBack'], data = json.dumps(data),
headers = {'content-type': 'application/json'})
s = requests.Session()
r = s.post(TestRecord[Id]['CallBack'], data = json.dumps(data),
headers = {'content-type': 'application/json'})
def RunAnsible_Playbook (callback, Id, Inventory, Playbook, NodeList, TestRecord,
Path, ArchiveFlag):
def RunAnsible_Playbook (callback, Id, Inventory, Playbook, NodeList, TestRecord,
Path, ArchiveFlag):
# PAP
f = open(playbook_path + "/vars/defaults.yml","a")
#for id, record in TestRecord.items():
# PAP
f = open(playbook_path + "/vars/defaults.yml","a")
#for id, record in TestRecord.items():
f.close()
f = open(playbook_path + "/JsonRequest.txt", "w")
#f.write(str(input_json))
f.close()
f = open(playbook_path + "/JsonRequest.txt", "w")
#f.write(str(input_json))
# Just a debug to dump any records
if 'GetStatus' in input_data['Type']:
cherrypy.log( "******** Dump Records **********")
# Just a debug to dump any records
if 'GetStatus' in input_data['Type']:
cherrypy.log( "******** Dump Records **********")