helpful_ubuntu_commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| helpful_ubuntu_commands [2026/08/18 06:54] – mike | helpful_ubuntu_commands [2026/09/02 19:57] (current) – mike | ||
|---|---|---|---|
| Line 82: | Line 82: | ||
| ==== Ansible/ | ==== Ansible/ | ||
| | | ||
| - | === Generate password hashes (useful for Ansible playbooks amongst other things) === | + | === Generate password hashes (useful for Ansible playbooks, Ansible Vault, |
| mkpasswd --method=sha-512 | mkpasswd --method=sha-512 | ||
| Line 133: | Line 133: | ||
| find the existing IP and change it to the desired IP; ' | find the existing IP and change it to the desired IP; ' | ||
| sudo netplan apply | sudo netplan apply | ||
| + | | ||
| + | Update the /etc/hosts file accordingly | ||
| === Changing the server' | === Changing the server' | ||
| - | cd into / | + | |
| + | 1. Disable cloud-init networking to avoid overwriting the new configuration: | ||
| + | echo " | ||
| + | |||
| + | 2. cd into / | ||
| network: | network: | ||
| Line 151: | Line 157: | ||
| - to: default | - to: default | ||
| via: 192.168.1.1 | via: 192.168.1.1 | ||
| - | | + | |
| + | 3. Execute '' | ||
| + | |||
| === Changing the server' | === Changing the server' | ||
| hostnamectl set-hostname [new host name] | hostnamectl set-hostname [new host name] | ||
helpful_ubuntu_commands.1787061280.txt.gz · Last modified: by mike
