I got this two errors while vagrant up on islandora-playbook repository, do you have any idea about the problem? - vagrant

fatal: [default]: FAILED! => {"msg": "The conditional check 'motomo_sql_dump_create | changed' failed. The error was: No filter named 'changed' found.\n\nThe error appears to be in '/home/oem/islandora-playbook/roles/external/Islandora-Devops.matomo/tasks/console_install.yml': line 12, 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:\n ^ here\n"}
fatal: [default]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Could not find or access 'Ubuntu-20.yml'\nSearched in:\n\t/home/oem/islandora-playbook/roles/external/geerlingguy.java/vars/Ubuntu-20.yml\n\t/home/oem/islandora-playbook/roles/external/geerlingguy.java/Ubuntu-20.yml\n\t/home/oem/islandora-playbook/roles/external/geerlingguy.java/tasks/vars/Ubuntu-20.yml\n\t/home/oem/islandora-playbook/roles/external/geerlingguy.java/tasks/Ubuntu-20.yml\n\t/home/oem/islandora-playbook/vars/Ubuntu-20.yml\n\t/home/oem/islandora-playbook/Ubuntu-20.yml on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}

Probably the wrong place to ask an Islandora question. The Slack channel is the fastest. Ideally I'd suggest to switch to the ISLE (dockerized) version instead of the Ansible version. I know that's not always possible, so this looks like a previously common issue to run into. If I remember correctly it's a Ansible Version issue. The Ansible deployment of Islandora was locked into a very specific version due in part to a lack of interest in that type of build process.

The 1st error relates to changes in Ansible. In your Ansible playbook (...console_install.yml) change motomo_sql_dump_create | changed to motomo_sql_dump_create is changed. I don't know about the 2nd error

Related

How can we hide ...ignoring tasks output from Ansible output?

I am on Ansible 2.9
Is there any way we can Hide/Skip these output from showing? ...ignoring tasks are always flooding the output.
I have tried the below options separately.
export ANSIBLE_DISPLAY_SKIPPED_HOSTS=false
display_skipped_hosts = False
stdout_callback = full_skip
Example Output:
TASK [Load domain based var file if it exists] ****************************************************************************************************************************************************************************************************************
fatal: [example-host1]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Could not find or access 'example.com.yml'\nSearched in:\n\t/home/spidy/my_task/vars/example.com.yml\n\t/home/spidy/my_task/example.com.yml\n\t/home/spidy/my_task/vars/example.com.yml\n\t/home/spidy/my_task/example.com.yml on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
...ignoring
fatal: [example-host2]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Could not find or access 'example.com.yml'\nSearched in:\n\t/home/spidy/my_task/vars/example.com.yml\n\t/home/spidy/my_task/example.com.yml\n\t/home/spidy/my_task/vars/example.com.yml\n\t/home/spidy/my_task/example.com.yml on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
...ignoring
I wish we have some option there to skip these annoying output :(.
Hope someone already came across this in their thoughts!
Because of the message ...ignoring I assume you are using ignore_errors: true to "Ignoring failed commands" completly. Instead of that you may Define failure and what it means by using failed_when: ... and already because of
The ignore_errors directive only works when the task is able to run and returns a value of failed. It does not make Ansible ignore undefined variable errors, connection failures, execution issues ...
Further Q&A
Need to hide failed log in Ansible task
How to avoid having to skip fatal task errors with Ansible?
How to ignore a particular output error string in Ansible and consider successful

Ansible tower/awx 3.8.3 does not appear to be supported on CentOS Stream 8

I would like to ask if ansible tower 3.8.3 is not supported on CentOS Stream 8.
I have an instance of CentOS Stream as shown
cat /etc/redhat-release
CentOS Stream release 8
when I run the setup.sh for ansible-tower-setup-3.8.3-1, I encounter the following error message
TASK [group hosts for supported distributions]
*****************************************************************************************************************************************************************fatal: [localhost]: FAILED! => {"msg": "The conditional check
'ansible_distribution_version is version_compare ('7.7', '>=')'
failed. The error was: Version comparison: '<' not supported between
instances of 'str' and 'int'\n\nThe error appears to be in
'/home/user/downloads/ansible-tower-setup-3.8.3-1/install.yml': line
40, column 7, but may\nbe elsewhere in the file depending on the exact
syntax problem.\n\nThe offending line appears to be:\n\n\n - name:
group hosts for supported distributions\n ^ here\n"}
What version of Ansible Tower is supported on CentOS Stream 8 please?

Hyperledge fabric VS code ansible-playbook

I'm trying to begin to customise my own network on the hyperledger fabric by utilising VS code. So right now, I'm just trying to get the ansible examples to work found here (https://github.com/IBM-Blockchain/ansible-examples/tree/master/two-org-network).
But I keep encountering multiple errors. The third one I have encountered is this:
*TASK [ibm.blockchain_platform_manager : Enroll the user]
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "fabric-ca-client enroll -u 'https://admin:********#localhost:18050' --caname ca -M /Users/.../ansibelFiles/ansible-examples/two-org-network/wallets/Org1/admin --tls.certfiles /Users/.../ansibelFiles/ansible-examples/two-org-network/wallets/Org1/ca-tls-root.pem", "msg": "[Errno 2] No such file or directory: b'fabric-ca-client'", "rc": 2}*
This is the 25th test that Ansible is performing.
Thanks in advance for your help
This error is just saying it cannot find the command fabric-ca-client. So make sure:
you have Hyperledger Fabric binaries installed (installation guide)
it is added to your shell environment export PATH=<path to download location>/bin:$PATH

Close Jira Ticket Using Ansible

I am getting the following error when trying to close a JIRA ticket.
- name: Close the issue
jira: uri={{serverURI}} username={{userName}} password={{password}} issue={{issue.meta.key}} operation=transition status="resolved"
tags: close
Error :-
TASK [Close the issue]
********************************************************* fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg":
"Failed find valid transition for 'Done'"}
How could I solve this issue.
msg": "Failed find valid transition for 'Done'
saying it is unable to find the transition id for the status value "resolved"
Check if resolved defined in the url http://:/rest/api/latest/issue/{issuekey}/transitions
for more info : https://answers.atlassian.com/questions/107630/jira-how-to-change-issue-status-via-rest
Funny enough, Failed find valid transition, did me when username of jira Ansible task had no project permissions for transitions. Be sure to view rest/api/2/issue/{{issue}}/transitions with the same credentials as the tasks 😐

Ansible copy fails

I was trying to copy a test file from a Linux control server to a Windows 7 client. my playbook is
- name: Test Copy from Linux to Windows
hosts: Windows
gather_facts: false
tasks:
- name: Copy
copy: src=/tmp/tmp.txt dest=C:\Ansible
And getting this error
failed: [10.8.0.4] => {"failed": true, "md5sum": "c9566265d534d0e3c666ea52daf96cc8", "parsed": false}
invalid output was: The argument 'C:\Users\me.HOMEPC\AppData\Local\Temp\ansible-tmp-1422383762.86-109261083693479\\copy.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter.
FATAL: all hosts have already failed -- aborting
Any thoughts? How I can make this work?
There's a small bug in that fork version. Use https://gist.github.com/dmitrydigi/dc4843fca7e69bcca147 with the fix. If you use the mentioned version, then template will always report changed=true.
Looks like the copy module doesn't support for file copy function in Windows and atm, a win_copy module is in the dev phase.
However I have found this VERY useful module which is copy.ps1
https://gist.github.com/tkinz27/fd92ba9af0e0309614ee
And then things got working :-)
Important: You gotta upgrade your Windows (7) Powershell to Version 4.0

Resources