This commit is contained in:
parent
2faf588406
commit
918c154b66
84
.drone.yml
84
.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
|
@ -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
|
||||
- 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
|
Loading…
Reference in New Issue
Block a user