-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Strip trailing comments from /etc/default/passwd #43931
Conversation
Strip trailling comments from /etc/default/passwd like MINWEEKS=1 #MINWEEKS=2 MAXWEEKS=12 # MAXWEEKS=8 Which otherwise cause failures with "failed to read /etc/default/passwd: too many values to unpack"
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
The test
|
I have validated this failure and that your fix works. Please create a changelog fragment and I'll merge this. See fragments for examples. |
@@ -0,0 +1,3 @@ | |||
--- | |||
bugfixes: | |||
- VMware Strip trailing comments in /etc/default/passwd (https://github.com/ansible/ansible/pull/43931) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the "VMware" string here. Start the summary with - user -
which will help group the changelog entries by module they affect. Here is an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, copy paste error.
Please create a backport PR for this to be included in previous versions. |
|
@tomtastic Can you please backport to |
Yes of course, I forgot about that one |
Thank you! |
* strip additional comments from /etc/default/passwd Strip trailling comments from /etc/default/passwd like MINWEEKS=1 #MINWEEKS=2 MAXWEEKS=12 # MAXWEEKS=8 Which otherwise cause failures with "failed to read /etc/default/passwd: too many values to unpack" * fix carriage return typo in commit * yet another typo in commit * Fix indent problem * add changelog fragment for PR 43931 (cherry picked from commit 5c1e620)
* strip additional comments from /etc/default/passwd Strip trailling comments from /etc/default/passwd like MINWEEKS=1 #MINWEEKS=2 MAXWEEKS=12 # MAXWEEKS=8 Which otherwise cause failures with "failed to read /etc/default/passwd: too many values to unpack" * fix carriage return typo in commit * yet another typo in commit * Fix indent problem * add changelog fragment for PR 43931 (cherry picked from commit 5c1e620)
Hi,
|
SUMMARY
Strip trailling comments from /etc/default/passwd like:
MINWEEKS=1 #MINWEEKS=2
MAXWEEKS=12 # MAXWEEKS=8
Which otherwise cause failures with "failed to read /etc/default/passwd: too many values to unpack"
ISSUE TYPE
COMPONENT NAME
user module
ANSIBLE VERSION
But present in the current 2.6+ releases too.
ADDITIONAL INFORMATION
Example input file
Old code fails with
ValueError: too many values to unpack
Fixed code strips trailing comments