sudo visudo -f /etc/sudoers.d/ubuntu-nopasswd
ubuntu ALL=(ALL) NOPASSWD: ALL

The format is User_Spec ::= User_List Host_List '=' Cmnd_Spec_List, so the first ALL means any host and (ALL) is the Runas_Spec ::= '(' Runas_List? (':' Runas_List)? ')' as part of Cmnd_Spec_List that determines the user and/or the group that a command may be run as.

User_Spec also supports additional entries prefixed by ’:’ like so: (':' Host_List '=' Cmnd_Spec_List)*, but it’s clearer to write separate lines.