lae / ansible-role-proxmox

IaC for Proxmox VE clusters.
MIT License
496 stars 144 forks source link

fix: set noninteractive for apt upgarde #246

Closed jeschero closed 2 months ago

jeschero commented 3 months ago

Hey,

I have a little fix here that fixes the apt upgrade not waiting for user input anymore. Otherwise it can happen that during apt upgarde apt will ask user something and since these are not answered in ansible, an error is generated.

Regards jeschero

lae commented 3 months ago

Should this be applied to all apt tasks or just the dist-upgrade one?

edv-pi commented 3 months ago

to all apt tasks, theres no reason to use dialog for apt when run through ansible.

lae commented 3 months ago

I am questioning whether this change does what it is intended to do. The apt module already seems to have this set:

https://github.com/ansible/ansible/blob/v2.17.1/lib/ansible/modules/apt.py#L1248

@jeschero Can you provide debug output for whatever playbook run was failing for you prior to making this change?

edv-pi commented 3 months ago

ah lol, nice to know, didnt notice they added that

lae commented 3 months ago

You're right that there's no reason for not using dialog when running apt through ansible, so I assumed that the module itself would already have disabled it in the first place instead of expecting users of the module to provide that env variable. And it has been in ansible for 12 years, apparently.

lae commented 2 months ago

Closing, considering this change seems invalid and the commit was made by a different account than the one opening this PR. Please open a discussion if you're having issues with apt upgrades.