Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve new linting issues #52

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
skip_list:
- name[casing]
- package-latest # Package installs should not use latest
- schema[meta] # Amazon Linux 2 version: 'any' is valid

warn_list:
- experimental
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ galaxy_info:
description: Installs and configures Netbox
company: ""
license: "license (BSD, MIT)"
min_ansible_version: 2.8
min_ansible_version: '2.8'
platforms:
- name: Amazon Linux 2
versions:
Expand Down
6 changes: 3 additions & 3 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
tasks:
# RHEL8+ container images only have C.UTF-8 installed
- name: Set database locale when using CentOS8/RHEL8+
set_fact:
ansible.builtin.set_fact:
db_locale: C.UTF-8
when:
- ansible_os_family == 'RedHat'
Expand All @@ -35,7 +35,7 @@
when: ansible_os_family == 'RedHat'

- name: Install PostgreSQL
include_role:
ansible.builtin.include_role:
name: geerlingguy.postgresql
vars:
postgresql_users:
Expand All @@ -50,6 +50,6 @@
when: lookup('env', 'CI') != 'true' # skip if via github actions

- name: Install Redis
include_role:
ansible.builtin.include_role:
name: geerlingguy.redis
when: lookup('env', 'CI') != 'true' # skip if via github actions
2 changes: 1 addition & 1 deletion molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
register: services_state

- name: verify Netbox services are running
assert:
ansible.builtin.assert:
that: item.state == 'running'
with_items:
- "{{ services_state.ansible_facts.services['netbox.service'] }}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/install.redhat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: install.redhat | include Amazon Linux 2 tasks
include_tasks: install.amazon.yml
ansible.builtin.include_tasks: install.amazon.yml
when: ansible_distribution == 'Amazon'

- name: install.redhat | install required system packages
Expand Down
4 changes: 2 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
- "{{ netbox_home }}/releases"

- name: install | download Netbox via Git
include_tasks: download-git.yml
ansible.builtin.include_tasks: download-git.yml
when: netbox_install_method == 'git'

- name: install | download Netbox release
include_tasks: download-release.yml
ansible.builtin.include_tasks: download-release.yml
when: netbox_install_method == 'release'
18 changes: 9 additions & 9 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
# Variable configuration.
- include_tasks: variables.yml
- name: Set variables
ansible.builtin.include_tasks: variables.yml

- name: Include system packages
include_tasks: "install.{{ ansible_os_family | lower }}.yml"
ansible.builtin.include_tasks: "install.{{ ansible_os_family | lower }}.yml"
args:
apply:
become: yes

- name: Include Netbox installation tasks
include_tasks: install.yml
ansible.builtin.include_tasks: install.yml

- name: Include Netbox configuration tasks
include_tasks: configure.yml
ansible.builtin.include_tasks: configure.yml

- name: Include Netbox plugin tasks
include_tasks: plugins.yml
ansible.builtin.include_tasks: plugins.yml

- name: Include Netbox upgrade tasks
include_tasks: upgrade.yml
ansible.builtin.include_tasks: upgrade.yml

- name: Include super user creation tasks
include_tasks: superusers.yml
ansible.builtin.include_tasks: superusers.yml
when:
- netbox_superusers is defined
- services_state.ansible_facts.services['netbox.service'] is not defined

- name: Include service management tasks
include_tasks: services.yml
ansible.builtin.include_tasks: services.yml