* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
#str_parameters += ' ' + str(key) + '=\'' + str(envparameters[key]) + '\''
str_parameters += ', ' + str(key) + '=\'' + str(envparameters[key]) + '\''
str_parameters += '"'
#str_parameters += ' ' + str(key) + '=\'' + str(envparameters[key]) + '\''
str_parameters += ', ' + str(key) + '=\'' + str(envparameters[key]) + '\''
str_parameters += '"'
' ansible-playbook -v --timeout ' + str(timeout) + ' --extra-vars ' + str_parameters + ' -i ' + \
inventory_path + ' ' + playbook_path + ' | tee log.file'
else:
' ansible-playbook -v --timeout ' + str(timeout) + ' --extra-vars ' + str_parameters + ' -i ' + \
inventory_path + ' ' + playbook_path + ' | tee log.file'
else:
' ansible-playbook -v --timeout ' + str(timeout) + ' -i ' + inventory_path + ' ' + playbook_path +' | tee log.file'
cherrypy.log("CMD: " + cmd)
' ansible-playbook -v --timeout ' + str(timeout) + ' -i ' + inventory_path + ' ' + playbook_path +' | tee log.file'
cherrypy.log("CMD: " + cmd)
cherrypy.log("PlayBook Start: " + playbookdir )
p = subprocess.Popen(cmd, shell=True,
stdout=subprocess.PIPE,
cherrypy.log("PlayBook Start: " + playbookdir )
p = subprocess.Popen(cmd, shell=True,
stdout=subprocess.PIPE,
stdout_value_cleanup = ''
for line in stdout_value:
stdout_value_cleanup += line.replace(' ', ' ')
stdout_value_cleanup = ''
for line in stdout_value:
stdout_value_cleanup += line.replace(' ', ' ')
cherrypy.log(" ansible-playbook system call timed out")
# ansible-playbook system call timed out
for line in stdout_value: # p.stdout.readlines():
log.append (line)
cherrypy.log(" ansible-playbook system call timed out")
# ansible-playbook system call timed out
for line in stdout_value: # p.stdout.readlines():
log.append (line)
p = Process(nodelist=ansible_call, args=('ansible_module_config', playbook_file, nodelist,d, ))
p.start()
p = Process(nodelist=ansible_call, args=('ansible_module_config', playbook_file, nodelist,d, ))
p.start()