Skip to content

Commit

Permalink
Merge pull request #25 from Oefenweb/consistency-changes
Browse files Browse the repository at this point in the history
Consistency changes
  • Loading branch information
tersmitten authored Aug 30, 2023
2 parents 171e0c2 + 5f9bb9e commit 415c6a6
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
warn_list:
- role-name
- name[play]
- name[casing]
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
python-version: '3.x'

- name: Install test dependencies
run: pip install ansible-lint[community,yamllint]
run: |
pip install ansible-lint
ansible-galaxy install -r requirements.yml
- name: Lint code
run: |
Expand All @@ -43,11 +45,8 @@ jobs:
matrix:
include:
- distro: debian8
ansible-version: '<2.10'
- distro: debian9
- distro: debian10
- distro: ubuntu1604
ansible-version: '>=2.9, <2.10'
- distro: ubuntu1604
ansible-version: '>=2.10, <2.11'
- distro: ubuntu1604
Expand All @@ -66,7 +65,7 @@ jobs:
python-version: '3.x'

- name: Install test dependencies
run: pip install 'ansible${{ matrix.ansible-version }}' molecule[docker] docker
run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker

- name: Run Molecule tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# handlers file
---
- name: restart snmpd
service:
ansible.builtin.service:
name: snmpd
state: restarted
when: service_default_state | default('started') == 'started'
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
roles:
- ../../../
4 changes: 2 additions & 2 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/../../tests/vars/main.yml"
- name: include tasks
include: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
ansible.builtin.import_tasks: "{{ playbook_dir }}/../../tests/tasks/pre.yml"
10 changes: 5 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tasks file
---
- name: install dependencies
apt:
ansible.builtin.apt:
name: "{{ snmpd_dependencies }}"
state: "{{ apt_install_state | default('latest') }}"
update_cache: true
Expand All @@ -12,7 +12,7 @@
- snmpd-dependencies

- name: install
apt:
ansible.builtin.apt:
name: "{{ snmpd_install }}"
state: "{{ apt_install_state | default('latest') }}"
tags:
Expand All @@ -21,7 +21,7 @@
- snmpd-install

- name: update configuration file - /etc/default/snmpd.conf
template:
ansible.builtin.template:
src: etc/default/snmpd.j2
dest: /etc/default/snmpd
owner: root
Expand All @@ -34,7 +34,7 @@
- snmpd-configuration

- name: update configuration file - /etc/snmp/snmpd.conf
template:
ansible.builtin.template:
src: etc/snmp/snmpd.conf.j2
dest: /etc/snmp/snmpd.conf
owner: root
Expand All @@ -47,7 +47,7 @@
- snmpd-configuration

- name: start and enable service
service:
ansible.builtin.service:
name: snmpd
state: "{{ service_default_state | default('started') }}"
enabled: "{{ service_default_enabled | default(true) | bool }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/pre.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pre test file
---
- name: enable non-free
apt_repository:
ansible.builtin.apt_repository:
repo: "{{ item.type }} {{ item.url }} {{ item.component }}"
filename: non-free
with_items:
Expand Down
4 changes: 2 additions & 2 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
become: true
pre_tasks:
- name: include vars
include_vars: "{{ playbook_dir }}/vars/main.yml"
ansible.builtin.include_vars: "{{ playbook_dir }}/vars/main.yml"
- name: include tasks
include: "{{ playbook_dir }}/tasks/pre.yml"
ansible.builtin.import_tasks: "{{ playbook_dir }}/tasks/pre.yml"
roles:
- ../../
2 changes: 1 addition & 1 deletion tests/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
become: true
pre_tasks:
- name: include tasks
include: "{{ playbook_dir }}/tasks/pre.yml"
ansible.builtin.import_tasks: "{{ playbook_dir }}/tasks/pre.yml"
roles:
- ../../

0 comments on commit 415c6a6

Please sign in to comment.