Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml module erroneously matching and changing non-matching xpath #8730

Open
1 task done
dataondeck opened this issue Aug 7, 2024 · 2 comments
Open
1 task done

xml module erroneously matching and changing non-matching xpath #8730

dataondeck opened this issue Aug 7, 2024 · 2 comments
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@dataondeck
Copy link

dataondeck commented Aug 7, 2024

Summary

When I try to use the xml module with xpath to only make changes to matching values in an xml file I get a modification made on an xpath that should not be matching. When run in --check --diff mode it looks like only the matched xpaths will be touched but when actually run the results are different as shared below.

Issue Type

Bug Report

Component Name

xml

Ansible Version

I tested with devel to be sure and was the same issue:

$ ansible --version
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code
and can become unstable at any point.
ansible [core 2.18.0.dev0]
  config file = None
  configured module search path = ['/home/<redacted>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/<redacted>/ansible_bug_report/lib64/python3.11/site-packages/ansible
  ansible collection location = /home/<redacted>/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/tylere/ansible_bug_report/bin/ansible
  python version = 3.11.7 (main, Jul  4 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/home/<redacted>/ansible_bug_report/bin/python)
  jinja version = 3.1.4
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code
and can become unstable at any point.

# /home/<redacted>/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 9.2.0

Configuration

$ ansible-config dump --only-changed
ansible-config dump --only-changed
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code
and can become unstable at any point.
CONFIG_FILE() = None
DEFAULT_TRANSPORT(env: ANSIBLE_TRANSPORT) = local

GALAXY_SERVERS:

OS / Environment

RHEL9

Steps to Reproduce

- name: Modify XML
    xml:
      path: ./local.conf
      namespaces:
        ns: urn:jboss:domain:5.0
        ns2: urn:jboss:domain:datasources:5.0
      xpath: "/ns:server/ns:profile/ns2:subsystem/ns2:datasources/ns2:datasource/ns2:connection-url[text()='{{ item[0] }}']"
      value: "{{ item[1] }}"
    loop: "{{ xml_live | zip(xml_staged) }}"

Expected Results

I expected that the only changes made to the xml would be where matches were found with:
[text()='{{ item[0] }}']

When running in --check mode with --diff this seems to be what will happen:

demo2n taskTesting]$ ansible-playbook xmlModify.yml --check --diff
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Collection community.general does not support Ansible version 2.12.2

PLAY [localhost] ***************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Parse XML for THING Node Entries] *****************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Show Current Entries] ****************************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "xml_live": [
        "jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com",
        "jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com",
        "jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com",
        "jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com"
    ]
}

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Modify XML to add _staged] ***********************************************************************************************************************************************************************************************************
--- before
+++ after
@@ -318,7 +318,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS01-DS" pool-name="RLS01-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>
@@ -345,7 +345,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS01-THING_CHANGES-DS" pool-name="RLS01-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>5</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -318,7 +318,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS01-DS" pool-name="RLS01-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>
@@ -345,7 +345,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS01-THING_CHANGES-DS" pool-name="RLS01-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>5</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -372,7 +372,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-DS" pool-name="RLS02-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>
@@ -399,7 +399,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-THING_CHANGES-DS" pool-name="RLS02-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>5</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com'])
--- before
+++ after
@@ -372,7 +372,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-DS" pool-name="RLS02-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>
@@ -399,7 +399,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-THING_CHANGES-DS" pool-name="RLS02-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>5</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com'])
--- before
+++ after
@@ -426,7 +426,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS01-DS" pool-name="RLS01-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -453,7 +453,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS01-THING_CHANGES-DS" pool-name="RLS01-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -480,7 +480,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-DS" pool-name="RLS02-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>
@@ -507,7 +507,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-THING_CHANGES-DS" pool-name="RLS02-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com'])
--- before
+++ after
@@ -480,7 +480,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-DS" pool-name="RLS02-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>
@@ -507,7 +507,7 @@
           </statement>
         </datasource>
         <datasource jndi-name="java:/RLS02-THING_CHANGES-DS" pool-name="RLS02-THING_CHANGES-DS" statistics-enabled="true">
-          <connection-url>jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com</connection-url>
+          <connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url>
           <driver>oracle</driver>
           <pool>
             <min-pool-size>1</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com'])

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [Update values removing _staged] ******************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [Modify XML to remove _staged] ********************************************************************************************************************************************************************************************************
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com'])

PLAY RECAP *********************************************************************************************************************************************************************************************************************************
localhost                  : ok=7    changed=1    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0

