From 635c8c1bf44bf62ce32c21ffb44e07ed0003de54 Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 6 Nov 2021 15:53:57 -0500 Subject: [PATCH] Move motd configuration to Ubuntu machines and only Ubuntu machines --- inventory/hosts.yml | 3 ++- playbooks/all.yml | 13 ++++--------- playbooks/platforms_ub2004.yml | 12 ++++++++++++ site.yml | 2 ++ 4 files changed, 20 insertions(+), 10 deletions(-) create mode 100755 playbooks/platforms_ub2004.yml diff --git a/inventory/hosts.yml b/inventory/hosts.yml index 8a90fe3..dbe4df3 100644 --- a/inventory/hosts.yml +++ b/inventory/hosts.yml @@ -10,8 +10,9 @@ token: !vault | api_endpoint: "https://netbox.desu.ltd" group_by: - device_roles - - tags - device_types - manufacturers + - platforms + - tags device_query_filters: - has_primary_ip: "true" diff --git a/playbooks/all.yml b/playbooks/all.yml index 79985ab..49d2433 100755 --- a/playbooks/all.yml +++ b/playbooks/all.yml @@ -12,15 +12,6 @@ tags: [ common ] - role: adminuser tags: [ adminuser, common ] - - role: geerlingguy.docker - tags: [ docker, common, skip-pull ] - - role: motd - vars: - motd_watch_services_extra: - - docker - - kubelet - - postgresql - tags: [ motd, common ] - role: willshersystems.sshd vars: sshd: @@ -35,3 +26,7 @@ UsePAM: yes X11Forwarding: no tags: [ sshd, common ] +- hosts: all:!tags_no_docker + roles: + - role: geerlingguy.docker + tags: [ docker, common, skip-pull ] diff --git a/playbooks/platforms_ub2004.yml b/playbooks/platforms_ub2004.yml new file mode 100755 index 0000000..39ebbc8 --- /dev/null +++ b/playbooks/platforms_ub2004.yml @@ -0,0 +1,12 @@ +#!/usr/bin/env ansible-playbook +# vim:ft=ansible: +--- +- hosts: platforms_ub2004 + roles: + - role: motd + vars: + motd_watch_services_extra: + - docker + - kubelet + - postgresql + tags: [ motd, common ] diff --git a/site.yml b/site.yml index dc4350f..4360cfd 100755 --- a/site.yml +++ b/site.yml @@ -3,6 +3,8 @@ --- # Preambulatory system configuration - import_playbook: playbooks/all.yml + # Platform configuration +- import_playbook: playbooks/platforms_ub2004.yml # Manufacturer configuration - import_playbook: playbooks/manufacturers_raspi.yml - import_playbook: playbooks/manufacturers_s76.yml