diff --git a/.drone.yml b/.drone.yml index 05cec72..88b995b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,15 +1,12 @@ --- kind: pipeline type: kubernetes -name: ansible-test +name: prepare_workspace platform: os: linux arch: amd64 -concurrency: - limit: 9 - steps: - name: prepare_workspace @@ -27,37 +24,54 @@ steps: - push - pull_request +--- +kind: pipeline +type: kubernetes +name: test-debian + +platform: + os: linux + arch: amd64 + +steps: + - name: test-debian7 image: lerentis/ansible:debian-7 commands: - ansible-playbook -i tests/inventory tests/test-playbook.yml --syntax-check - ansible-playbook -i tests/inventory tests/test-playbook.yml - depends_on: - - prepare_workspace - name: test-ubuntu16 image: lerentis/ansible:ubuntu-16.04 commands: - ansible-playbook -i tests/inventory tests/test-playbook.yml --syntax-check - ansible-playbook -i tests/inventory tests/test-playbook.yml - depends_on: - - prepare_workspace - name: test-ubuntu18 image: lerentis/ansible:ubuntu-18.04 commands: - ansible-playbook -i tests/inventory tests/test-playbook.yml --syntax-check - ansible-playbook -i tests/inventory tests/test-playbook.yml - depends_on: - - prepare_workspace - name: test-ubuntu20 image: lerentis/ansible:ubuntu-20.04 commands: - ansible-playbook -i tests/inventory tests/test-playbook.yml --syntax-check - ansible-playbook -i tests/inventory tests/test-playbook.yml - depends_on: - - prepare_workspace + +depends_on: +- prepare_workspace + +--- +kind: pipeline +type: kubernetes +name: test-arch + +platform: + os: linux + arch: amd64 + +steps: - name: test-arch image: lerentis/ansible:arch @@ -65,16 +79,40 @@ steps: - pacman -S python2 --noconfirm - ansible-playbook -i tests/inventory tests/test-playbook.yml --syntax-check - ansible-playbook -i tests/inventory tests/test-playbook.yml - depends_on: - - prepare_workspace + +depends_on: +- prepare_workspace + +--- +kind: pipeline +type: kubernetes +name: test-centos + +platform: + os: linux + arch: amd64 + +steps: - name: test-centos7 image: lerentis/ansible:centos-7 commands: - ansible-playbook -i tests/inventory tests/test-playbook.yml --syntax-check - ansible-playbook -i tests/inventory tests/test-playbook.yml - depends_on: - - prepare_workspace + +depends_on: +- prepare_workspace + +--- +kind: pipeline +type: kubernetes +name: notify + +platform: + os: linux + arch: amd64 + +steps: - name: notify image: appleboy/drone-telegram @@ -86,11 +124,9 @@ steps: status: - failure - success - depends_on: - - prepare_workspace - - test-debian7 - - test-ubuntu16 - - test-ubuntu18 - - test-ubuntu20 - - test-arch - - test-centos7 + +depends_on: +- prepare_workspace +- test-debian +- test-arch +- test-centos \ No newline at end of file diff --git a/tasks/update-Debian.yml b/tasks/update-Debian.yml index ec110f0..f206d31 100644 --- a/tasks/update-Debian.yml +++ b/tasks/update-Debian.yml @@ -34,13 +34,13 @@ - "{{ package_list }}" when: install and ansible_os_family == "Debian" -#- name: Check if a reboot is required -# register: reboot_required_file -# stat: -# path: /var/run/reboot-required get_md5=no -# -#- name: Needs Reboot -# debug: -# msg: "Restart Required!!" -# ignore_errors: true -# when: reboot_required_file.stat.exists == true \ No newline at end of file +- name: Check if a reboot is required + register: reboot_required_file + stat: + path: /var/run/reboot-required get_md5=no + +- name: Needs Reboot + debug: + msg: "Restart Required!!" + ignore_errors: true + when: reboot_required_file.stat.exists == true \ No newline at end of file