mirror of
https://github.com/roles-ansible/ansible_role_i3wm.git
synced 2024-08-16 10:09:53 +02:00
commit
0d1b31471a
70 changed files with 69 additions and 972 deletions
9
.github/dependabot.yml
vendored
Normal file
9
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
18
.github/workflows/ansible-archlinux-latest.yml
vendored
18
.github/workflows/ansible-archlinux-latest.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check archlinux:latest
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with archlinux:latest'
|
||||
uses: roles-ansible/check-ansible-archlinux-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-bullseye.yml
vendored
18
.github/workflows/ansible-debian-bullseye.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check debian:bullseye
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with debian:bullseye'
|
||||
uses: roles-ansible/check-ansible-debian-bullseye-action@main
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-buster.yml
vendored
18
.github/workflows/ansible-debian-buster.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check debian:buster
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with debian:buster'
|
||||
uses: roles-ansible/check-ansible-debian-buster-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-latest.yml
vendored
18
.github/workflows/ansible-debian-latest.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check debian:latest
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with debian:latest'
|
||||
uses: roles-ansible/check-ansible-debian-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-sid.yml
vendored
18
.github/workflows/ansible-debian-sid.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check debian:sid
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with debian:sid'
|
||||
uses: roles-ansible/check-ansible-debian-sid-action@master
|
||||
with:
|
||||
targets: "./"
|
23
.github/workflows/ansible-debian-stable.yml
vendored
23
.github/workflows/ansible-debian-stable.yml
vendored
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
name: Ansible check debian:stable
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
push:
|
||||
branches: '*'
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with debian:stable'
|
||||
uses: roles-ansible/check-ansible-debian-stable-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-debian-stretch.yml
vendored
18
.github/workflows/ansible-debian-stretch.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check debian:stretch
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with debian:stretch'
|
||||
uses: roles-ansible/check-ansible-debian-stretch-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-fedora-latest.yml
vendored
18
.github/workflows/ansible-fedora-latest.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check fedora:latest
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with fedora:latest'
|
||||
uses: roles-ansible/check-ansible-fedora-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
5
.github/workflows/ansible-linting-check.yml
vendored
5
.github/workflows/ansible-linting-check.yml
vendored
|
@ -10,11 +10,14 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
- name: 'Checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 'Lint Ansible Playbook'
|
||||
uses: ansible/ansible-lint-action@v6
|
||||
|
|
18
.github/workflows/ansible-ubuntu-bionic.yml
vendored
18
.github/workflows/ansible-ubuntu-bionic.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check ubuntu:bionic
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'ansible check with ubuntu:bionic'
|
||||
uses: roles-ansible/check-ansible-ubuntu-bionic-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-ubuntu-latest.yml
vendored
18
.github/workflows/ansible-ubuntu-latest.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check ubuntu:latest
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: ansible check with ubuntu:latest
|
||||
uses: roles-ansible/check-ansible-ubuntu-latest-action@master
|
||||
with:
|
||||
targets: "./"
|
18
.github/workflows/ansible-ubuntu-trusty.yml
vendored
18
.github/workflows/ansible-ubuntu-trusty.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
name: Ansible check ubuntu:trusty
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 'checkout git repo'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: ansible check with ubuntu:trusty
|
||||
uses: roles-ansible/check-ansible-ubuntu-trusty-action@master
|
||||
with:
|
||||
targets: "./"
|
2
.github/workflows/galaxy.yml
vendored
2
.github/workflows/galaxy.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'release on galaxy'
|
||||
uses: robertdebock/galaxy-action@1.2.0
|
||||
uses: robertdebock/galaxy-action@1.2.1
|
||||
with:
|
||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||
git_branch: 'main'
|
||||
|
|
2
.github/workflows/yamllint.yaml
vendored
2
.github/workflows/yamllint.yaml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Yamllint'
|
||||
uses: karancode/yamllint-github-action@v2.0.0
|
||||
uses: karancode/yamllint-github-action@v2.1.1
|
||||
with:
|
||||
yamllint_file_or_dir: '.'
|
||||
yamllint_config_filepath: './.yamllint'
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
---
|
||||
galaxy_info:
|
||||
role_name: i3wm
|
||||
author: do1jlr
|
||||
author: l3d
|
||||
description: Install and configure i3wm on common linux distibutions (https://i3wm.org/)
|
||||
license: "MIT"
|
||||
min_ansible_version: 2.11
|
||||
min_ansible_version: '2.13'
|
||||
github_branch: main
|
||||
platforms:
|
||||
- name: Archlinux
|
||||
versions: all
|
||||
- name: ArchLinux
|
||||
versions: ['all']
|
||||
- name: Debian
|
||||
versions: all
|
||||
versions: ['all']
|
||||
- name: Ubuntu
|
||||
versions: all
|
||||
versions: ['all']
|
||||
- name: Fedora
|
||||
versions: all
|
||||
versions: ['all']
|
||||
galaxy_tags:
|
||||
- i3wm
|
||||
- desktop
|
||||
- linux
|
||||
- xorg
|
||||
- wayland
|
||||
- linux
|
||||
dependencies: []
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# Molecule managed
|
||||
|
||||
FROM {{ item.image }}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi
|
|
@ -1,16 +0,0 @@
|
|||
*******
|
||||
Install
|
||||
*******
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
* Docker Engine
|
||||
* docker-py
|
||||
|
||||
Install
|
||||
=======
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo pip install docker-py
|
|
@ -1,59 +0,0 @@
|
|||
---
|
||||
- name: Create
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
|
||||
vars:
|
||||
molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
|
||||
molecule_ephemeral_directory: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}"
|
||||
molecule_scenario_directory: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
|
||||
molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}"
|
||||
tasks:
|
||||
- name: Create Dockerfiles from image names
|
||||
template:
|
||||
src: "{{ molecule_scenario_directory }}/Dockerfile.j2"
|
||||
dest: "{{ molecule_ephemeral_directory }}/Dockerfile_{{ item.image | regex_replace('[^a-zA-Z0-9_]', '_') }}"
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
register: platforms
|
||||
|
||||
- name: Discover local Docker images
|
||||
docker_image_facts:
|
||||
name: "molecule_local/{{ item.item.name }}"
|
||||
with_items: "{{ platforms.results }}"
|
||||
register: docker_images
|
||||
|
||||
- name: Build an Ansible compatible image
|
||||
docker_image:
|
||||
path: "{{ molecule_ephemeral_directory }}"
|
||||
name: "molecule_local/{{ item.item.image }}"
|
||||
dockerfile: "{{ item.item.dockerfile | default(item.invocation.module_args.dest) }}"
|
||||
force: "{{ item.item.force | default(true) }}"
|
||||
with_items: "{{ platforms.results }}"
|
||||
when: platforms.changed or docker_images.results | map(attribute='images') | select('equalto', []) | list | count >= 0
|
||||
|
||||
- name: Create molecule instance(s)
|
||||
docker_container:
|
||||
name: "{{ item.name }}"
|
||||
hostname: "{{ item.name }}"
|
||||
image: "molecule_local/{{ item.image }}"
|
||||
state: started
|
||||
recreate: false
|
||||
log_driver: syslog
|
||||
command: "{{ item.command | default('bash -c \"while true; do sleep 10000; done\"') }}"
|
||||
privileged: "{{ item.privileged | default(omit) }}"
|
||||
volumes: "{{ item.volumes | default(omit) }}"
|
||||
capabilities: "{{ item.capabilities | default(omit) }}"
|
||||
ports: "{{ item.exposed_ports | default(omit) }}"
|
||||
register: server
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
async: 7200
|
||||
poll: 0
|
||||
|
||||
- name: Wait for instance(s) creation to complete
|
||||
async_status:
|
||||
jid: "{{ item.ansible_job_id }}"
|
||||
register: docker_jobs
|
||||
until: docker_jobs.finished
|
||||
retries: 300
|
||||
with_items: "{{ server.results }}"
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
- name: Destroy
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
|
||||
vars:
|
||||
molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
|
||||
molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}"
|
||||
tasks:
|
||||
- name: Destroy molecule instance(s)
|
||||
docker_container:
|
||||
name: "{{ item.name }}"
|
||||
state: absent
|
||||
force_kill: "{{ item.force_kill | default(true) }}"
|
||||
register: server
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
async: 7200
|
||||
poll: 0
|
||||
|
||||
- name: Wait for instance(s) deletion to complete
|
||||
async_status:
|
||||
jid: "{{ item.ansible_job_id }}"
|
||||
register: docker_jobs
|
||||
until: docker_jobs.finished
|
||||
retries: 300
|
||||
with_items: "{{ server.results }}"
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: debian_stretch_default
|
||||
image: debian:stretch
|
||||
# - name: debian_jessie_default
|
||||
# image: debian:jessie
|
||||
- name: ubuntu_xenial_default
|
||||
image: ubuntu:xenial
|
||||
# - name: ubuntu_trusty_default
|
||||
# image: ubuntu:trusty
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
- lint
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- converge
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
|
@ -1,50 +0,0 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
|
||||
vars:
|
||||
i3_desktop_background: "~/wallpaper.jpg"
|
||||
|
||||
i3_packages_extra:
|
||||
- ranger
|
||||
|
||||
i3_keybindings_extra:
|
||||
- keybinding:
|
||||
name: Volume (mute/unmute)
|
||||
key: $mod+F12
|
||||
exec: --no-startup-id amixer sset Master toggle
|
||||
- keybinding:
|
||||
name: Volue (default)
|
||||
key: $mod+Shift+F12
|
||||
exec: --no-startup-id amixer sset Master 40%
|
||||
|
||||
i3_monitors:
|
||||
- monitor:
|
||||
id: 1
|
||||
output: "VGA-1"
|
||||
mode: "1920x1080"
|
||||
pos: "0x0"
|
||||
rotate: "normal"
|
||||
workspaces: [1, 2, 3, 4, 5, 6]
|
||||
- monitor:
|
||||
id: 2
|
||||
output: "HDMI-1"
|
||||
mode: "1920x1080"
|
||||
pos: "1920x0"
|
||||
rotate: "normal"
|
||||
workspaces: [7, 8, 9, 0]
|
||||
|
||||
i3_applications:
|
||||
- application:
|
||||
class: "Firefox"
|
||||
name: "firefox"
|
||||
workspace: 1
|
||||
on_startup: false
|
||||
- application:
|
||||
class: "Code"
|
||||
name: "code"
|
||||
workspace: 7
|
||||
on_startup: true
|
||||
|
||||
roles:
|
||||
- role: i3
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
- name: Prepare
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks: []
|
Binary file not shown.
|
@ -1,14 +0,0 @@
|
|||
import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_hosts_file(host):
|
||||
f = host.file('/etc/hosts')
|
||||
|
||||
assert f.exists
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
Binary file not shown.
|
@ -1,9 +0,0 @@
|
|||
# Molecule managed
|
||||
|
||||
FROM {{ item.image }}
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum update -y && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper update -y && zypper install -y python sudo bash python-xml && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; fi
|
|
@ -1,16 +0,0 @@
|
|||
*******
|
||||
Install
|
||||
*******
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
* Docker Engine
|
||||
* docker-py
|
||||
|
||||
Install
|
||||
=======
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ sudo pip install docker-py
|
|
@ -1,59 +0,0 @@
|
|||
---
|
||||
- name: Create
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
|
||||
vars:
|
||||
molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
|
||||
molecule_ephemeral_directory: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}"
|
||||
molecule_scenario_directory: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
|
||||
molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}"
|
||||
tasks:
|
||||
- name: Create Dockerfiles from image names
|
||||
template:
|
||||
src: "{{ molecule_scenario_directory }}/Dockerfile.j2"
|
||||
dest: "{{ molecule_ephemeral_directory }}/Dockerfile_{{ item.image | regex_replace('[^a-zA-Z0-9_]', '_') }}"
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
register: platforms
|
||||
|
||||
- name: Discover local Docker images
|
||||
docker_image_facts:
|
||||
name: "molecule_local/{{ item.item.name }}"
|
||||
with_items: "{{ platforms.results }}"
|
||||
register: docker_images
|
||||
|
||||
- name: Build an Ansible compatible image
|
||||
docker_image:
|
||||
path: "{{ molecule_ephemeral_directory }}"
|
||||
name: "molecule_local/{{ item.item.image }}"
|
||||
dockerfile: "{{ item.item.dockerfile | default(item.invocation.module_args.dest) }}"
|
||||
force: "{{ item.item.force | default(true) }}"
|
||||
with_items: "{{ platforms.results }}"
|
||||
when: platforms.changed or docker_images.results | map(attribute='images') | select('equalto', []) | list | count >= 0
|
||||
|
||||
- name: Create molecule instance(s)
|
||||
docker_container:
|
||||
name: "{{ item.name }}"
|
||||
hostname: "{{ item.name }}"
|
||||
image: "molecule_local/{{ item.image }}"
|
||||
state: started
|
||||
recreate: false
|
||||
log_driver: syslog
|
||||
command: "{{ item.command | default('bash -c \"while true; do sleep 10000; done\"') }}"
|
||||
privileged: "{{ item.privileged | default(omit) }}"
|
||||
volumes: "{{ item.volumes | default(omit) }}"
|
||||
capabilities: "{{ item.capabilities | default(omit) }}"
|
||||
ports: "{{ item.exposed_ports | default(omit) }}"
|
||||
register: server
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
async: 7200
|
||||
poll: 0
|
||||
|
||||
- name: Wait for instance(s) creation to complete
|
||||
async_status:
|
||||
jid: "{{ item.ansible_job_id }}"
|
||||
register: docker_jobs
|
||||
until: docker_jobs.finished
|
||||
retries: 300
|
||||
with_items: "{{ server.results }}"
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
- name: Destroy
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}"
|
||||
vars:
|
||||
molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}"
|
||||
molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}"
|
||||
tasks:
|
||||
- name: Destroy molecule instance(s)
|
||||
docker_container:
|
||||
name: "{{ item.name }}"
|
||||
state: absent
|
||||
force_kill: "{{ item.force_kill | default(true) }}"
|
||||
register: server
|
||||
with_items: "{{ molecule_yml.platforms }}"
|
||||
async: 7200
|
||||
poll: 0
|
||||
|
||||
- name: Wait for instance(s) deletion to complete
|
||||
async_status:
|
||||
jid: "{{ item.ansible_job_id }}"
|
||||
register: docker_jobs
|
||||
until: docker_jobs.finished
|
||||
retries: 300
|
||||
with_items: "{{ server.results }}"
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
platforms:
|
||||
- name: debian_stretch_empty_vars
|
||||
image: debian:stretch
|
||||
- name: ubuntu_xenial_empty_vars
|
||||
image: ubuntu:xenial
|
||||
provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
scenario:
|
||||
name: no_vars
|
||||
test_sequence:
|
||||
- lint
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- converge
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
|
||||
roles:
|
||||
- role: i3
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
- name: Prepare
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks: []
|
Binary file not shown.
|
@ -1,14 +0,0 @@
|
|||
import os
|
||||
|
||||
import testinfra.utils.ansible_runner
|
||||
|
||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_hosts_file(host):
|
||||
f = host.file('/etc/hosts')
|
||||
|
||||
assert f.exists
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
Binary file not shown.
|
@ -8,7 +8,7 @@
|
|||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: create i3 config folder
|
||||
- name: Create i3 config folder
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: '/home/{{ i3wm_user }}/.config/i3/'
|
||||
|
@ -17,7 +17,7 @@
|
|||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: copy multiple images
|
||||
- name: Copy multiple images
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
|
@ -29,7 +29,7 @@
|
|||
- { src: 'files/lockscreen.png', dest: '/home/{{ i3wm_user }}/.config/lockscreen.png' }
|
||||
when: i3wm_copy_wallpapers | bool
|
||||
|
||||
- name: copy and validate i3wm config file
|
||||
- name: Copy and validate i3wm config file
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: templates/config.j2
|
||||
|
@ -41,7 +41,7 @@
|
|||
group: "{{ i3wm_user }}"
|
||||
|
||||
# todo: rewrite user stuff and support multiple users
|
||||
- name: mkdir ~/.config/i3blocks/
|
||||
- name: Mkdir ~/.config/i3blocks/
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "/home/{{ i3wm_user }}/.config/i3blocks/"
|
||||
|
@ -50,7 +50,7 @@
|
|||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: copy i3blocks config
|
||||
- name: Copy i3blocks config
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: "files/i3blocks/config"
|
||||
|
@ -59,7 +59,7 @@
|
|||
owner: "{{ i3wm_user }}"
|
||||
group: "{{ i3wm_user }}"
|
||||
|
||||
- name: copy i3blocks config
|
||||
- name: Copy i3blocks config
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
src: "files/i3blocks/{{ item }}"
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
---
|
||||
- name: run optional versionscheck
|
||||
- name: Run optional versionscheck
|
||||
ansible.builtin.include_tasks: versioncheck.yml
|
||||
when: submodules_versioncheck|bool
|
||||
when: submodules_versionchecki | bool
|
||||
|
||||
- name: register variables
|
||||
- name: Register variables
|
||||
ansible.builtin.import_tasks: variables.yml
|
||||
|
||||
- name: ensure i3 packages are installed [Debian]
|
||||
- name: Ensure i3 packages are installed [Debian]
|
||||
ansible.builtin.include_tasks: setup-Debian.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: ensure i3 packages are installed [Archlinux}
|
||||
- name: Ensure i3 packages are installed [Archlinux}
|
||||
ansible.builtin.include_tasks: setup-Archlinux.yml
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
- name: ensure i3 packages are installed [RHEL].
|
||||
- name: Ensure i3 packages are installed [RHEL].
|
||||
ansible.builtin.include_tasks: setup-RedHat.yml
|
||||
when: ansible_os_family == 'Fedora' or ansible_os_family == 'RedHat'
|
||||
|
||||
- name: create i3 config file
|
||||
- name: Create i3 config file
|
||||
ansible.builtin.include_tasks: config.yml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: ensure i3 packages are installed.
|
||||
ansible.builtin.pacman:
|
||||
- name: Ensure i3 packages are installed.
|
||||
community.general.pacman:
|
||||
name: "{{ i3_packages }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
---
|
||||
- name: ensure i3 packages are installed.
|
||||
- name: Update apt cache
|
||||
become: true
|
||||
ansible.builtin.apt:
|
||||
cache_valid_time: 3600
|
||||
update_cache: true
|
||||
when:
|
||||
- ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: Ensure i3 packages are installed.
|
||||
ansible.builtin.apt:
|
||||
name: "{{ i3_packages }}"
|
||||
state: "present"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: ensure i3 packages are installed.
|
||||
- name: Ensure i3 packages are installed.
|
||||
ansible.builtin.dnf:
|
||||
name: "{{ i3_packages }}"
|
||||
state: present
|
||||
|
|
|
@ -1,45 +1,42 @@
|
|||
---
|
||||
- name: register os-specific variables
|
||||
- name: Register OS-specific Variables
|
||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
|
||||
when: ansible_distribution != "Fedora"
|
||||
|
||||
- name: register Fedora variables
|
||||
- name: Register Fedora-specific variables
|
||||
ansible.builtin.include_vars: "{{ ansible_distribution }}.yml"
|
||||
when: ansible_distribution == "Fedora"
|
||||
|
||||
# i3 packages
|
||||
- name: define i3_packages
|
||||
- name: Define i3_packages
|
||||
ansible.builtin.set_fact:
|
||||
i3_packages: "{{ __i3_packages | list }}"
|
||||
when: i3_packages is not defined
|
||||
|
||||
- name: define i3_packages_extra
|
||||
- name: Define i3_packages_extra
|
||||
ansible.builtin.set_fact:
|
||||
i3_packages: "{{ i3_packages | list + i3_packages_extra | list }}"
|
||||
when: i3_packages_extra is defined
|
||||
|
||||
# i3 workspaces
|
||||
- name: define i3_packages
|
||||
- name: Define i3_packages
|
||||
ansible.builtin.set_fact:
|
||||
i3_workspaces: "{{ __i3_workspaces | list }}"
|
||||
when: i3_workspaces is not defined
|
||||
|
||||
# i3 keybindings
|
||||
- name: define i3_packages
|
||||
- name: Define i3_keybindings
|
||||
ansible.builtin.set_fact:
|
||||
i3_keybindings: "{{ __i3_keybindings | list }}"
|
||||
when:
|
||||
- i3_keybindings is not defined
|
||||
- __i3_keybindings is defined
|
||||
|
||||
- name: define extra i3 keybindings
|
||||
- name: Define additional i3 keybindings
|
||||
ansible.builtin.set_fact:
|
||||
i3_keybindings: "{{ i3_keybindings_extra | list + i3_keybindings | list }}"
|
||||
when:
|
||||
- i3_keybindings_extra is defined
|
||||
- i3_keybindings is defined
|
||||
|
||||
- name: define extra i3 keybindings
|
||||
- name: Finalize i3 keybindings definition
|
||||
ansible.builtin.set_fact:
|
||||
i3_keybindings: "{{ i3_keybindings_extra | list }}"
|
||||
when:
|
||||
|
|
|
@ -8,37 +8,38 @@
|
|||
path: '/etc/.ansible-version'
|
||||
state: directory
|
||||
mode: 0755
|
||||
when: submodules_versioncheck|bool
|
||||
when: submodules_versioncheck | bool
|
||||
|
||||
- name: check playbook version
|
||||
- name: Check playbook version
|
||||
become: true
|
||||
ansible.builtin.slurp:
|
||||
src: "/etc/.ansible-version/{{ playbook_version_path }}"
|
||||
register: playbook_version
|
||||
when: submodules_versioncheck|bool
|
||||
register: i3wm_playbook_version
|
||||
when: submodules_versioncheck | bool
|
||||
ignore_errors: true
|
||||
failed_when: false
|
||||
|
||||
- name: Print remote role version
|
||||
ansible.builtin.debug:
|
||||
msg: "Remote role version: {{ playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
|
||||
when: submodules_versioncheck|bool
|
||||
msg: "Remote role version: {{ i3wm_playbook_version.content | default('Y3VycmVudGx5IG5vdCBkZXBsb3llZAo=') | b64decode | string }}"
|
||||
when: submodules_versioncheck | bool
|
||||
|
||||
- name: Print locale role version
|
||||
ansible.builtin.debug:
|
||||
msg: "Local role version: '{{ playbook_version_number|string }}'."
|
||||
when: submodules_versioncheck|bool
|
||||
msg: "Local role version: '{{ playbook_version_number | string }}'."
|
||||
when: submodules_versioncheck | bool
|
||||
|
||||
- name: Check if your version is outdated
|
||||
ansible.builtin.fail:
|
||||
msg: "Your ansible module has the version '{{ playbook_version_number }}' and is outdated. You need to update it!"
|
||||
when:
|
||||
- playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck|bool
|
||||
- i3wm_playbook_version.content|default("Mgo=")|b64decode|int - 1 >= playbook_version_number|int and submodules_versioncheck | bool
|
||||
|
||||
- name: write new version to remote disk
|
||||
- name: Write new version to remote disk
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
content: "{{ playbook_version_number }}"
|
||||
dest: "/etc/.ansible-version/{{ playbook_version_path }}"
|
||||
mode: '0644'
|
||||
when: submodules_versioncheck|bool
|
||||
when: submodules_versioncheck | bool
|
||||
tags: skip_ansible_lint_template-instead-of-copy
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
1.5:0f088850-bf54-474c-8c3e-1757635022f1
|
|
@ -1 +0,0 @@
|
|||
1514602261
|
|
@ -1 +0,0 @@
|
|||
1000
|
|
@ -1 +0,0 @@
|
|||
0f088850-bf54-474c-8c3e-1757635022f1
|
|
@ -1 +0,0 @@
|
|||
62683cf08f3445f5b4d94e256a9b1fb6
|
|
@ -1,27 +0,0 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEowIBAAKCAQEAogF7HrxBOB46/Vif7FTfFP/+UI5jr+rHI5IHV63Dyu4cb/Lj
|
||||
8w+jxsB8OcssKPv0xMTkmjZEwrU8hEd3ZThUjpkKaPo/AovlYNOEN5tDeRnmwOYI
|
||||
236gvj8Gt6J+rFqROESPwsUCqcgVgm9CM6Uvz9bSguxw3CFNMaEOIj3V7sp09Cdu
|
||||
lUbewS35P2120N3gveJTfYbUdv6uJN8mkuPiIFZkSTfrnFq+lSCFMXC7dvRej8QO
|
||||
toV4w4tPEvhaydclI5+Jzy8+7fxippMyoel3LYeMCumyss6t2ULphwqa2JTU4++M
|
||||
jx/5c3YydVsclQ4kZHrbFo2Qc3iusqsnN0vgRwIDAQABAoIBAG/lefamrJ1oM/Jc
|
||||
zkjb7iGBF1TopG4TSWyGJlAnEv8NK9Me/tcZTFOxC5yXem7saAmovQTOyvt5Vs0+
|
||||
13awS6caiZgskGzf15TjQ4Vs1lPE0h8WQ7PnaHs+6RLZR4kgHQGySWGL1eUS79hh
|
||||
pGYriDST+l63lNRWpAzNYwe/kg4V6xAwCx8VMldkQyfsg927h3EdunuCRekrL2PQ
|
||||
rbV0EtjguMHMYmQodfNgvtSzmsGwyPcFzc12A32GPdVasEzt0Nfg3dTCtna4Ytdh
|
||||
zT2xqINEXFaTimNXE9zCZ79yOhU4u1OMUlWJJ8N+s6d7AoOIstVwtUxRwm2z4vzu
|
||||
VVKtKQECgYEAzWaeXwCcCwZM5Hy7/fzePQay1HxSsNtFR0sMCyIBs35Gj8SMpgeQ
|
||||
CaA5lN+IY2VxI2d/wsRB/mftStZfHAQTMPOdvubAKBt5cLvYiHXXt5ZDCLXU4lBh
|
||||
FwUMgRDWTwt/nC8ouA4uwwdZXlG26J1K1BqLkbbXuJnlfQU74MifpQcCgYEAyeoz
|
||||
EV9vsmS1kJ0wJ8uZFo06CkfEqXcAtsSmdFJHBG04PByrhQKAvoEEj5SvTl4c3RL8
|
||||
kci7HpVtylmHa9CT+WdRrAUaoom4j6vtZANskus5P+QwDnn4GIshlO/mCdyQHI08
|
||||
VwKF4yLn3UzPNQcpW9BYTedbLpLhRPgixEK0WsECgYEAm3fR5ayrb7jMGKHFFWEB
|
||||
wgVA9I5JdK3zSRwnuIF78iVhOU6W+tB8mJybGPD85ecRdK/RR1WPcgWt2VhbUvRO
|
||||
pl2vB6DWz0TEbazxH5C6v63PfVdMFCSs6GSc61AYNmpIo6oaUv4BLQNyBG8rV/Q+
|
||||
gD67Z4aSz5pE1pVQljqkg58CgYAJg4+EcgrBTR2BAucR+PXtqhniAh+yHHlcI0f0
|
||||
kyvleX/81Rz/125Zi5q7aTYZazXQ9OQRunOWrVPPBQjse5d9WPDwOg1XO0YG/wLg
|
||||
g4jKI2s/J3FcPUMDZQrgCa29KTdhIQaG0web/DkQpF3fEcdRHDAM+6nAOAuFRGve
|
||||
84WsAQKBgGVDq2zYykg92VrauW1kS7hsQtNQAfQT4a0oVrcaiWUcO/8JHRpv+yAy
|
||||
68tE8U0bhR1oTzDojCFryCj+YJgSKdzzGd9fUreN29YGudkp7gF1AJ+UbenOcaZe
|
||||
fTDeEXhYTN3+GeV1yNOS5Y+u3+Iy6WQLgZSLIeiHPd+SxZRCdXWv
|
||||
-----END RSA PRIVATE KEY-----
|
|
@ -1 +0,0 @@
|
|||
{"rsync":{"/vagrant":{"type":"rsync","guestpath":"/vagrant","hostpath":"/home/owe/workspace/private/ansible/i3/tests","disabled":false,"__vagrantfile":true,"owner":"vagrant","group":"vagrant"}}}
|
|
@ -1 +0,0 @@
|
|||
1.5:297c8844-ecdf-472a-beb7-07f31a0fa84b
|
|
@ -1 +0,0 @@
|
|||
1514602561
|
|
@ -1 +0,0 @@
|
|||
1000
|
|
@ -1 +0,0 @@
|
|||
297c8844-ecdf-472a-beb7-07f31a0fa84b
|
|
@ -1 +0,0 @@
|
|||
7a8b283b91ff4dbfa3bad0a5c7cde793
|
|
@ -1,27 +0,0 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEA4hhlpOQsFNNy6VIjD84ov2wUTNriFwKtzpYJvlgIV5JcXDaz
|
||||
FLGKAK/4pQWFrGqNuYk85GRNUXskonZFgVG13vfp2Tpna7kmUrPJ0JRbDEKVXsiR
|
||||
uz2qtCkGTZtx2IUaY/eNHluBbfWlYx1bIJ9onHktA/usKwZUyejv0U2LVwmMhUEI
|
||||
AthSfJiq7VnrFNuhSitjF6P5W7KKQXNvsZbvQF7An+klj1AJWnwXGjVKu5kRFn14
|
||||
APlry/3eFfu9IoIgW9Wd0SmZA9XkV1pYV0pm5Sydj2jkZpGRZB26ZyxN///+V6md
|
||||
1bdi5b7B9YLQ2EDJxRDrBodV06QlTE16n1crowIDAQABAoIBAHjogRrP5n7woOgD
|
||||
Q7rFDedoPebnuraBeT8b33QKEdP68idiHRx44QsDD933+Qc+KDJLIOQme26SgwHa
|
||||
a8r/TlpBi63eXMYvyj255bgETjhdNxHsAnr2PF6B/dvsv9IBRB6nmLDeUHXkQqCh
|
||||
Z0Un2kKrTpZttSGBDkC3r9/nLxfIgvx/563HMAqDXvCQ3NucfrVKS/c0C7vmXZ4d
|
||||
G49VWFV34er7x08X9DO4kgBKewwANTQ7uLVeHNJn0IknQA3jhna6S2xkPE74dgOn
|
||||
TIO2eip6reiZZxZY8JnhHkUffNMTGuICKoPs/iqtSIQosJczl4oaf/MPmf33zrH8
|
||||
AVnkC9ECgYEA+dCZGGSOo4aontaj5LHmEaFD6IJooIg7grUMiGuNLXPQIhWj9nEm
|
||||
HSg4ASZQJZOe6pGrV1BYhFRlI4m3r09CYwBMIoAFeVm8rgRc9d8VQ027+Fo97q9Z
|
||||
pvxdFgO5009xpfx5+Zz+GhNivw6isniaUt264Qkq8HHL6n0A4wM/kjsCgYEA57F1
|
||||
GlR0hKmjsLIQaE6R4cc9Ww96vjSMS90cc4YMRa7IUIWgd0l4V2J2amaZ4JmiCPnv
|
||||
HL6w4o4GJJR2iKJkdOrPDkVNlCtaVsqvmvg39Z4UtzYQYZFwgPlJ+PcaBb2rB7bE
|
||||
7xHjs2z4UYRHM4VY6iunkjqL52mPRIxTnd7UjbkCgYEAwcroeNvJK2IS/OVVTtwS
|
||||
tip8G6rOr3n/cG4ywsFsS45EL6zJ/SvZfVTt3TZzhjL2XNGUMa/Kex1dOCxlqkG6
|
||||
JkLczQazOGg8zmHkG3hrbkKnRwn6cWbmDXxIWgOZ7Cr85t7tYI5BMMlJGR2paPnV
|
||||
/eK0Tk5mWRBuOAGw5mpmrnECgYBNEOrZqjPjmKWY9XGdsFy309TlwB1cvQ/ZgB+h
|
||||
kXnth7ibiAcbBnYf4uFufNg8K/4IrFHLpuYhRYpninZu9k0h0qSyo3yth0oSSnLk
|
||||
wiGi8kUDt9j1CzJ3w/PF+zNNq4wDEdkpiDLMELf8LVqdmYI8ye6AJjc47xS3gVGi
|
||||
1mavCQKBgQCjqCAb8pJFeuxea6+02CBKuN4uKRKZYIF/QH4Ep/lhCiYGBrQeDX1g
|
||||
XZV9gL5n8T/uQdTxfRuR28paz0OwFsELIWTuYdAc0qe8smuF64sqEhSF1mKfX42T
|
||||
M1n43ssU58AYJNYR8Vl44oQZ0eAI94nnl9jeK8ELzbqsZ/ojGU/B/A==
|
||||
-----END RSA PRIVATE KEY-----
|
|
@ -1 +0,0 @@
|
|||
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/owe/workspace/private/ansible/i3/tests","disabled":false,"__vagrantfile":true}}}
|
|
@ -1,8 +0,0 @@
|
|||
# Generated by Vagrant
|
||||
|
||||
xenial ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 ansible_ssh_user='ubuntu' ansible_ssh_private_key_file='/home/owe/workspace/private/ansible/i3/tests/.vagrant/machines/xenial/virtualbox/private_key'
|
||||
debian ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='/home/owe/workspace/private/ansible/i3/tests/.vagrant/machines/debian/virtualbox/private_key'
|
||||
|
||||
[all]
|
||||
debian
|
||||
xenial
|
30
tests/Vagrantfile
vendored
30
tests/Vagrantfile
vendored
|
@ -1,30 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
config.vm.define "debian" do |web|
|
||||
web.vm.box = "debian/stretch64"
|
||||
|
||||
web.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = "512"
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "xenial" do |web|
|
||||
web.vm.box = "ubuntu/xenial64"
|
||||
|
||||
web.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = "512"
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision :ansible do |ansible|
|
||||
ansible.playbook = "playbook.yml"
|
||||
ansible.groups = {
|
||||
"all" => ["debian", "xenial"]
|
||||
}
|
||||
ansible.raw_arguments = ["-u vagrant"]
|
||||
end
|
||||
|
||||
end
|
|
@ -1,52 +0,0 @@
|
|||
---
|
||||
- hosts: all
|
||||
i3wm_user: vagrant
|
||||
|
||||
vars:
|
||||
|
||||
desktop_env:
|
||||
background: "~/Bilder/bg/background.jpg"
|
||||
|
||||
i3_packages_extra:
|
||||
- ranger
|
||||
|
||||
i3_keybindings_extra:
|
||||
- keybinding:
|
||||
name: Volume (mute/unmute)
|
||||
key: $mod+F12
|
||||
exec: --no-startup-id amixer sset Master toggle
|
||||
- keybinding:
|
||||
name: Volue (default)
|
||||
key: $mod+Shift+F12
|
||||
exec: --no-startup-id amixer sset Master 40%
|
||||
|
||||
i3_monitors:
|
||||
- monitor:
|
||||
id: 1
|
||||
output: "VGA-1"
|
||||
mode: "1920x1080"
|
||||
pos: "0x0"
|
||||
rotate: "normal"
|
||||
workspaces: [1, 2, 3, 4, 5, 6]
|
||||
- monitor:
|
||||
id: 2
|
||||
output: "HDMI-1"
|
||||
mode: "1920x1080"
|
||||
pos: "1920x0"
|
||||
rotate: "normal"
|
||||
workspaces: [7, 8, 9, 0]
|
||||
|
||||
i3_applications:
|
||||
- application:
|
||||
class: "Firefox"
|
||||
name: "firefox"
|
||||
workspace: 1
|
||||
on_startup: false
|
||||
- application:
|
||||
class: "Code"
|
||||
name: "code"
|
||||
workspace: 7
|
||||
on_startup: true
|
||||
|
||||
roles:
|
||||
- i3
|
|
@ -1,18 +0,0 @@
|
|||
FROM debian:stretch
|
||||
|
||||
RUN apt-get update -y && apt-get install -y --no-install-recommends \
|
||||
software-properties-common \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
python-dev \
|
||||
python-pip \
|
||||
git \
|
||||
systemd \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --upgrade setuptools && pip install ansible
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||
|
||||
ENTRYPOINT ["/bin/systemd"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM fedora:24
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf -y install systemd && \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||
rm -f /etc/systemd/system/*.wants/*;\
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf -y install python2 python-pip libffi-devel redhat-rpm-config python-devel openssl-devel sudo git @development-tools
|
||||
|
||||
RUN pip install ansible
|
||||
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM fedora:25
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf -y install systemd && \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||
rm -f /etc/systemd/system/*.wants/*;\
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf -y install python2 python-pip libffi-devel redhat-rpm-config python-devel openssl-devel sudo git @development-tools
|
||||
|
||||
RUN pip install ansible
|
||||
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM fedora:26
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf -y install systemd && \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||
rm -f /etc/systemd/system/*.wants/*;\
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf -y install python2 python-pip libffi-devel redhat-rpm-config python-devel openssl-devel sudo git @development-tools
|
||||
|
||||
RUN pip install ansible
|
||||
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM fedora:27
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf -y install systemd && \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||
rm -f /etc/systemd/system/*.wants/*;\
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf -y install python2 python-pip libffi-devel redhat-rpm-config python-devel openssl-devel sudo git @development-tools
|
||||
|
||||
RUN pip install ansible
|
||||
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM fedora:28
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf -y install systemd && \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||
rm -f /etc/systemd/system/*.wants/*;\
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf -y install python2 python-pip libffi-devel redhat-rpm-config python-devel openssl-devel sudo git @development-tools
|
||||
|
||||
RUN pip install ansible
|
||||
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -1,25 +0,0 @@
|
|||
FROM fedora:29
|
||||
|
||||
RUN dnf -y update
|
||||
|
||||
RUN dnf -y install systemd && \
|
||||
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||
rm -f /etc/systemd/system/*.wants/*;\
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf -y install python2 python-pip libffi-devel redhat-rpm-config python-devel openssl-devel sudo git @development-tools
|
||||
|
||||
RUN pip install ansible
|
||||
|
||||
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
|
||||
|
||||
RUN mkdir -p /etc/ansible && echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
|
@ -1,12 +0,0 @@
|
|||
FROM ubuntu:bionic
|
||||
|
||||
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y software-properties-common systemd && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-add-repository -y ppa:ansible/ansible && apt-get update && apt-get install -y \
|
||||
git \
|
||||
ansible \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||
|
||||
ENTRYPOINT ["/bin/systemd"]
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
- hosts: all
|
||||
vars:
|
||||
i3wm_user: "{{ ansible_user_id }}"
|
||||
roles:
|
||||
- travis_test
|
|
@ -33,5 +33,5 @@ __i3_workspaces:
|
|||
|
||||
user: "{{ i3wm_user }}"
|
||||
|
||||
playbook_version_number: 9024 # should be int
|
||||
playbook_version_number: 9025 # should be int
|
||||
playbook_version_path: 'role-i3wm_chaos-bodensee_github.com.version'
|
||||
|
|
Loading…
Reference in a new issue