test: use personal docker registry

This commit is contained in:
Adrien Waksberg 2024-05-07 09:05:17 +02:00
parent 24a8f7b230
commit 9624b3d53e
3 changed files with 29 additions and 28 deletions

View file

@ -13,6 +13,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
- keepalived_vrrp_scripts variable is now a hash - keepalived_vrrp_scripts variable is now a hash
- keepalived_vrrp_instances variable is now a hash - keepalived_vrrp_instances variable is now a hash
- test: test: use personal docker registry
### Fixed ### Fixed

View file

@ -1,21 +1,21 @@
# Ansible role: Keepalived # Ansible role: Keepalived
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-keepalived/releases) [![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://code.waks.be/nishiki/ansible-role-keepalived/releases)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-keepalived/src/branch/master/LICENSE) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://code.waks.be/nishiki/ansible-role-keepalived/src/branch/main/LICENSE)
Install and configure Keepalived Install and configure Keepalived
## Requirements ## Requirements
* Ansible >= 2.9 - Ansible >= 2.9
* Debian - Debian
* Bullseye - Bullseye
* Bookworm - Bookworm
## Role variables ## Role variables
| Name | Type | Required |Default | Comment | | Name | Type | Required | Default | Comment |
|-------------------------------|-------|----------|-----------------------|-----------------------------------| | ----------------------------- | ----- | -------- | --------------------- | --------------------------------- |
| keepalived_mail_from | str | no | keepalived@test.local | from header for notification mail | | keepalived_mail_from | str | no | keepalived@test.local | from header for notification mail |
| keepalived_smtp_server | str | no | localhost | the smtp server | | keepalived_smtp_server | str | no | localhost | the smtp server |
| keepalived_notification_mails | array | no | | the mail addresses to notify | | keepalived_notification_mails | array | no | | the mail addresses to notify |
@ -26,7 +26,7 @@ Install and configure Keepalived
### keepalived_vrrp_instances ### keepalived_vrrp_instances
| Name | Type | Required | Default | Comment | | Name | Type | Required | Default | Comment |
|---------------------|-------|----------|---------|----------------------------------------------| | ------------------- | ----- | -------- | ------- | -------------------------------------------- |
| key | str | yes | | the instance name | | key | str | yes | | the instance name |
| state | str | yes | | Initial state, MASTER or BACKUP | | state | str | yes | | Initial state, MASTER or BACKUP |
| interface | str | yes | | interface for inside_network, bound by vrrp | | interface | str | yes | | interface for inside_network, bound by vrrp |
@ -63,7 +63,7 @@ vip_ngninx:
### keepalived_vrrp_scripts ### keepalived_vrrp_scripts
| Name | Type | Required | Default | Comment | | Name | Type | Required | Default | Comment |
|----------|-------|----------|---------|---------------------------------------| | -------- | ---- | -------- | ------- | ------------------------------------- |
| key | str | yes | | the script name | | key | str | yes | | the script name |
| script | str | yes | | path of the script to execute | | script | str | yes | | path of the script to execute |
| interval | int | no | 2 | seconds between script invocations | | interval | int | no | 2 | seconds between script invocations |
@ -84,7 +84,7 @@ check_nginx:
### keepalived_track_file ### keepalived_track_file
| Name | Type | Required | Default | Comment | | Name | Type | Required | Default | Comment |
|----------|-------|----------|---------|---------------------------------------| | ------ | ---- | -------- | ------- | ------------------------- |
| key | str | yes | | the track file name | | key | str | yes | | the track file name |
| file | str | yes | | path of the file to track | | file | str | yes | | path of the file to track |
| weight | int | no | 1 | weigth of file | | weight | int | no | 1 | weigth of file |
@ -126,10 +126,10 @@ master_file:
### Test with molecule and docker ### Test with molecule and docker
* install [docker](https://docs.docker.com/engine/installation/) - install [docker](https://docs.docker.com/engine/installation/)
* install `python3` and `python3-pip` - install `python3` and `python3-pip`
* install molecule and dependencies `pip3 install molecule 'molecule[docker]' docker ansible-lint testinfra yamllint` - install molecule and dependencies `pip3 install molecule 'molecule[docker]' docker ansible-lint testinfra yamllint`
* run `molecule test` - run `molecule test`
## License ## License

View file

@ -3,7 +3,7 @@ driver:
name: docker name: docker
platforms: platforms:
- name: debian12 - name: debian12
image: nishiki/debian12:molecule image: code.waks.be/nishiki/molecule:debian12
privileged: true privileged: true
volumes: volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw - /sys/fs/cgroup:/sys/fs/cgroup:rw
@ -12,7 +12,7 @@ platforms:
capabilities: capabilities:
- SYS_ADMIN - SYS_ADMIN
- name: debian11 - name: debian11
image: nishiki/debian11:molecule image: code.waks.be/nishiki/molecule:debian11
privileged: true privileged: true
volumes: volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw - /sys/fs/cgroup:/sys/fs/cgroup:rw