Comments (16)
from ansible-nas.
I'm seeing the same error on a fresh Ubuntu 22.04 machine as well. @davestephens any thoughts?
from ansible-nas.
Not sure how it got merged this way, but instead of 'logging_stack_enabled is True' it should be 'logging_stack_enabled' and instead of 'logging_stack_enabled is False' it should be 'not logging_stack_enabled'. Also this issue is there for many of the roles, not just logging_stack.
from ansible-nas.
I wrote a script to change all the conditionals because there are so many. Just put it in the roles directory and run it.
#!/bin/bash
SEARCH_DIR="."
find "$SEARCH_DIR" -type f -name "*.yml" -o -name "*.yaml" | while read -r file; do
sed -i 's/when: \([a-zA-Z0-9_]*\) is true/when: \1/g' "$file"
sed -i 's/when: \([a-zA-Z0-9_]*\) is false/when: not \1/g' "$file"
done
I also had to add these to nas.yml:
route53_enabled: false
speedtest_enabled: false
from ansible-nas.
@choskeli Please can you help me debug this and provide some more info? This makes zero sense, as based on your script above the whole playbook would have been broken for years, which clearly isn't the case. Also, the variables you had to add (to which nas.yml, you don't specify) - are defaults in the role, so again, this doesn't add up.
What command are you running to kick off the playbook, and from what directory are you running it?
What is your ansible version?
from ansible-nas.
Yes this is strange indeed. I'm running ansible-playbook -i inventories/my-ansible-nas/inventory nas.yml -b -K
from /home/user/ansible-nas
ansible --version gives
ansible [core 2.12.10]
config file = /home/user/ansible-nas/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, May 26 2023, 14:05:08) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
from ansible-nas.
@choskeli Are you running against a remote computer, or against the local computer?
What is the root path of the playbook, ie, what's the path of the playbook nas.yml?
from ansible-nas.
@choskeli Are you running against a remote computer, or against the local computer?
What is the root path of the playbook, ie, what's the path of the playbook nas.yml?
Local computer and I cloned into user's home directory so nas.yml is located at /home/user/ansible-nas
from ansible-nas.
Local computer and I cloned into user's home directory so nas.yml is located at
/home/user/ansible-nas
I have literally no idea what effect mashing the ansible-nas repo with your home directory will do, but probably not good.
Can you try again (but this time following the installation instructions) and see how you get on? https://ansible-nas.io/docs/getting-started/installation/.
Also, I'm interested in what command you ran to kick off the playbook.
from ansible-nas.
I believe I did follow the install instructions. When I say I cloned into the users home directory I don't mean I mashed the directories together but rather ran git clone from the users home directory
from ansible-nas.
I tried following the instructions and ran into the same error
from ansible-nas.
from ansible-nas.
Ok, then can you provide the command you started the playbook with. Also if you want to zip up your directory and send me it I can do a bit more digging....
…
On Mon, 13 Nov 2023, 04:28 choskeli, @.> wrote: I tried following the instructions and ran into the same error — Reply to this email directly, view it on GitHub <#668 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFDGMD5QUP5K55MQYSAIVTYEGOYXAVCNFSM6AAAAAA24CUUESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGQ2TSOJSGI . You are receiving this because you modified the open/close state.Message ID: @.>
Just to follow up. I installed Ubuntu 22.04 and made sure to install ansible from PPA and that avoided this issue
from ansible-nas.
I wrote a script to change all the conditionals because there are so many. Just put it in the roles directory and run it.
#!/bin/bash SEARCH_DIR="." find "$SEARCH_DIR" -type f -name "*.yml" -o -name "*.yaml" | while read -r file; do sed -i 's/when: \([a-zA-Z0-9_]*\) is true/when: \1/g' "$file" sed -i 's/when: \([a-zA-Z0-9_]*\) is false/when: not \1/g' "$file" done
I also had to add these to nas.yml:
route53_enabled: false speedtest_enabled: false
Just to chime in here, I've been having a lot of issues lately with ansible-nas, and decided to upgrade all the stuff on my server (updated ubuntu version, ansible version, remapped my local "master" branch to the new ansible-nas "main" branch, etc...)
Still came across this issue when running the playbook.
Only after I added a script as quoted above, to change the conditionals, then my playbook started running again (after some other minor issues I had with docker)
from ansible-nas.
@TimGeerts how have you installed ansible?
It would appear the Ubuntu Ansible breaks something, but the official ansible (installed via Python pip or Ubuntu PPA) works fine.
from ansible-nas.
The issue I was having is that I had a bunch of resources being held by multiple docker services/snaps running (I'm not that linux/docker savvy sadly). So after updating my Ubuntu install to the latest LTS version, and having errors happening with the playbook install, I updated ansible using the following method.
This might be another cause for the "conditional" issue, but at least I finally got to rerun the entire ansible playbook again and have everything up and running (and also the multiple docker issue seems to have been fixed by the ubuntu upgrade too).
Again, it might not be the correct way of going about it, but after spending three hours this morning trying to get my services running again, I'm at least happy with the results. (though obviously having to change all those /roles/.yml files will be annoying for any future git pull commands...)
from ansible-nas.
Related Issues (20)
- Transmission 4.3 curl fatal error pthread_create HOT 2
- wrong version of vaultwarden HOT 5
- Is there any AutoBackup Roles? HOT 1
- Nextcloud Optimization HOT 4
- Make Ansible-NAS more appliance like HOT 2
- Add Photoprism HOT 1
- Wrong loadbalancer port in `hello_world` example? HOT 1
- Add ownCloud Infinite Scale 4.0.0
- Need help getting traefik to update letsencrypt cert HOT 8
- Add kavita
- Error on "Create Gitlab user account" within GitLab tasks when building the playbook - User UID already exists HOT 4
- Volumes documentation HOT 1
- Add Grocy
- Netdata not starting - netdata version compatability issue not ansible nas HOT 1
- Add valheim-docker HOT 1
- Paperless NG has been Archived in favor of Paperless NGX HOT 1
- Traefik IPWhiteList deprecated - IPAllowList
- Error in role `geerlingguy.docker_arm` when applying to Ubuntu 24.04 ARM
- Docker interactions with latest Ubuntu 24.04 HOT 2
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-nas.