Open smithjw opened 2 months ago
Another issue with the validation that I run into is differences in indentation ("incorrect indentation on line 4"), and the modification of attributes in profiles.
Many of my profiles have <string />
in the body, which is replaced with <string></string>
.
I can confirm that the data
value's new lines are the issue. I've been able to work around it by removing them (programmatically, prior to apply, so as to preserve the neat formatting in repo).
Indentation, empty values' key style, and trailing new lines are also three annoyances I can confirm (and which I've also programmatically worked around).
@w0de , what steps are you taking ?
@w0de Would love if you can share what you're doing to work around things. In my case I've tried turning validation on/off, modifying the indentation of my profiles, etc. All result in their own issues.
I'm passing fully valid config files that are kept in format by the VS Code XML plugin. At this stage, I'd be happy to go back to the 0.x days of the provider where it didn't even check what the remote profile looked like and simply checked whether the profile had changed from what was available in the state.
Turning validation off and having all profiles reupload every run isn't a great experience :(
Can you define valid? Since what a jamf pro server will accept vs. the post processing it performs are two very different things. the resp is what matters as that is what is compared to your hcl definition and it's this difference that needs to be suppressed within the provider. the reason there is strict validation rules applied up front is because i cannot account for every admins whims for how they want to style an xml file, nor is there any documentation from jamf on the formatting they accept for xml nor the post processing they perform server side once a config profile has been created.
therefore, the plist's should be exports from jamf pro as per the documentation and no other sources.
i've spent today trying to handle for a 3rd time your styling prefs re: tabs and spaces and it's proving very complex and for not a lot of value from my perspective.
im willing to take a look at anything that doesn't work and falls within the guidelines, but outside of that i have limited interest.
When trying to create a Configuration Profile in Jamf Pro that contains a Certificate payload, I consistently receive
plist line count mismatch
errors during planning. In the past these errors have been generated because by default all files within my repo have a blank last line (added by VS Code). Prior to the formatting changes in thejamfpro_macos_configuration_profile_plist
, I was able to mitigate this by wrapping the file object within the resource in achomp()
function but this no longer works as the line discrepancy is often quite large.I believe this could be due to the formatting of the profile placing the
data
value all on one line rather than my formatted block within the mobile config file.And just to confirm, this mobileconfig file example uploads and displays in Jamf without error.
profile.tf
example.mobileconfig