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

parted: support fs_type #221

Merged
merged 3 commits into from
Apr 27, 2020
Merged

parted: support fs_type #221

merged 3 commits into from
Apr 27, 2020

Conversation

ilpianista
Copy link
Contributor

@ilpianista ilpianista commented Apr 22, 2020

Closes #135

SUMMARY

Allow to customize the file system type for parted.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

parted

@ilpianista
Copy link
Contributor Author

This has been migrated from ansible/ansible#47879

@ansibullbot ansibullbot added affects_2.10 feature This issue/PR relates to a feature request module module tests tests labels Apr 23, 2020
Copy link
Contributor

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ilpianista thanks for the PR!
In addition, would be also good to see an example with the new parameter in the EXAMPLE block.

plugins/modules/system/parted.py Outdated Show resolved Hide resolved
plugins/modules/system/parted.py Outdated Show resolved Hide resolved
plugins/modules/system/parted.py Outdated Show resolved Hide resolved
plugins/modules/system/parted.py Show resolved Hide resolved
plugins/modules/system/parted.py Outdated Show resolved Hide resolved
@Andersson007
Copy link
Contributor

@ColOfAbRiX hi, as the module's author could you please look

@ansibullbot ansibullbot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review labels Apr 23, 2020
@Andersson007
Copy link
Contributor

if you agree to make the parameter optional, after changing this, feel free to create a new doc pr about part_type, ... and mention me please for reviweing. Thanks for the PR!

@Andersson007
Copy link
Contributor

@ilpianista CI fails because of this line

plugins/modules/system/parted.py:623:29: SyntaxError: f"{fs_type} " if fs_type is not None else '',

this code below should work

>>> f_type = 'ext4'
>>> msg = '%s %s%s %s' % ('one', '%s ' % f_type if f_type is not None else '', 'two', 'three')
>>> print(msg)
one ext4 two three
>>> f_type = None
>>> msg = '%s %s%s %s' % ('one', '%s ' % f_type if f_type is not None else '', 'two', 'three')
>>> print(msg)
one two three

@ansibullbot
Copy link
Collaborator

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

plugins/modules/system/parted.py:623:29: SyntaxError: f"{fs_type} " if fs_type is not None else '',

The test ansible-test sanity --test compile --python 2.6 [explain] failed with 1 error:

plugins/modules/system/parted.py:623:29: SyntaxError: f"{fs_type} " if fs_type is not None else '',

The test ansible-test sanity --test compile --python 3.5 [explain] failed with 1 error:

plugins/modules/system/parted.py:623:29: SyntaxError: f"{fs_type} " if fs_type is not None else '',

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

plugins/modules/system/parted.py:623:29: traceback: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 3.5 [explain] failed with 1 error:

plugins/modules/system/parted.py:623:29: traceback: SyntaxError: invalid syntax

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

plugins/modules/system/parted.py:623:29: traceback: SyntaxError: invalid syntax

click here for bot help

Copy link
Contributor

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
shipit

@Andersson007
Copy link
Contributor

Let's wait @felixfontein 's confirmation

@Andersson007 Andersson007 removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Apr 27, 2020
@Andersson007
Copy link
Contributor

bot_status

@ansibullbot
Copy link
Collaborator

Components

changelogs/fragments/221-parted-fs_type-parameter.yml
support: core
maintainers:

plugins/modules/system/parted.py
support: community
maintainers: ColOfAbRiX MorrisA bcoca d-little flynn1973 gforster marvin-sinister mator molekuul ramooncamacho wtcross

tests/unit/plugins/modules/system/test_parted.py
support: core
maintainers:

Metadata

waiting_on: ansible
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 0
shipit_actors (maintainer or core team member): []
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

@Andersson007 Andersson007 merged commit c2e37d2 into ansible-collections:master Apr 27, 2020
@Andersson007
Copy link
Contributor

merged into master

@Andersson007
Copy link
Contributor

@ilpianista @felixfontein thank you!
@ilpianista feel free to create a PR to improve the documentation in part of those options we discussed (which make sense to be passed only if a partition does not exist). And feel free to mention me there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module module tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parted: add filesystem type parameter
4 participants