Keeping a persistant static IP in ESP8266

I have a project where I will be deploining 20+ ESP8266 modules. I want to do OTA updates of them so that I can change the code from time to time. The code will be identical in all but I need to have a known name and IP for each.

I have tried setting the IP and name using code like that below and everything goes fine. Now I want to remove the code that sets the IP address and name and just have it retain that. If I leave or remove the wifi.begin (when I remove the wifi.begin, there is no wifi code at all) it seems to come up in DHCP mode. Is there a way to specify that stuff and have it retained and used in the module so that I can put in subsequent code with no specific IP address or station name, but have those retained. If so, it looks easy to set up a script to flash all the modules OTA with the same code.

IPAddress staticIP(192, 168, 16, 50); //ESP static ip
IPAddress gateway(192, 168, 16, 1); //IP Address of your WiFi Router (Gateway)
IPAddress subnet(255, 255, 255, 0); //Subnet mask
IPAddress dns(8, 8, 8, 8); //DNS
const char* deviceName = "Grainbeltbeer";
WiFi.begin(ssid, password);
WiFi.disconnect(); //Prevent connecting to wifi based on previous configuration

WiFi.mode(WIFI_STA);
WiFi.hostname(deviceName); // DHCP Hostname (useful for finding device for static lease)
WiFi.config(staticIP, subnet, gateway, dns);
WiFi.begin(ssid, password);
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("Connection Failed! Rebooting...");
delay(5000);
ESP.restart();
}

the static IP settings are not remembered by the SDK in system area of the flash. the remembered connection always uses DHCP. if you want to use static IP address, you have to code the persistence, set autoconnect to false and handle the WiFi connection initialization.
other options is to assign IP addresses to MAC addresses on DHCP server.

Thanks. You confirmed what I thought I was finding as far as keeping the static IP address. I liike your idea of the address reservations. I should have thought of that, but didn't.