UBUNTU Network Set up - Henryisgreat/SYS-265-TechJournal GitHub Wiki
Summary
Netplan
Set up a static IP address using Netplan.
First, install netplan sudo apt-get install netplan
in /etc/netplan/50-cloud-init.yaml
Change the settings to resemble the following:
network: ethernets: ens160: dhcp4: false addresses: [IP separated by commas] gateway4: [default gateway] nameservers: addresses: [IP separated by commas] version: 2
Set the hostname
hostnamectl set-hostname [hostname]
Join Ubuntu to domain
sudo apt-get install ntpdate sudo ntpdate -q your_domain_name sudo ntpdate your_domain_name
To fully add Ubuntu to the domain use
sudo apt-get install samba krb5-config krb5-user winbind libpam-winbind libnss-winbind
FOLATER
ssh-keygen -t rsa -C "username"
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1604
In controller, create the directory /home/deployer/ansible and in inventory.txt you can have your servers that you wish to communicate with in the format shown below
ansible1-henry [webmin] ansible2-henry
to create playbook, create a .yml file in the /roles directory with
Ansible will request a sudo password, to bypass this add -k -K to the end of the ansible-playbook command and it will prompt a playbook