HidingCherry / ansible-archlinux-encrypted-root

ansible script to install a fully encrypted archlinux system
GNU Affero General Public License v3.0
1 stars 0 forks source link

Check for duplicated role tasks #46

Open MartinX3 opened 1 year ago

MartinX3 commented 1 year ago

As example Check for uefi firmware exist twice

HidingCherry commented 1 year ago

Next time give me the source...

here: https://github.com/MartinX3-AdministrativeDevelopment/ansible-archlinux-encrypted-root/blob/main/roles/initial/tasks/00-preparation.yml#L6

and here: https://github.com/MartinX3-AdministrativeDevelopment/ansible-archlinux-encrypted-root/blob/main/roles/install/tasks/60-bootloader.yml#L6

The reason is very simple. You can run each role independently. As such, a task from roles-initial cannot be run in roles-install.

It's not a bug, it's a feature. There are other ways, e.g. to create a "basics"-role and put this single task into one file, then include that file into those files within initial/install role. But - that's too much splitting in my opinion. As long as efivars won't change its behavior, there is no reason to make this more complicated than it is.

I'll let it open for discussion, but I have no intention to change that.