Skip to content

Commit

Permalink
Updated files, etc. after new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlesmithjr committed Feb 24, 2020
1 parent 4aada31 commit 9316a6b
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 95 deletions.
76 changes: 14 additions & 62 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,22 @@
---
language: python
python: "2.7"

# Use the new container infrastructure
sudo: required

language: python
services:
- docker

env:
- distribution: centos
init: /usr/lib/systemd/systemd
version: 7
# - distribution: fedora
# init: /usr/lib/systemd/systemd
# version: 29
# - distribution: fedora
# init: /usr/lib/systemd/systemd
# version: 28
# - distribution: fedora
# init: /usr/lib/systemd/systemd
# version: 27
# - distribution: fedora
# init: /usr/lib/systemd/systemd
# version: 26
# - distribution: fedora
# init: /usr/lib/systemd/systemd
# version: 25
# - distribution: fedora
# init: /usr/lib/systemd/systemd
# version: 24
- distribution: ubuntu
init: /lib/systemd/systemd
version: bionic
- distribution: ubuntu
init: /lib/systemd/systemd
version: xenial
# - distribution: ubuntu
# init: /sbin/init
# version: trusty
# - distribution: debian
# init: /lib/systemd/systemd
# version: stretch
# - distribution: debian
# init: /lib/systemd/systemd
# version: jessie

before_install:
- "sudo pip install yamllint"
- yamllint -c .yamllint.yml .
- "sudo docker pull ${distribution}:${version}"
- "sudo docker build --no-cache --rm --file=tests/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests"

- sudo apt-get -qq update
install:
- pip3 install -r requirements.txt
- ansible --version
- molecule --version
script:
- container_id=$(mktemp)
- role_name="ansible-kea-dhcp"
- 'sudo docker run --detach --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro --volume="${PWD}":/etc/ansible/roles/${role_name}:ro ${distribution}-${version}:ansible ${init} > "${container_id}"'
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-lint -c /.ansible-lint /etc/ansible/roles/${role_name}/tests/test.yml'
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml --syntax-check'
- 'sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml'
- >
sudo docker exec "$(cat ${container_id})" env ANSIBLE_FORCE_COLOR=1 ansible-playbook -v /etc/ansible/roles/${role_name}/tests/test.yml
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- 'sudo docker rm -f "$(cat ${container_id})"'

- molecule test --scenario-name centos7
# - molecule test --scenario-name centos8
# - molecule test --scenario-name debian8
- molecule test --scenario-name debian9
- molecule test --scenario-name debian10
- molecule test --scenario-name fedora
- molecule test --scenario-name ubuntu1604
- molecule test --scenario-name ubuntu1804
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
35 changes: 14 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# ansible-kea-dhcp

- [ansible-kea-dhcp](#ansible-kea-dhcp)
- [Build Status](#build-status)
- [Requirements](#requirements)
- [Role Variables](#role-variables)
- [Dependencies](#dependencies)
- [Example Playbook](#example-playbook)
- [License](#license)
- [Author Information](#author-information)
Ansible role to install/configure Kea DHCP

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Build Status

# ansible-kea-dhcp
### GitHub Actions

An [Ansible](https://www.ansible.com) role to install/configure [Kea DHCP](http://kea.isc.org/)
![Molecule Test](https://github.com/mrlesmithjr/ansible-kea-dhcp/workflows/Molecule%20Test/badge.svg)

## Build Status
### Travis CI

[![Build Status](https://travis-ci.org/mrlesmithjr/ansible-kea-dhcp.svg?branch=master)](https://travis-ci.org/mrlesmithjr/ansible-kea-dhcp)

## Requirements

None
For any required Ansible roles, review:
[requirements.yml](requirements.yml)

## Role Variables

[Defaults](defaults/main.yml)
[defaults/main.yml](defaults/main.yml)

## Dependencies

None

## Example Playbook

[Example Playbook](./playbook.yml)
[playbook.yml](playbook.yml)

## License

Expand All @@ -44,6 +35,8 @@ MIT

Larry Smith Jr.

- [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)
- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)
- [@mrlesmithjr](https://twitter.com/mrlesmithjr)
- [mrlesmithjr@gmail.com](mailto:mrlesmithjr@gmail.com)
- [http://everythingshouldbevirtual.com](http://everythingshouldbevirtual.com)

> NOTE: Repo has been created/updated using [https://github.com/mrlesmithjr/cookiecutter-ansible-role](https://github.com/mrlesmithjr/cookiecutter-ansible-role) as a template.
5 changes: 2 additions & 3 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
galaxy_info:
author: Larry Smith Jr.
description: An Ansible role to install/configure Kea DHCP
description: Ansible role to install/configure Kea DHCP
license: MIT

min_ansible_version: 1.2
min_ansible_version: 2.8

platforms:
- name: EL
Expand Down
19 changes: 10 additions & 9 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
interfaces-config:
interfaces:
- "*"
# - 'eth0'
# - 'eth1'
# - eth0
# - eth1
dhcp-socket-type: raw
# Use Memfile lease database backend to store leases in a CSV file.
lease-database:
Expand All @@ -33,21 +33,21 @@
- subnet: 192.0.2.0/24
next-server: 192.0.2.234
pools:
- pool: "192.0.2.1 - 192.0.2.200"
- pool: 192.0.2.1 - 192.0.2.200
reservations:
- hw-address: "1a:1b:1c:1d:1e:1f"
ip-address: 192.0.2.202
- subnet: 192.0.3.0/24
pools:
- pool: "192.0.3.1 - 192.0.3.200"
- pool: 192.0.3.1 - 192.0.3.200
relay:
ip-address: 10.0.0.1
- subnet: 192.0.4.0/24
pools:
- pool: "192.0.4.1 - 192.0.4.200"
- pool: 192.0.4.1 - 192.0.4.200
option-data:
- name: domain-name-servers
data: "8.8.8.8, 8.8.4.4"
data: 8.8.8.8, 8.8.4.4
- name: domain-name
data: "{{ kea_dhcp_pri_domain_name }}"
- name: tftp-server-name
Expand All @@ -57,7 +57,7 @@
dhcp-ddns:
enable-updates: false
qualifying-suffix: "{{ kea_dhcp_pri_domain_name }}"
# next-server: '0.0.0.0'
# next-server: 0.0.0.0
control-socket:
socket-type: unix
socket-name: /var/run/kea.socket
Expand All @@ -72,6 +72,7 @@
severity: INFO
debuglevel: 0
pri_domain_name: test.vagrant.local
roles:
- role: ansible-kea-dhcp
tasks:
- name: Include ansible-kea-dhcp
include_role:
name: ansible-kea-dhcp

0 comments on commit 9316a6b

Please sign in to comment.