But there is no role that let you opt-out of public directory. The only way is creating a custom role and maintaining it, which isn't currently an option, unfortunately.
By default all posts and published items are sent to your 'Friends' privacy group. New friends are added to this privacy group. You can over-ride this and create a public post or public item if you desire. You are NOT listed in the directory. Only your connections can see your other connections. Your online presence is hidden.
Social - Private:
// Configure how we communicate with directory servers.// DIRECTORY_MODE_NORMAL = directory client, we will find a directory// DIRECTORY_MODE_SECONDARY = caching directory or mirror// DIRECTORY_MODE_PRIMARY = main directory server// DIRECTORY_MODE_STANDALONE = "off the grid" or private directory servicesApp::$config['system']['directory_mode'] = DIRECTORY_MODE_STANDALONE;
util/config | grep -i directoryutil/config system directory_modeconfig[system][directory_mode] = DIRECTORY_MODE_SECONDARY
util/config system directory_mode DIRECTORY_MODE_STANDALONE
directory