I have the following output of a command output
`
“failed”: false,
“rc”: 0,
“start”: “2018-07-13 18:05:48.354496”,
“stderr”: “”,
“stderr_lines”: ,
“stdout”: “"[2018-07-13 13:25:01]: Updating version file",\n"[2018-07-13 13:25:01]: Backing up host ssh keys",\n"[2018-07-13 13:25:01]: Temporarily moving certain configuration files",\n"[2018-07-13 13:25:02]: Creating temporary AMI",\n"[2018-07-13 13:25:02]: Waiting for AMI to become available (ami-1cc8fb63)",\n"[2018-07-13 13:27:48]: Launching temporary instance with temporary AMI to cleanup configuration files",\n"[2018-07-13 13:28:05]: Temporary instance (i-01a8cf89ab30b8b81) launched, waiting for cleanup to complete",\n"[2018-07-13 13:35:07]: Creating new post-swupgrade ami from temporary instance",\n"[2018-07-13 13:35:08]: Waiting for new AMI (ami-0acdfe75) to be available",\n"[2018-07-13 13:36:54]: Sending updated AMI (ami-0acdfe75) to all nodes",\n"[2018-07-13 13:36:54]: Updated HSNs",\n"[2018-07-13 13:36:54]: Successfully created backup AMI!",\n"[2018-07-13 13:36:54]: Terminating temporary instance i-01a8cf89ab30b8b81",\n"[2018-07-13 13:36:55]: Deleting temporary ami ami-1cc8fb63",\n"[2018-07-13 13:36:55]: Waiting for instance (i-087eb340fe3214dc9) to come back online",\n"[2018-07-13 13:36:55]: Restoring temporarily moved configuration files"”,
“stdout_lines”: [
“"[2018-07-13 13:25:01]: Updating version file",”,
“"[2018-07-13 13:25:01]: Backing up host ssh keys",”,
“"[2018-07-13 13:25:01]: Temporarily moving certain configuration files",”,
“"[2018-07-13 13:25:02]: Creating temporary AMI",”,
“"[2018-07-13 13:25:02]: Waiting for AMI to become available (ami-1ca8fd33)",”,
“"[2018-07-13 13:27:48]: Launching temporary instance with temporary AMI to cleanup configuration files",”,
“"[2018-07-13 13:28:05]: Temporary instance (i-01a8cf899r30b8b81) launched, waiting for cleanup to complete",”,
“"[2018-07-13 13:35:07]: Creating new post-swupgrade ami from temporary instance",”,
“"[2018-07-13 13:35:08]: Waiting for new AMI (ami-0acdfe75) to be available",”,
“"[2018-07-13 13:36:54]: Sending updated AMI (ami-0acdfe75) to all nodes",”,
“"[2018-07-13 13:36:54]: Updated HSNs",”,
“"[2018-07-13 13:36:54]: Successfully created backup AMI!",”,
“"[2018-07-13 13:36:54]: Terminating temporary instance i-01a8cf899r30b8b81",”,
“"[2018-07-13 13:36:55]: Deleting temporary ami ami-1ac4fb6c",”,
“"[2018-07-13 13:36:55]: Waiting for instance (i-017eb340de3210qz9) to come back online",”,
“"[2018-07-13 13:36:55]: Restoring temporarily moved configuration files"”
]
}
}
`
I want to search the ami-1ca8fd33 in stdout_lines and save as a variable.
Is any way to achive this ?