Move ubuntu to roles
This commit is contained in:
parent
7357ea4392
commit
67021cebc5
@ -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
|
|
||||||
|
8
main.yml
8
main.yml
@ -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
|
||||||
|
|
||||||
|
@ -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
|
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