in lib/instance_agent/plugins/codedeploy/install_instruction.rb [353:374]
def execute(cleanup_file)
if !@context.role.nil?
raise "The deployment failed because the application specification file specifies a role, but roles are not supported. Remove the role from the AppSpec file, and then try again."
end
args = "-t #{@context.type}"
if (!@context.user.nil?)
args = "-s #{@context.user} " + args
end
if (!@context.range.nil?)
args = args + " -r #{@context.range.get_range}"
end
object = File.realpath(@object)
if !system("semanage fcontext -a #{args} #{object}")
raise "The deployment failed because the application specification file contains an error in the settings for the context parameter. Update the permissions section of the AppSpec file, and then try again. Failed command: semanage fcontext -a #{args} #{object}. Exit code: #{$?}"
end
if !system("restorecon -v #{object}")
raise "The deployment failed because the application specification file contains an error in the settings for the context parameter. Update the permissions section of the AppSpec file, and then try again. Failed command: restorecon -v #{object}. Exit code: #{$?}"
end
cleanup_file.puts("semanage\0#{object}")
end