Agent options (--internal-address) in aws node pool

Is it possible to pass --internal-address option to agent to register on node pool created on AWS? I tried to set Use only private IP address in node template but nodes failed to provision (docker install) due to lack of internet conectivity. Problem is when node shuts down and change its public IP address. Setting agent for using internal address will solve this problem.
We run rancher server in our datacentre and was able to create custom cluster from manualy created EC2 machines.
Thank you for your answers.
Best regards, Michal Behun

Is there any way to set this behavior? Maybe ENV variable set beforehead?

Does this resemble your problem?

not exactly. we tried custom nodes created from EC2 VMs and --internal-address aws-local agent parameter set nodes correctly. my problem is when I let rancher to provision nodes automatically via node pool. so I need some way to set this parameter when node pool create EC2 node