main
Alpha Chen 1 year ago
parent 82e7d01f9f
commit 6d20005806
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -14,4 +14,9 @@ ansible all -m ping
# ansible # ansible
rake ansible rake ansible
# manually connect to tailscale
# specific playbooks
rake ansible[playbook]
``` ```

@ -59,7 +59,7 @@ resource "linode_domain_record" "subdomains" {
target = resource.linode_instance.lotus_land_story.ip_address target = resource.linode_instance.lotus_land_story.ip_address
for_each = toset(["rss", "prometheus", "grafana", "loki"]) for_each = toset(["rss", "prometheus", "grafana", "loki"])
name = each.key name = each.key
} }
resource "linode_domain_record" "prometheus" { resource "linode_domain_record" "prometheus" {

@ -3,12 +3,17 @@
vars_files: vars_files:
- vars.yml - vars.yml
tasks: tasks:
- name: Always mount the lotus-land-story volume - name: Always mount the lotus-land-story volume
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
dest: /etc/fstab dest: /etc/fstab
line: "{{ linode_volume }} /mnt/lotus-land-story ext4 defaults,noatime,nofail 0 2" line: "{{ linode_volume }} /mnt/lotus-land-story ext4 defaults,noatime,nofail 0 2"
state: present state: present
- name: Set hostname
ansible.builtin.hostname:
name: lotus-land-story
- name: Install ansible requirements - name: Install ansible requirements
ansible.builtin.apt: ansible.builtin.apt:
pkg: pkg:
@ -18,8 +23,9 @@
- python3-psycopg2 - python3-psycopg2
state: present state: present
- import_playbook: postgres.yml # noqa: name[play] - import_playbook: ../playbooks/tailscale.yml # noqa: name[play]
- import_playbook: docker.yml # noqa: name[play] - import_playbook: postgres.yml # noqa: name[play]
- import_playbook: docker.yml # noqa: name[play]
- name: Set up postgres - name: Set up postgres
hosts: lotus-land-story hosts: lotus-land-story

@ -0,0 +1,29 @@
# https://tailscale.com/download/linux/debian-bullseye
- name: Install Tailscale
hosts: all
become: true
tasks:
# curl -fsSL https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
- name: Download Tailscale package signing key
ansible.builtin.get_url:
url: https://pkgs.tailscale.com/stable/debian/bullseye.noarmor.gpg
dest: /usr/share/keyrings/tailscale-archive-keyring.gpg
# curl -fsSL https://pkgs.tailscale.com/stable/debian/bullseye.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
- name: Add Tailscale repository
ansible.builtin.apt_repository:
repo: deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/debian bullseye main
state: present
# sudo apt-get update
- name: Update apt-get
ansible.builtin.apt:
update_cache: true
# sudo apt-get install tailscale
- name: Install Tailscale
ansible.builtin.package:
name: tailscale
state: present
Loading…
Cancel
Save