Add network infrastructure

Add network group for filtering network hosts
Add network target for auth'ing to network hosts
Update playbooks to filter out network targets
This commit is contained in:
Ethan Paul 2021-09-07 20:31:18 -04:00
parent d05c0cffaa
commit 2814d42148
No known key found for this signature in database
GPG Key ID: 6A337337DF6B5B1A
4 changed files with 19 additions and 7 deletions

View File

@ -7,6 +7,18 @@ all:
ansible_user: ansible ansible_user: ansible
ansible_ssh_common_args: "-o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes" ansible_ssh_common_args: "-o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes"
en1:
vars:
skylab_location: Newton MA
children:
network:
hosts:
core:
ansible_host: core.net.enp.one
ansible_port: 4242
skylab_description: Core Router
skylab_targets: [network]
en2: en2:
vars: vars:
skylab_location: DigitalOcean NYC1 skylab_location: DigitalOcean NYC1

View File

@ -1,6 +1,6 @@
--- ---
- name: Bootstrap remote ansible environment - name: Bootstrap remote ansible environment
hosts: all hosts: all,!network,!network
tags: tags:
- always - always
tasks: tasks:
@ -51,7 +51,7 @@
- name: Configure common server settings - name: Configure common server settings
hosts: all hosts: all,!network
vars_files: vars_files:
- vars/packages.yaml - vars/packages.yaml
tasks: tasks:
@ -104,7 +104,7 @@
- name: Configure SSH - name: Configure SSH
hosts: all hosts: all,!network
handlers: handlers:
- name: restart-sshd - name: restart-sshd
become: true become: true

View File

@ -1,6 +1,6 @@
--- ---
- name: Update system - name: Update system
hosts: all hosts: all,!network
tags: tags:
- packages - packages
vars_files: vars_files:
@ -14,7 +14,7 @@
state: latest state: latest
- name: Update unix accounts - name: Update unix accounts
hosts: all hosts: all,!network
tags: tags:
- accounts - accounts
- access - access

View File

@ -3,13 +3,13 @@ skylab_accounts:
- name: enpaul - name: enpaul
uid: 1300 uid: 1300
fullname: Ethan N. Paul fullname: Ethan N. Paul
targets: [cloud] targets: [cloud, network]
admin: true admin: true
password: $y$j9T$cWkd9aGj4sNepyJm5NVZl0$yBhFy3cN3syM8r4doGYnsLZhsaTLQVoDIBs2kkXtxY2 password: $y$j9T$cWkd9aGj4sNepyJm5NVZl0$yBhFy3cN3syM8r4doGYnsLZhsaTLQVoDIBs2kkXtxY2
- name: ansible - name: ansible
uid: 1400 uid: 1400
targets: [cloud] targets: [cloud, network]
admin: true admin: true
service: true service: true
password: $y$j9T$w/pIBtZIMo3PmXccZ.LHi1$AbMVIks.P10CyuK8tWt21O4JuLpKGpWTFgX0WlTbiw6 password: $y$j9T$w/pIBtZIMo3PmXccZ.LHi1$AbMVIks.P10CyuK8tWt21O4JuLpKGpWTFgX0WlTbiw6