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,20 +1,15 @@
--- ---
all: all:
children: children:
server: docker_cluster:
hosts: hosts:
prusa.lan: node-01.lan:
iron-man.lan: docker_node: node-01
children: node-02.lan:
docker_cluster: docker_node: node-02
hosts: node-03.lan:
node-01.lan: docker_node: node-03
docker_node: node-01 node-x86.lan:
node-02.lan: docker_node: node-x86
docker_node: node-02 ansible_host: 192.168.50.186
node-03.lan: release: bionic
docker_node: node-03
node-x86.lan:
docker_node: node-x86
ansible_host: 192.168.50.186
release: bionic

View File

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

View File

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