Hi,
I am new to ansible. I have installed oracle client, cx_oracle, ansible. But when running a playbook I am getting this below error.
ERROR! A malformed block was encountered while loading tasks: {u'environment': u'{{ oracle_env }}', u'oracle_sql': {u'username': u'{{ user }}', u'service_name': u'{{ service_name }}', u'password': u'{{ password }}', u'port': 1521, u'sql': u'select username from dba_users'}} should be a list or None but is <class 'ansible.parsing.yaml.objects.AnsibleMapping'>
The error appears to be in '/home/ansible/playbook/play4.yml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
hosts: DBServer
^ here
---------------------------Here is the playbook--------------------------
Hi, I am new to ansible. I have installed oracle client, cx_oracle, ansible. But when running a playbook I am getting this below error. ERROR! A malformed block was encountered while loading tasks: {u'environment': u'{{ oracle_env }}', u'oracle_sql': {u'username': u'{{ user }}', u'service_name': u'{{ service_name }}', u'password': u'{{ password }}', u'port': 1521, u'sql': u'select username from dba_users'}} should be a list or None but is <class 'ansible.parsing.yaml.objects.AnsibleMapping'>
The error appears to be in '/home/ansible/playbook/play4.yml': line 1, column 3, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---------------------------Here is the playbook--------------------------
hosts: DBServer
vars: oracle_home: /u01/app/oracle/product/12.2.0.1/dbhome_1 service_name: protegrity set_init_mode: sysdba set_init_user: sys user: tstsch password:
oracle_env:
ORACLE_HOME: "{{ oracle_home }}"
LD_LIBRARY_PATH: "{{ oracle_home }}/lib"
PATH: "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:.:/u01/app/oracle/product/12.2.0.1/dbhome_1/bin"
tasks: oracle_sql: username: "{{ user }}" password: "{{ password }}" port: 1521 service_name: "{{ service_name }}" sql: "select username from dba_users"