Move ubuntu to roles

This commit is contained in:
pgrondek 2020-05-26 00:22:38 +02:00
parent 7357ea4392
commit 67021cebc5
9 changed files with 33 additions and 39 deletions

View File

@ -1,10 +1,5 @@
---
all:
children:
server:
hosts:
prusa.lan:
iron-man.lan:
children:
docker_cluster:
hosts:

View File

@ -1,12 +1,18 @@
---
- hosts: server
- hosts: iron-man.lan
roles:
- ssh
- ubuntu
- hosts: prusa.lan
roles:
- ssh
- octoprint
- ubuntu
- hosts: docker_cluster
roles:
- ssh
- docker-cluster
- ubuntu

View File

@ -1,11 +1,6 @@
---
- name: cleanup ubuntu
hosts: server
become_method: sudo
become_user: root
become: yes
tasks:
- become: yes
block:
- name: clean packages
apt:
pkg:
@ -14,6 +9,7 @@
- lxd
- lxd-client
state: absent
- name: disable ubuntu ads
copy:
src: etc/default/motd-news

View File

@ -0,0 +1,4 @@
---
- import_tasks: cleanup.yml
- import_tasks: timezone.yml

View File

@ -0,0 +1,6 @@
---
- name: set timezone
become: yes
shell:
cmd: |
timedatectl set-timezone {{ timezone }}

View File

@ -0,0 +1,2 @@
---
timezone: Europe/Warsaw

View File

@ -1 +0,0 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwTqV2idle6AQj179tAuAxZzodtTb2aMJKIEnL+tXfdsKsoc8kfQV3JMtq53hk6jRcH/9+FamCBqP/2s1xT4elKAZ7GWYBMi4HqGr8Qr7I1sK2m9dydrmW+iepmhGNDdKlYkEFc8aM9blbCTEN9RqqJiSomzDAIZQWiV2E/18MIxu3WYKJ561uzILkmB9o7UJbdAgOGbk6+GkBIwGCX5CwlX4Ro8wLv/i55/bg03N1lAbsCeDqaZX7ikiy2hnxAFH/EuY2g2WK4x9yUjhUe1MnCZy5SealSP76b9BHyJVYrxGVyAZOtlnewEXzbJXnyHGQg00hXeT8YtTlMSXaQVih pgrondek@farnsworth

View File

@ -1,14 +0,0 @@
---
- name: set timezone
hosts: server
become_method: sudo
become_user: root
become: yes
vars:
timezone: Europe/Warsaw
tasks:
- name: set timezone
shell:
cmd: |
timedatectl set-timezone {{ timezone }}