ansible's People
ansible's Issues
[Wait for update to finish.] 'dict object' has no attribute 'json'
Hi,
thanks for sharing your TrueNAS Update play. I gave it a try and its doing the update from 22.12.0 to 22.12.1 and the reboot.
But when waiting for the reboot, there comes an error up:
TASK [Checks if there is an update available from update server.] ***************************************************************************************************************
ok: [localhost]
TASK [Downloads (if not already in cache) and apply an update.] *****************************************************************************************************************
ok: [localhost]
TASK [Wait for update to finish.] ***********************************************************************************************************************************************
FAILED - RETRYING: Wait for update to finish. (20 retries left).
FAILED - RETRYING: Wait for update to finish. (19 retries left).
FAILED - RETRYING: Wait for update to finish. (18 retries left).
FAILED - RETRYING: Wait for update to finish. (17 retries left).
**fatal: [localhost]: FAILED! => {"msg": "The conditional check 'truenas_reboot_required.json.status == 'REBOOT_REQUIRED'' failed. The error was: error while evaluating conditional (truenas_reboot_required.json.status == 'REBOOT_REQUIRED'): 'dict object' has no attribute 'json'"}**
PLAY RECAP **********************************************************************************************************************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
My assumption would be: its rebooting automatically an then there is no json result anymore, which thows an error at the check
I checked out this and found a hint to solve this there: ansible/ansible#54561 (comment)
Its bringing in a default value, when to original isnt available, so because of this, at "Wait for update to finish."
- until: "truenas_reboot_required.json.status == 'REBOOT_REQUIRED'"
+ until: (truenas_reboot_required.json|default(dict(status=WAITING))).status == 'REBOOT_REQUIRED'
Because my update was done already, could you validate my suggest at your environment?
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.