Files
ansible/playbooks/archlinux-servers.yml
T

37 lines
876 B
YAML
Raw Normal View History

2026-09-09 16:50:19 -04:00
# code: language=ansible
2026-09-08 16:56:50 -04:00
- name: Configure ssh and firewall
hosts:
2026-09-11 01:34:44 -04:00
# - archlinux_servers
2026-09-11 18:25:20 -04:00
- ch02.balsillie.house
2026-09-08 16:56:50 -04:00
gather_facts: false
become: true
pre_tasks:
2026-09-09 16:50:19 -04:00
- name: Set IPv4 facts
2026-09-08 16:56:50 -04:00
become: false
ansible.builtin.set_fact:
2026-09-09 16:50:19 -04:00
ipv4_address: "{{ query('community.dns.lookup', inventory_hostname, type='A', nxdomain_handling='fail') | first }}"
- name: Set IPv6 facts
become: false
when:
- not (ipv4_only | default(false))
ansible.builtin.set_fact:
ipv6_address: "{{ query('community.dns.lookup', inventory_hostname, type='AAAA', nxdomain_handling='fail') | first }}"
2026-09-08 16:56:50 -04:00
- name: Install basic utilities
community.general.pacman:
name:
- nano
- curl
state: present
update_cache: true
roles:
2026-09-09 16:50:19 -04:00
# - hostname
2026-09-11 01:34:44 -04:00
# - sudoers
2026-09-09 16:50:19 -04:00
# - sshd
2026-09-11 01:34:44 -04:00
- podman