-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
parted module does not resize partitions #23914
Comments
Thanks for reporting. I tried to find the answer in the tests, but there are none for this module. So i link here the PR to add tests to parted (a start at least) : #24164 |
Sure. I think a safe behaviour would be to extend the partition if the space after is free (this shouldn't do anything to the filesystem, which would have to be resized separately), and to error otherwise. |
My choice was to keep things simple, avoid any manipulation and just provide the parted functionalities as they are. In this situation it would be up to the user to decide what to do. Maybe the behaviour that @kwohlfahrt is looking for should be implemented using LVM: I'm actually finding myself in the same scenario, a template VM with minimal disk plus an additional disk that I partition and add to a volume group. |
LVM is not needed for simple scenarios. In my case there is a single partition ( Looking at the current implementation, the dimensions are only taken into account when creating a partition, it won't modify an existing one. Playbook example:
I came up with this hack instead... Using parted 3.2-15 on Ubuntu 16.04. At least it is idempotent, it also only works when there is a single partition.
|
On RHEL, you need a different
|
Be nice to have the resize functionality in parted instead of using command. Something like:
Of course there would be the need (in my case) for extending the PV and FS but that's another topic altogether since there isn't an ansible module for LVM that I know of can do that atm...one step at the time I suppose till then command it is the Swiss knife. |
Hey, |
Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.
For further information, please see: |
ISSUE TYPE
COMPONENT NAME
parted module
ANSIBLE VERSION
OS / ENVIRONMENT
Debian Stretch
SUMMARY
Partitions are kept unchanged (and an OK result is reported), even if the size of the partition in the play is different to the actual size. This continues from discussions in #22996 and #23411
STEPS TO REPRODUCE
Run the following task:
Then, run the following (note the changed
part_end
):EXPECTED RESULTS
The result after the first play is correct:
After the second, I expect to see:
ACTUAL RESULTS
I see the following output after running the second task, and the partition is not changed.
The text was updated successfully, but these errors were encountered: