Linux/Virtual Server Setup Guide with Ansible: Difference between revisions

From Wiki
mNo edit summary
Line 15: Line 15:
* Write down information required for next steps:
* Write down information required for next steps:
** VM IP
** VM IP
** VM username / password
** VM username
** VM password


== Step 3: Adjust DNS entries ==
== Step 3: Adjust DNS entries ==


* Make sure the desired DNS entries point to the (new?) IP of the VM
* Make sure the desired ipv4 + ipv6 DNS entries point to the (new?) IP of the VM
* Verify that the DNS entry is pointing to the correct ip
* Verify from the local terminal that the DNS entry is pointing to the correct ip
*
<blockquote>
<pre>
nslookup {hostname}
</pre>
</blockquote>


== Step  4: Set up VM with ansible ==
== Step  4: Set up VM with ansible ==

Revision as of 09:17, 21 November 2023

Step 1: Prepare local linux terminal

  • Install Windows Subsystem for Linux / Ubuntu
  • Open local linux terminal
  • Install Ansible:
sudo apt -y install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt install ansible

Step 2: Generate Cloud VM (Hetzner, Netcup,...)

  • Install latest Ubuntu LTS
  • Set username / password
  • Write down information required for next steps:
    • VM IP
    • VM username
    • VM password

Step 3: Adjust DNS entries

  • Make sure the desired ipv4 + ipv6 DNS entries point to the (new?) IP of the VM
  • Verify from the local terminal that the DNS entry is pointing to the correct ip
nslookup {hostname}

Step 4: Set up VM with ansible

  • Open local linux terminal
  • Get repository with Ansible files:
git clone https://{ansible-library}
cd ansible-library
  • edit and adjust ansible.env