Giter Site home page Giter Site logo

Comments (16)

plygrnd avatar plygrnd commented on June 2, 2024

docker.log

from ansible-nas.

choskeli avatar choskeli commented on June 2, 2024

I'm seeing the same error on a fresh Ubuntu 22.04 machine as well. @davestephens any thoughts?

from ansible-nas.

choskeli avatar choskeli commented on June 2, 2024

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.

choskeli avatar choskeli commented on June 2, 2024

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.

davestephens avatar davestephens commented on June 2, 2024

@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.

choskeli avatar choskeli commented on June 2, 2024

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.

davestephens avatar davestephens commented on June 2, 2024

@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 avatar choskeli commented on June 2, 2024

@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.

davestephens avatar davestephens commented on June 2, 2024

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.

choskeli avatar choskeli commented on June 2, 2024

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.

choskeli avatar choskeli commented on June 2, 2024

I tried following the instructions and ran into the same error

from ansible-nas.

davestephens avatar davestephens commented on June 2, 2024

from ansible-nas.

choskeli avatar choskeli commented on June 2, 2024

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.

TimGeerts avatar TimGeerts commented on June 2, 2024

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.

davestephens avatar davestephens commented on June 2, 2024

@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.

TimGeerts avatar TimGeerts commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.