Closed chris1984 closed 2 years ago
@pendor If you have time can this get a review? BZ for reference https://bugzilla.redhat.com/show_bug.cgi?id=2088529
Test failures are unrelated, will make a pr to fix them, and will update my commit message to make the redmine check happy once it's reviewed/acked.
@Ron-Lavi here is the pr
What are the changes introduced in this pull request?
When building a VM with Forman in Microsoft Azure, it looks like we hard coded adding
azureuser ALL=(ALL) NOPASSWD:ALL
in the/etc/sudoers.d/waagent
file This no longer is needed since Azure drops in a90-cloud-init-users
in a newly provisioned VM. We can see the contents of that file here:The hard-coded value actually introduced another bug, we were trying to echo that sudo command even if a user didn't put anything in the
script_command
orscript_uri
fields, which would then add the Linux Script VM Extension to the VM when a user didn't ask for it.This PR does two things:
script_command
andscript_uri
we do not create the VM extension for that VM.script_command
andscript_uri
the command would fail inside the script.Considerations taken when implementing this change?
What are the testing steps for this pull request?
script_command
andscript_uri
and verify VM got created without the Linux Script extensionscript_uris
= https://raw.githubusercontent.com/SatelliteQE/robottelo/master/tests/foreman/data/uri.shscript_command
=sudo sh /var/lib/waagent/custom-script/download/0/uri.sh
Hello!
in/var/tmp/hello.txt.