Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task ansible:prepare fails if apparmor is not installed #990

Closed
b- opened this issue Oct 22, 2023 · 4 comments
Closed

task ansible:prepare fails if apparmor is not installed #990

b- opened this issue Oct 22, 2023 · 4 comments

Comments

@b-
Copy link
Contributor

b- commented Oct 22, 2023

I'm installing on a bare Debian image that I created using a preseed file, and it doesn't have the AppArmor service installed in the first place. As a result, the ansible:prepare task fails when it gets to that stage.

TASK [System Configuration | Disable apparmor] ***************************************************
fatal: [k3s-worker-02]: FAILED! => {"changed": false, "msg": "Could not find the requested service apparmor: host"}
fatal: [k3s-controller-01]: FAILED! => {"changed": false, "msg": "Could not find the requested service apparmor: host"}

I'm getting around this by commenting out the disable apparmor task in the ansible playbook, but I'm wondering if it would make sense to put a check for if the service exists.

b- added a commit to b-/flux-cluster-template that referenced this issue Oct 22, 2023
@onedr0p
Copy link
Owner

onedr0p commented Oct 22, 2023

Are you using stock debian 12 or some variation? Apparmor has been enabled by default since debian 10.

@b-
Copy link
Contributor Author

b- commented Oct 24, 2023

Are you using stock debian 12 or some variation? Apparmor has been enabled by default since debian 10.

Debian 12, but I installed using a preseed file (I updated this repository for the Debian 12.2 release, which reminds me I should actually commit my changes and open a PR there...)

So I actually was starting with a stock Debian 12.2 ISO (specifically this one), and calling it a "variation" would surely be a stretch, but I wouldn't really say it's "stock," either.

It's similar to what you'd get with debootstrap, but the preseed file drives the Debian Installer rather than directly driving dpkg...

@onedr0p
Copy link
Owner

onedr0p commented Oct 24, 2023

No worries, the readme specifically states to use the full server DVD, not the net-install version. I have merged in your changes as it should help out people in the future that choose to use the net-install version. Hopefully there aren't any more gotchas for you with that 😄 . Thanks 👍🏼

@b-
Copy link
Contributor Author

b- commented Oct 25, 2023

No worries, the readme specifically states to use the full server DVD, not the net-install version. I have merged in your changes as it should help out people in the future that choose to use the net-install version. Hopefully there aren't any more gotchas for you with that 😄 . Thanks 👍🏼

Huh, I didn't realize that was the reason I didn't end up with AppArmor! Thanks for letting me know too!

I'm still trying to wrap my head around it all well enough to really know if there are any issues or not, but so far so good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants