Import into git

This commit is contained in:
pgrondek 2020-07-01 13:45:11 +02:00
commit f02288523b
16 changed files with 131 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

2
ansible.cfg Normal file
View File

@ -0,0 +1,2 @@
[privilege_escalation]
become_ask_pass=True

6
localhost.yml Normal file
View File

@ -0,0 +1,6 @@
---
- hosts: localhost
roles:
- dwm
- ubuntu
- docker

View File

@ -0,0 +1,7 @@
---
- name: install needed packages
become: yes
apt:
update_cache: yes
pkg:
- docker.io

View File

@ -0,0 +1,4 @@
---
- import_tasks: install-docker-io.yml
when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "18.04"

Binary file not shown.

After

(image error) Size: 178 B

View 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
View 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
View File

@ -0,0 +1,4 @@
---
- import_tasks: setup.yml
- import_tasks: dwm.yml

View 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
View File

@ -0,0 +1,3 @@
---
dwm-repo: https://github.com/pgrondek/dwm.git
st-repo: https://github.com/pgrondek/stterm.git

View 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

View 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

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