Comments (13)
Great bug report, thanks.
Maybe we could skip the "is it installed already?" when we test for jinja2 >= 2.10 at the start?
Something like "improved logic only for up2date environments".
I already considered some pre-test tasks for some things like python-version etc
from ansible-rclone.
I guess ansible has a way to issue a warning in that case, so that seems like a fair idea indeed ! (even though it complicates the logic a bit)
But on this specific issue I'm now wondering whether the test (ansible_facts['ansible_local']['rclone']['installed'] is not true) or (ansible_facts['ansible_local']['rclone']['installed_version'] != rclone_version)
could not simply be changed to ansible_facts['ansible_local']['rclone']['installed_version'] != rclone_version
?
I guess it would fail anyway if rclone
is not installed..
(and that would entirely get rid of that issue with Jinja's "is true" test)
from ansible-rclone.
to consider, yes. and to test ;-)
from ansible-rclone.
A quick test in a local branch shows that your suggested test fails at the first run: ansible_facts['ansible_local']['rclone']['installed_version']
has no value/ is not defined yet.
TASK [ansible-rclone : Install the binary] *************************************
fatal: [instance]: FAILED! => {"msg": "The conditional check '(ansible_facts['ansible_local']['rclone']['installed_version'] != rclone_version)' failed. The error was: error while evaluating conditional ((ansible_facts['ansible_local']['rclone']['installed_version'] != rclone_version)): 'dict object' has no attribute 'rclone'\n\nThe error appears to be in '/home/sgw/projects/github/ansible-rclone/tasks/main.yml': line 46, 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: Install the binary\n ^ here\n"}
In the former test that isn't a problem because ansible_facts['ansible_local']['rclone']['installed']
is not true at the first run.
from ansible-rclone.
look at #87 : new test statement, new handling of deploying the fact-checking script etc
Should work with older jinja2 as well.
from ansible-rclone.
For me the latest update still resulted in an error in the named line. I did some experiments and the following line works for me:
when: (ansible_facts.ansible_local.rclone is not defined) or (ansible_facts.ansible_local.rclone.installed != true) or (ansible_facts['ansible_local']['rclone']['installed_version'] != rclone_version)
from ansible-rclone.
@dsteinkopf could you show the error you got? My tests in molecule did not fail. What OS, etc?
thanks for suggesting the test, I have a look at it.
from ansible-rclone.
@dsteinkopf Just to talk about the same code: I think of merging #87 as all the tests succeeded. Please let me know what failed in your runs.
from ansible-rclone.
Oh, I thought #87 has already been released. My mistake. Sorry for the confusion.
#87 "looks" good to me, as is seems to address the problem I am having with the current galaxy version - I'll try it when it is released.
from ansible-rclone.
@dsteinkopf I merged #87 right now with commit 6b7153f
28 tests successful -> role was released to galaxy right now
from ansible-rclone.
New galaxy version works for me. Thank you very much.
from ansible-rclone.
Great to hear. Thanks for reporting and testing @dsteinkopf
from ansible-rclone.
@theenglishway If you also have no more issues with the current release, I will close here. Thanks.
from ansible-rclone.
Related Issues (20)
- Feature Request: Keep existing tokens when configuring rclone.conf using this role HOT 6
- Installing Beta fails with rclone_version HOT 5
- Molecule seems an issue. HOT 42
- Permission issues when using ansible user is non privileged
- New to ansible, help me with my YML? HOT 6
- Unable to set ownership on config directory / file for rclone HOT 6
- lint errors with recent linters
- Request: add semantic versioning tags and releases to project HOT 17
- Add molecule tests for Fedora37
- Config directory mode HOT 1
- Rclone config location HOT 1
- macOS support HOT 2
- Check run fails HOT 1
- ansible-galaxy upgrade breaks things HOT 2
- maintenance todos HOT 5
- semantic versioning
- Config file permissions seem too lenient HOT 3
- fact-checking not correct with centos docker images HOT 1
- Use for Update rclone HOT 3
- rclone_version: "stable" doesn't seem to work? HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-rclone.