Import into git
This commit is contained in:
commit
f02288523b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.idea
|
2
ansible.cfg
Normal file
2
ansible.cfg
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[privilege_escalation]
|
||||||
|
become_ask_pass=True
|
6
localhost.yml
Normal file
6
localhost.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- dwm
|
||||||
|
- ubuntu
|
||||||
|
- docker
|
7
roles/docker/tasks/install-docker-io.yml
Normal file
7
roles/docker/tasks/install-docker-io.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- name: install needed packages
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
pkg:
|
||||||
|
- docker.io
|
4
roles/docker/tasks/main.yml
Normal file
4
roles/docker/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: install-docker-io.yml
|
||||||
|
when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "18.04"
|
||||||
|
|
BIN
roles/dwm/files/usr/share/icons/dwm.png
Normal file
BIN
roles/dwm/files/usr/share/icons/dwm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 178 B |
7
roles/dwm/files/usr/share/xsessions/dwm.desktop
Normal file
7
roles/dwm/files/usr/share/xsessions/dwm.desktop
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Name=Dwm
|
||||||
|
Comment=Dynamic window manager
|
||||||
|
Exec=dwm
|
||||||
|
Icon=dwm
|
||||||
|
Type=XSession
|
41
roles/dwm/tasks/dwm.yml
Normal file
41
roles/dwm/tasks/dwm.yml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
- name: install required packages
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
pkg:
|
||||||
|
- git
|
||||||
|
- make
|
||||||
|
- libx11-dev
|
||||||
|
- libxft-dev
|
||||||
|
- libxinerama-dev
|
||||||
|
- libxcb-res0-dev
|
||||||
|
- libx11-xcb-dev
|
||||||
|
|
||||||
|
- name: checkout
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
mkdir -p ~/src
|
||||||
|
cd ~/src
|
||||||
|
git clone {{ dwm-repo }}
|
||||||
|
|
||||||
|
- name: build dwm
|
||||||
|
make:
|
||||||
|
chdir: ~/src/dwm
|
||||||
|
|
||||||
|
- name: copy xsession
|
||||||
|
become: yes
|
||||||
|
copy:
|
||||||
|
src: usr/share/xsessions/dwm.desktop
|
||||||
|
dest: /usr/share/xsessions/dwm.desktop
|
||||||
|
|
||||||
|
- name: copy icon
|
||||||
|
become: yes
|
||||||
|
copy:
|
||||||
|
src: usr/share/icons/dwm.png
|
||||||
|
dest: /usr/share/icons/dwm.png
|
||||||
|
|
||||||
|
- name: install dwm
|
||||||
|
become: yes
|
||||||
|
make:
|
||||||
|
chdir: ~/src/dwm
|
||||||
|
target: install
|
4
roles/dwm/tasks/main.yml
Normal file
4
roles/dwm/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: setup.yml
|
||||||
|
|
||||||
|
- import_tasks: dwm.yml
|
9
roles/dwm/tasks/setup.yml
Normal file
9
roles/dwm/tasks/setup.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- block:
|
||||||
|
become: yes
|
||||||
|
- name: install git and make
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
pkg:
|
||||||
|
- git
|
||||||
|
- make
|
3
roles/dwm/vars/main.yml
Normal file
3
roles/dwm/vars/main.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
dwm-repo: https://github.com/pgrondek/dwm.git
|
||||||
|
st-repo: https://github.com/pgrondek/stterm.git
|
19
roles/ubuntu/files/etc/default/motd-news
Normal file
19
roles/ubuntu/files/etc/default/motd-news
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Enable/disable the dynamic MOTD news service
|
||||||
|
# This is a useful way to provide dynamic, informative
|
||||||
|
# information pertinent to the users and administrators
|
||||||
|
# of the local system
|
||||||
|
ENABLED=0
|
||||||
|
|
||||||
|
# Configure the source of dynamic MOTD news
|
||||||
|
# White space separated list of 0 to many news services
|
||||||
|
# For security reasons, these must be https
|
||||||
|
# and have a valid certificate
|
||||||
|
# Canonical runs a service at motd.ubuntu.com, and you
|
||||||
|
# can easily run one too
|
||||||
|
URLS="https://motd.ubuntu.com"
|
||||||
|
|
||||||
|
# Specify the time in seconds, you're willing to wait for
|
||||||
|
# dynamic MOTD news
|
||||||
|
# Note that news messages are fetched in the background by
|
||||||
|
# a systemd timer, so this should never block boot or login
|
||||||
|
WAIT=5
|
16
roles/ubuntu/tasks/cleanup.yml
Normal file
16
roles/ubuntu/tasks/cleanup.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
- become: yes
|
||||||
|
block:
|
||||||
|
- name: clean packages
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- snapd
|
||||||
|
- cloud-init
|
||||||
|
- lxd
|
||||||
|
- lxd-client
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: disable ubuntu ads
|
||||||
|
copy:
|
||||||
|
src: etc/default/motd-news
|
||||||
|
dest: /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
|
Loading…
Reference in New Issue
Block a user