Move ubuntu to roles
This commit is contained in:
parent
7357ea4392
commit
67021cebc5
@ -1,10 +1,5 @@
|
||||
---
|
||||
all:
|
||||
children:
|
||||
server:
|
||||
hosts:
|
||||
prusa.lan:
|
||||
iron-man.lan:
|
||||
children:
|
||||
docker_cluster:
|
||||
hosts:
|
||||
|
8
main.yml
8
main.yml
@ -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
|
||||
|
||||
|
@ -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
|
4
roles/ubuntu/tasks/main.yml
Normal file
4
roles/ubuntu/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
- import_tasks: cleanup.yml
|
||||
|
||||
- import_tasks: timezone.yml
|
6
roles/ubuntu/tasks/timezone.yml
Normal file
6
roles/ubuntu/tasks/timezone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: set timezone
|
||||
become: yes
|
||||
shell:
|
||||
cmd: |
|
||||
timedatectl set-timezone {{ timezone }}
|
2
roles/ubuntu/vars/main.yml
Normal file
2
roles/ubuntu/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
timezone: Europe/Warsaw
|
@ -1 +0,0 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwTqV2idle6AQj179tAuAxZzodtTb2aMJKIEnL+tXfdsKsoc8kfQV3JMtq53hk6jRcH/9+FamCBqP/2s1xT4elKAZ7GWYBMi4HqGr8Qr7I1sK2m9dydrmW+iepmhGNDdKlYkEFc8aM9blbCTEN9RqqJiSomzDAIZQWiV2E/18MIxu3WYKJ561uzILkmB9o7UJbdAgOGbk6+GkBIwGCX5CwlX4Ro8wLv/i55/bg03N1lAbsCeDqaZX7ikiy2hnxAFH/EuY2g2WK4x9yUjhUe1MnCZy5SealSP76b9BHyJVYrxGVyAZOtlnewEXzbJXnyHGQg00hXeT8YtTlMSXaQVih pgrondek@farnsworth
|
@ -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 }}
|
Loading…
Reference in New Issue
Block a user