diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..dde6f4a --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/ansible-archlinux-latest.yml b/.github/workflows/ansible-archlinux-latest.yml deleted file mode 100644 index edcd8c8..0000000 --- a/.github/workflows/ansible-archlinux-latest.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-debian-bullseye.yml b/.github/workflows/ansible-debian-bullseye.yml deleted file mode 100644 index b50d111..0000000 --- a/.github/workflows/ansible-debian-bullseye.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-debian-buster.yml b/.github/workflows/ansible-debian-buster.yml deleted file mode 100644 index a819e89..0000000 --- a/.github/workflows/ansible-debian-buster.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-debian-latest.yml b/.github/workflows/ansible-debian-latest.yml deleted file mode 100644 index d06a132..0000000 --- a/.github/workflows/ansible-debian-latest.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-debian-sid.yml b/.github/workflows/ansible-debian-sid.yml deleted file mode 100644 index 22cbbfb..0000000 --- a/.github/workflows/ansible-debian-sid.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-debian-stable.yml b/.github/workflows/ansible-debian-stable.yml deleted file mode 100644 index bf06f77..0000000 --- a/.github/workflows/ansible-debian-stable.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-debian-stretch.yml b/.github/workflows/ansible-debian-stretch.yml deleted file mode 100644 index c291320..0000000 --- a/.github/workflows/ansible-debian-stretch.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-fedora-latest.yml b/.github/workflows/ansible-fedora-latest.yml deleted file mode 100644 index 78fa27f..0000000 --- a/.github/workflows/ansible-fedora-latest.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index 4d7dc8e..887fd9b 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -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 diff --git a/.github/workflows/ansible-ubuntu-bionic.yml b/.github/workflows/ansible-ubuntu-bionic.yml deleted file mode 100644 index 0b07870..0000000 --- a/.github/workflows/ansible-ubuntu-bionic.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-ubuntu-latest.yml b/.github/workflows/ansible-ubuntu-latest.yml deleted file mode 100644 index 583b6ad..0000000 --- a/.github/workflows/ansible-ubuntu-latest.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/ansible-ubuntu-trusty.yml b/.github/workflows/ansible-ubuntu-trusty.yml deleted file mode 100644 index 3c265a3..0000000 --- a/.github/workflows/ansible-ubuntu-trusty.yml +++ /dev/null @@ -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: "./" diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index adcecbd..39fa2be 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -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' diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index d744e9c..361b111 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -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' diff --git a/meta/main.yml b/meta/main.yml index dbf92f8..c23216d 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -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: [] diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 deleted file mode 100644 index f8b4e75..0000000 --- a/molecule/default/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/molecule/default/INSTALL.rst b/molecule/default/INSTALL.rst deleted file mode 100644 index e26493b..0000000 --- a/molecule/default/INSTALL.rst +++ /dev/null @@ -1,16 +0,0 @@ -******* -Install -******* - -Requirements -============ - -* Docker Engine -* docker-py - -Install -======= - -.. code-block:: bash - - $ sudo pip install docker-py diff --git a/molecule/default/create.yml b/molecule/default/create.yml deleted file mode 100644 index bfb2149..0000000 --- a/molecule/default/create.yml +++ /dev/null @@ -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 }}" diff --git a/molecule/default/destroy.yml b/molecule/default/destroy.yml deleted file mode 100644 index 3ce7478..0000000 --- a/molecule/default/destroy.yml +++ /dev/null @@ -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 }}" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml deleted file mode 100644 index 9aff02e..0000000 --- a/molecule/default/molecule.yml +++ /dev/null @@ -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 diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml deleted file mode 100644 index 3a3b221..0000000 --- a/molecule/default/playbook.yml +++ /dev/null @@ -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 diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml deleted file mode 100644 index 5358b3b..0000000 --- a/molecule/default/prepare.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: false - tasks: [] diff --git a/molecule/default/tests/__pycache__/test_default.cpython-27-PYTEST.pyc b/molecule/default/tests/__pycache__/test_default.cpython-27-PYTEST.pyc deleted file mode 100644 index d788875..0000000 Binary files a/molecule/default/tests/__pycache__/test_default.cpython-27-PYTEST.pyc and /dev/null differ diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py deleted file mode 100644 index eedd64a..0000000 --- a/molecule/default/tests/test_default.py +++ /dev/null @@ -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' diff --git a/molecule/default/tests/test_default.pyc b/molecule/default/tests/test_default.pyc deleted file mode 100644 index 2bf46a6..0000000 Binary files a/molecule/default/tests/test_default.pyc and /dev/null differ diff --git a/molecule/no_vars/Dockerfile.j2 b/molecule/no_vars/Dockerfile.j2 deleted file mode 100644 index f8b4e75..0000000 --- a/molecule/no_vars/Dockerfile.j2 +++ /dev/null @@ -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 diff --git a/molecule/no_vars/INSTALL.rst b/molecule/no_vars/INSTALL.rst deleted file mode 100644 index e26493b..0000000 --- a/molecule/no_vars/INSTALL.rst +++ /dev/null @@ -1,16 +0,0 @@ -******* -Install -******* - -Requirements -============ - -* Docker Engine -* docker-py - -Install -======= - -.. code-block:: bash - - $ sudo pip install docker-py diff --git a/molecule/no_vars/create.yml b/molecule/no_vars/create.yml deleted file mode 100644 index bfb2149..0000000 --- a/molecule/no_vars/create.yml +++ /dev/null @@ -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 }}" diff --git a/molecule/no_vars/destroy.yml b/molecule/no_vars/destroy.yml deleted file mode 100644 index 3ce7478..0000000 --- a/molecule/no_vars/destroy.yml +++ /dev/null @@ -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 }}" diff --git a/molecule/no_vars/molecule.yml b/molecule/no_vars/molecule.yml deleted file mode 100644 index 3d5c500..0000000 --- a/molecule/no_vars/molecule.yml +++ /dev/null @@ -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 diff --git a/molecule/no_vars/playbook.yml b/molecule/no_vars/playbook.yml deleted file mode 100644 index de57e3c..0000000 --- a/molecule/no_vars/playbook.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Converge - hosts: all - - roles: - - role: i3 diff --git a/molecule/no_vars/prepare.yml b/molecule/no_vars/prepare.yml deleted file mode 100644 index 5358b3b..0000000 --- a/molecule/no_vars/prepare.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: false - tasks: [] diff --git a/molecule/no_vars/tests/__pycache__/test_default.cpython-27-PYTEST.pyc b/molecule/no_vars/tests/__pycache__/test_default.cpython-27-PYTEST.pyc deleted file mode 100644 index 7b5422a..0000000 Binary files a/molecule/no_vars/tests/__pycache__/test_default.cpython-27-PYTEST.pyc and /dev/null differ diff --git a/molecule/no_vars/tests/test_default.py b/molecule/no_vars/tests/test_default.py deleted file mode 100644 index eedd64a..0000000 --- a/molecule/no_vars/tests/test_default.py +++ /dev/null @@ -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' diff --git a/molecule/no_vars/tests/test_default.pyc b/molecule/no_vars/tests/test_default.pyc deleted file mode 100644 index 2bf46a6..0000000 Binary files a/molecule/no_vars/tests/test_default.pyc and /dev/null differ diff --git a/tasks/config.yml b/tasks/config.yml index 78cdec0..c1ce8c4 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -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 }}" diff --git a/tasks/main.yml b/tasks/main.yml index 5d4181d..585b686 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/tasks/setup-Archlinux.yml b/tasks/setup-Archlinux.yml index 6fa8068..2b65c7c 100644 --- a/tasks/setup-Archlinux.yml +++ b/tasks/setup-Archlinux.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 diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index cd5dec9..4170cbf 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -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" diff --git a/tasks/setup-RedHat.yml b/tasks/setup-RedHat.yml index a629e80..f49b70f 100644 --- a/tasks/setup-RedHat.yml +++ b/tasks/setup-RedHat.yml @@ -1,5 +1,5 @@ --- -- name: ensure i3 packages are installed. +- name: Ensure i3 packages are installed. ansible.builtin.dnf: name: "{{ i3_packages }}" state: present diff --git a/tasks/variables.yml b/tasks/variables.yml index 7896d1c..856b0fe 100644 --- a/tasks/variables.yml +++ b/tasks/variables.yml @@ -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: diff --git a/tasks/versioncheck.yml b/tasks/versioncheck.yml index 5128cc8..62687e5 100644 --- a/tasks/versioncheck.yml +++ b/tasks/versioncheck.yml @@ -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 diff --git a/tests/.vagrant/machines/debian/virtualbox/action_provision b/tests/.vagrant/machines/debian/virtualbox/action_provision deleted file mode 100644 index f211d02..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/action_provision +++ /dev/null @@ -1 +0,0 @@ -1.5:0f088850-bf54-474c-8c3e-1757635022f1 \ No newline at end of file diff --git a/tests/.vagrant/machines/debian/virtualbox/action_set_name b/tests/.vagrant/machines/debian/virtualbox/action_set_name deleted file mode 100644 index d094860..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/action_set_name +++ /dev/null @@ -1 +0,0 @@ -1514602261 \ No newline at end of file diff --git a/tests/.vagrant/machines/debian/virtualbox/creator_uid b/tests/.vagrant/machines/debian/virtualbox/creator_uid deleted file mode 100644 index e37d32a..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/creator_uid +++ /dev/null @@ -1 +0,0 @@ -1000 \ No newline at end of file diff --git a/tests/.vagrant/machines/debian/virtualbox/id b/tests/.vagrant/machines/debian/virtualbox/id deleted file mode 100644 index 086a32e..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/id +++ /dev/null @@ -1 +0,0 @@ -0f088850-bf54-474c-8c3e-1757635022f1 \ No newline at end of file diff --git a/tests/.vagrant/machines/debian/virtualbox/index_uuid b/tests/.vagrant/machines/debian/virtualbox/index_uuid deleted file mode 100644 index 7b1a9b5..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/index_uuid +++ /dev/null @@ -1 +0,0 @@ -62683cf08f3445f5b4d94e256a9b1fb6 \ No newline at end of file diff --git a/tests/.vagrant/machines/debian/virtualbox/private_key b/tests/.vagrant/machines/debian/virtualbox/private_key deleted file mode 100644 index 7d16f1b..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/private_key +++ /dev/null @@ -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----- diff --git a/tests/.vagrant/machines/debian/virtualbox/synced_folders b/tests/.vagrant/machines/debian/virtualbox/synced_folders deleted file mode 100644 index 888fa88..0000000 --- a/tests/.vagrant/machines/debian/virtualbox/synced_folders +++ /dev/null @@ -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"}}} \ No newline at end of file diff --git a/tests/.vagrant/machines/xenial/virtualbox/action_provision b/tests/.vagrant/machines/xenial/virtualbox/action_provision deleted file mode 100644 index fb20766..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/action_provision +++ /dev/null @@ -1 +0,0 @@ -1.5:297c8844-ecdf-472a-beb7-07f31a0fa84b \ No newline at end of file diff --git a/tests/.vagrant/machines/xenial/virtualbox/action_set_name b/tests/.vagrant/machines/xenial/virtualbox/action_set_name deleted file mode 100644 index 7fe7e79..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/action_set_name +++ /dev/null @@ -1 +0,0 @@ -1514602561 \ No newline at end of file diff --git a/tests/.vagrant/machines/xenial/virtualbox/creator_uid b/tests/.vagrant/machines/xenial/virtualbox/creator_uid deleted file mode 100644 index e37d32a..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/creator_uid +++ /dev/null @@ -1 +0,0 @@ -1000 \ No newline at end of file diff --git a/tests/.vagrant/machines/xenial/virtualbox/id b/tests/.vagrant/machines/xenial/virtualbox/id deleted file mode 100644 index f4c1309..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/id +++ /dev/null @@ -1 +0,0 @@ -297c8844-ecdf-472a-beb7-07f31a0fa84b \ No newline at end of file diff --git a/tests/.vagrant/machines/xenial/virtualbox/index_uuid b/tests/.vagrant/machines/xenial/virtualbox/index_uuid deleted file mode 100644 index efd3dc8..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/index_uuid +++ /dev/null @@ -1 +0,0 @@ -7a8b283b91ff4dbfa3bad0a5c7cde793 \ No newline at end of file diff --git a/tests/.vagrant/machines/xenial/virtualbox/private_key b/tests/.vagrant/machines/xenial/virtualbox/private_key deleted file mode 100644 index 974d033..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/private_key +++ /dev/null @@ -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----- diff --git a/tests/.vagrant/machines/xenial/virtualbox/synced_folders b/tests/.vagrant/machines/xenial/virtualbox/synced_folders deleted file mode 100644 index 2a85dfe..0000000 --- a/tests/.vagrant/machines/xenial/virtualbox/synced_folders +++ /dev/null @@ -1 +0,0 @@ -{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/home/owe/workspace/private/ansible/i3/tests","disabled":false,"__vagrantfile":true}}} \ No newline at end of file diff --git a/tests/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory b/tests/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory deleted file mode 100644 index 9683fde..0000000 --- a/tests/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory +++ /dev/null @@ -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 diff --git a/tests/Vagrantfile b/tests/Vagrantfile deleted file mode 100644 index 95bb06e..0000000 --- a/tests/Vagrantfile +++ /dev/null @@ -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 diff --git a/tests/playbook.yml b/tests/playbook.yml deleted file mode 100644 index dcf392f..0000000 --- a/tests/playbook.yml +++ /dev/null @@ -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 diff --git a/travis/Dockerfile.debian-stretch b/travis/Dockerfile.debian-stretch deleted file mode 100644 index ee2fbc7..0000000 --- a/travis/Dockerfile.debian-stretch +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.fedora-24 b/travis/Dockerfile.fedora-24 deleted file mode 100644 index 507453f..0000000 --- a/travis/Dockerfile.fedora-24 +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.fedora-25 b/travis/Dockerfile.fedora-25 deleted file mode 100644 index 05d65c0..0000000 --- a/travis/Dockerfile.fedora-25 +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.fedora-26 b/travis/Dockerfile.fedora-26 deleted file mode 100644 index 200e7e1..0000000 --- a/travis/Dockerfile.fedora-26 +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.fedora-27 b/travis/Dockerfile.fedora-27 deleted file mode 100644 index de33d3f..0000000 --- a/travis/Dockerfile.fedora-27 +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.fedora-28 b/travis/Dockerfile.fedora-28 deleted file mode 100644 index 9f88b0f..0000000 --- a/travis/Dockerfile.fedora-28 +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.fedora-29 b/travis/Dockerfile.fedora-29 deleted file mode 100644 index aaa82ff..0000000 --- a/travis/Dockerfile.fedora-29 +++ /dev/null @@ -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"] diff --git a/travis/Dockerfile.ubuntu-bionic b/travis/Dockerfile.ubuntu-bionic deleted file mode 100644 index b535edb..0000000 --- a/travis/Dockerfile.ubuntu-bionic +++ /dev/null @@ -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"] diff --git a/travis/test.yml b/travis/test.yml deleted file mode 100644 index b5f1ff4..0000000 --- a/travis/test.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- hosts: all - vars: - i3wm_user: "{{ ansible_user_id }}" - roles: - - travis_test diff --git a/vars/main.yml b/vars/main.yml index f28d59c..02ba4b0 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -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'