#cloud-config users: - name: ubuntu sudo: ALL=(ALL) NOPASSWD:ALL groups: users, admin home: /home/ubuntu shell: /bin/bash ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7uUevS7iVPRPFAmdCAIAk7xg7szJUBhmRhLlNgGg3hQb8Zify0Mvm28yO/BW9XUdgW85pmcmbpyP7Y+pDkWHEFbWBjFdTgmYyoszn08fIsApcVJkauqDLmaz9Fd+FtyZGFJapdgR34nLiT1meklO8/Z/mynSYFuzAWClmRiyZXPok2qQJM/xqZRCudatskYJFobiS/+9pSvohIMT/WLhaBsJStctK1QWWQTuPsfO/6QKFkM378qUeJ74lGBfd7cU0Z3i0B3t9r/bhVu0vsyfQdbiWqL3Bhzl2n/KHaDi2t4mcJwEVIDyzr+6vkSLdu3X09vCcsJPGnLirTHVUGo07 cal-1 ssh_pwauth: false disable_root: false package_update: true packages: - apache2 - curl - wget - php - libapache2-mod-php - php-mysqli - adminer write_files: - content: | path: /var/www/html/info.php permissions: '0644' - content: | connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "select Host, User from mysql.user;"; $result = $conn->query($sql); while($row = $result->fetch_assoc()){ echo($row["Host"] . " / " . $row["User"] . "
"); } ?> path: /var/www/html/db.php permissions: '0644' runcmd: - sudo a2enconf adminer - sudo systemctl restart apache2