On 20.07.2018 13:29, Sreejith Sreejayan wrote:
> TASK [resweb : debug]
> ********************************************************************************************************************************
> task path: /home/tasks/main.yml:157
> ok: [
lhqqa1rwbws01.qa1.allegiantair.com] => {
> "tomcat.resweb.version": "2.61.1"
> }
>
>
> TASK [resweb : debug]
> ********************************************************************************************************************************
> task path: /home/tasks/main.yml:158
> ok: [
lhqqa1rwbws01.qa1.allegiantair.com] => {
> "tomcat.resweb.build": "d478a03"
> }
> Read vars_file 'vars/versions.yml'
> Read vars_file 'vars/yum_logic.yml'
So tomcat.resweb.version~ '-' ~tomcat.resweb.build would become
2.61.1-d478a03
> TASK [resweb : debug]
> ********************************************************************************************************************************
> task path: /home/tasks/main.yml:159
> ok: [
lhqqa1rwbws01.qa1.allegiantair.com] => {
> "webpage.content": "<!doctype html>\n\n\n\n<html>\n<head>\n \n
> <script type=\"text/javascript\"
> src=\"js/jquery-1.7.1.min.js\"></script>\n <script
> type=\"text/javascript\">\n\n var resWebVersion =
> \"2.62.4-7ca3135
> (Build DateTime: 2018-07-03T05:53:23)\
> Read vars_file 'vars/versions.yml'
> Read vars_file 'vars/yum_logic.yml'
And 2.61.1-d478a03 is not in webpage.content
> On Fri, Jul 20, 2018 at 4:31 PM, Kai Stian Olstad <
>
ansible-pr...@olstad.com> wrote:
>
>
>> On 20.07.2018 12:36, Sreejith Sreejayan wrote:
>>
>>> this is task code
>>> - name: Fail when the version does not match
>>> action: fail
>>> when: tomcat.resweb.version~ '-' ~tomcat.resweb.build not in
>>> webpage.content
>>> register: version_check
So this "Fail when the version does not match" is working since you
version string is not in content.
So what is the problem, since this code is working as it should?
--
Kai Stian Olstad