ansible-automation/host_credentials.yml.example

47 lines
1.1 KiB
Plaintext
Raw Normal View History

# host_credentials.yml — per-host SSH credentials
#
# Copy this file to host_credentials.yml and fill in your credentials.
# This file is gitignored — never commit the real version.
#
# Match by IP address (most reliable) or by NetBox/UniFi hostname slug.
# Entries are checked in order; first match wins.
#
# Fields (all optional — omit to fall back to the Semaphore template key):
# user : SSH username
# password : SSH password
# port : SSH port (default 22)
# become : true/false — sudo after login (default true)
# --- Default fallback for all hosts (lowest priority) ---
defaults:
user: ubuntu
password: changeme
become: true
# --- Per-subnet defaults ---
subnets:
- cidr: 10.40.40.0/24
user: ubuntu
password: changeme
- cidr: 192.168.1.0/24
user: admin
password: changeme
- cidr: 10.10.20.0/24
user: cisco
password: changeme
# --- Per-host overrides (highest priority) ---
# Keyed by IP address
hosts:
10.40.40.2:
user: ubuntu
password: changeme
192.168.1.190:
user: root
password: changeme
10.40.40.119:
user: semaphore
password: changeme