Closed tonyprinzler closed 2 years ago
Looks like the same issue of evaluating true or false in the code. So, when I fix Issue #18 this one can be fixed as well and can go through the code to find all the occurrences.
sub playbooks cannot be run directly with ansible-playbook command. Because they are based on artifacts defined from the main or other sub playbook called from main. So, that's why you get the error here.
Hi, thats true. This was a mistake by my site. But the error described came up by executing the upgrade yaml.
This will be fixed in #18 as this is a duplicate of the root cause.
Describe the bug After installing Splunk with version 8.2.1 via the ansible deployment, the upgrade to version is going wrong
To Reproduce Steps to reproduce the behavior: config: `---
splunk_config.yml
plugin: splunkenizer
custom: ansible_port: 22 ansible_user: labuser become_user: root
os: packages:
Disable SELinux
disable_selinux: true
Disable AppArmor
disable_apparmor: true
Do not update /etc/hosts file
update_hosts_file: false
virtualbox:
box: "centos/7" # Default
box: "ubuntu/xenial64"
Splunk default settings
splunk_defaults: splunk_env_name: splk splunk_version: '8.2.3' splunk_admin_password: 'splunklab'
splunk_license_file: Splunk_Enterprise.lic
splunk_indexes:
Indexer Cluster settings
splunk_idxclusters:
Splunk hosts with its settings
splunk_hosts:
Cluster Master
name: host-8947 roles:
- license_master
idxcluster: idxc1
Cluster Indexer
name: host-8948 roles:
Cluster Indexer
name: host-8945 roles:
Single Search Head
name: host-8946 roles:
Universal Forwarder
commands tested:
Expected behavior I expected splunk will be upgraded by the playbook Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
TASK [splunk_software : find target version] ************************************************************************************************************************************************************************************************************************************************* fatal: [host-8947]: FAILED! => {"msg": "The conditional check 'find_target_version|default(true) is true' failed. The error was: template error while templating string: no test named 'true'. String: {% if find_target_version|default(true) is true %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/tony/Vagrant/Splunkenizer/ansible/roles/splunk_software/tasks/check_splunk_version.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: find target version\n ^ here\n"} fatal: [host-8948]: FAILED! => {"msg": "The conditional check 'find_target_version|default(true) is true' failed. The error was: template error while templating string: no test named 'true'. String: {% if find_target_version|default(true) is true %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/tony/Vagrant/Splunkenizer/ansible/roles/splunk_software/tasks/check_splunk_version.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: find target version\n ^ here\n"} fatal: [host-8945]: FAILED! => {"msg": "The conditional check 'find_target_version|default(true) is true' failed. The error was: template error while templating string: no test named 'true'. String: {% if find_target_version|default(true) is true %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/tony/Vagrant/Splunkenizer/ansible/roles/splunk_software/tasks/check_splunk_version.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: find target version\n ^ here\n"} fatal: [host-8946]: FAILED! => {"msg": "The conditional check 'find_target_version|default(true) is true' failed. The error was: template error while templating string: no test named 'true'. String: {% if find_target_version|default(true) is true %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/tony/Vagrant/Splunkenizer/ansible/roles/splunk_software/tasks/check_splunk_version.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: find target version\n ^ here\n"} fatal: [host-8959]: FAILED! => {"msg": "The conditional check 'find_target_version|default(true) is true' failed. The error was: template error while templating string: no test named 'true'. String: {% if find_target_version|default(true) is true %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/tony/Vagrant/Splunkenizer/ansible/roles/splunk_software/tasks/check_splunk_version.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: find target version\n ^ here\n"}