Actual Results

But when actually run it can be seen at first it goes along matching on the fist two connection-url'but then it changes a random </datasource> line before going back to doing connection-url matches. Due to this random match it then continues to add to this mismatched line:

demo2n taskTesting]$ ansible-playbook xmlModify.yml --diff
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Collection community.general does not support Ansible version 2.12.2

PLAY [localhost] ***************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Parse XML for THING Node Entries] *****************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Show Current Entries] ****************************************************************************************************************************************************************************************************************
ok: [localhost] => {
    "xml_live": [
        "jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com",
        "jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com",
        "jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com",
        "jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com",
        "jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com"
    ]
}

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
ok: [localhost]

TASK [Modify XML to add _staged] ***********************************************************************************************************************************************************************************************************
--- before
+++ after
@@ -318,7 +318,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS01-DS" pool-name="RLS01-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>1</min-pool-size>
@@ -345,7 +345,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS01-THING_CHANGES-DS" pool-name="RLS01-THING_CHANGES-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>5</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -532,7 +532,7 @@
                         <prepared-statement-cache-size>32</prepared-statement-cache-size>
                         <share-prepared-statements>true</share-prepared-statements>
                     </statement>
-                </datasource>
+                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url></datasource>
                 <drivers>
                     <driver name="h2" module="com.h2database.h2">
                         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -372,7 +372,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS02-DS" pool-name="RLS02-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>1</min-pool-size>
@@ -399,7 +399,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS02-THING_CHANGES-DS" pool-name="RLS02-THING_CHANGES-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>5</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com'])
--- before
+++ after
@@ -532,7 +532,7 @@
                         <prepared-statement-cache-size>32</prepared-statement-cache-size>
                         <share-prepared-statements>true</share-prepared-statements>
                     </statement>
-                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url></datasource>
+                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url><connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url></datasource>
                 <drivers>
                     <driver name="h2" module="com.h2database.h2">
                         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

changed: [localhost] => (item=['jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com'])
--- before
+++ after
@@ -426,7 +426,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS01-DS" pool-name="RLS01-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>1</min-pool-size>
@@ -453,7 +453,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS01-THING_CHANGES-DS" pool-name="RLS01-THING_CHANGES-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>1</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -532,7 +532,7 @@
                         <prepared-statement-cache-size>32</prepared-statement-cache-size>
                         <share-prepared-statements>true</share-prepared-statements>
                     </statement>
-                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url><connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url></datasource>
+                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url><connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url><connection-url>jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com</connection-url></datasource>
                 <drivers>
                     <driver name="h2" module="com.h2database.h2">
                         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com', 'jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com'])
--- before
+++ after
@@ -480,7 +480,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS02-DS" pool-name="RLS02-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>1</min-pool-size>
@@ -507,7 +507,7 @@
                     </statement>
                 </datasource>
                 <datasource jndi-name="java:/RLS02-THING_CHANGES-DS" pool-name="RLS02-THING_CHANGES-DS" statistics-enabled="true">
-                    <connection-url>jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com</connection-url>
+                    <connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url>
                     <driver>oracle</driver>
                     <pool>
                         <min-pool-size>1</min-pool-size>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com'])
--- before
+++ after
@@ -532,7 +532,7 @@
                         <prepared-statement-cache-size>32</prepared-statement-cache-size>
                         <share-prepared-statements>true</share-prepared-statements>
                     </statement>
-                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url><connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url><connection-url>jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com</connection-url></datasource>
+                <connection-url>jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com</connection-url><connection-url>jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com</connection-url><connection-url>jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com</connection-url><connection-url>jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com</connection-url></datasource>
                 <drivers>
                     <driver name="h2" module="com.h2database.h2">
                         <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

changed: [localhost] => (item=['jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com'])

TASK [set_fact] ****************************************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [Update values removing _staged] ******************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [Modify XML to remove _staged] ********************************************************************************************************************************************************************************************************
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@qahost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@qahost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@qahost02:1521/RLS02.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost01_staged:1521/RLS01.domain.com', 'jdbc:oracle:thin:@devhost01:1521/RLS01.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com'])
skipping: [localhost] => (item=['jdbc:oracle:thin:@devhost02_staged:1521/RLS02.domain.com', 'jdbc:oracle:thin:@devhost02:1521/RLS02.domain.com'])

PLAY RECAP *********************************************************************************************************************************************************************************************************************************
localhost                  : ok=7    changed=1    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants