validateConfig()) return false; $config = array( 'files' => [ '/root/.ssh/authorized_keys.d/sshkey_' . $this->id() . '_' . Util::sanitizeFilename($this->title()) . '.pub' => $this->moduleData['publicKey']], 'destination' => $tgz, 'failOnParentFail' => false, 'parent' => $parent ); // Create config module, which will also check if the pubkey is valid return Taskmanager::submit('MakeTarball', $config); } protected function moduleVersion(): int { return self::VERSION; } protected function validateConfig(): bool { return isset($this->moduleData['publicKey']); } public function setData(string $key, $value): bool { switch ($key) { case 'publicKey': break; default: return false; } $this->moduleData[$key] = $value; return true; } }