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

Fix linting #9

Merged
merged 11 commits into from
Nov 30, 2023
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ warn_list:
- no-handler
- galaxy[no-changelog]
- galaxy[tags]
- var-naming[no-role-prefix]
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.envrc
.venv
.vscode

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# ansible-collection-infra

Ansible Collection to configure infrastructure for XNAT and OMERO
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace: mirsg

# The name of the collection. Has the same character restrictions as 'namespace'
name: xnat
name: infrastructure

# The version of the collection. Must be compatible with semantic versioning
version: 1.0.0
Expand Down
41 changes: 0 additions & 41 deletions roles/docker/molecule/centos7/molecule.yml

This file was deleted.

30 changes: 0 additions & 30 deletions roles/docker/molecule/centos7/prepare.yml

This file was deleted.

22 changes: 0 additions & 22 deletions roles/docker/molecule/resources/Dockerfile.j2

This file was deleted.

21 changes: 0 additions & 21 deletions roles/docker/molecule/resources/converge.yml

This file was deleted.

This file was deleted.

43 changes: 0 additions & 43 deletions roles/docker/molecule/rocky8/molecule.yml

This file was deleted.

30 changes: 0 additions & 30 deletions roles/docker/molecule/rocky8/prepare.yml

This file was deleted.

2 changes: 1 addition & 1 deletion roles/install_python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you would like to run Ansible Molecule to test this role, the requirements ar

## Role Variables

`install_python` is a dictionary that contains the following varialbes:
`install_python` is a dictionary that contains the following variables:

`version`: the version of Python to install. This defaults to `"3"`.

Expand Down
2 changes: 1 addition & 1 deletion roles/install_python/tasks/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# OS specific tasks for the RedHat family
- name: Instal EPEL for RedHat OSes
- name: Install EPEL for RedHat OSes
ansible.builtin.yum:
name: "epel-release"
state: installed
2 changes: 1 addition & 1 deletion roles/postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See [this example](molecule/resources/inventory/host_vars/db/vars) `host_vars` f

See [this example](molecule/resources/inventory/host_vars/web/vars) `host_vars` file.

### Required varaibles for both the server and client
### Required variables for both the server and client

`postgresql_rpm_gpg_key_pgdg`: URL from which to download the RPM GPP key; not needed for CentOS 7

Expand Down
4 changes: 2 additions & 2 deletions roles/postgresql/tasks/configure_cron_backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
state: directory
mode: 0700
mode: "0700"

- name: Generate Postgresql backup script
ansible.builtin.template:
src: "run_db_backup.sh.j2"
dest: "{{ postgresql_backup.script }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
mode: 0550
mode: "0550"
force: true

- name: "Ensure cron nightly backup exists for postgresql"
Expand Down
22 changes: 11 additions & 11 deletions roles/postgresql/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
owner: "root"
group: "root"
state: directory
mode: 0755
mode: "0755"

- name: Set custom postgresql service configuration
ansible.builtin.template:
src: postgresql.service.j2
dest: "{{ postgresql_service.filename }}"
owner: "root"
group: "root"
mode: 0644
mode: "0644"
register: postgresql_custom_service_config

- name: Ensure postgresql storage subdirectory exists
Expand All @@ -64,31 +64,31 @@
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
state: directory
mode: 0700
mode: "0700"

- name: Ensure postgres storage data subdirectory exists
ansible.builtin.file:
path: "{{ postgresql_storage.data_directory }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
state: directory
mode: 0700
mode: "0700"

- name: Ensure postgresql base directory exists - {{ postgresql.base_directory }}
ansible.builtin.file:
path: "{{ postgresql.base_directory }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
state: directory
mode: 0700
mode: "0700"

- name: Ensure postgresql logging directory exists
ansible.builtin.file:
path: "{{ postgresql.log_directory }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
state: directory
mode: 0700
mode: "0700"

- name: Check the status of the postgresql data directory symlink
ansible.builtin.stat:
Expand Down Expand Up @@ -127,23 +127,23 @@
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
state: directory
mode: 0700
mode: "0700"

- name: Set postgresql host-based authentication configuration
ansible.builtin.template:
src: pg_hba.conf.j2
dest: "{{ postgresql.hba_configuration_filename }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
mode: 0640
mode: "0640"

- name: Set postgresql configuration
ansible.builtin.template:
src: postgresql.conf.j2
dest: "{{ postgresql.configuration_filename }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
mode: 0640
mode: "0640"

- name: Noop to restart postgresql
tags: restart
Expand All @@ -168,7 +168,7 @@
dest: "{{ postgresql_connection.client_certificate_filename }}"
owner: "{{ postgresql.owner }}"
group: "{{ postgresql.group }}"
mode: 0600
mode: "0600"

- name: Allow postgresql to modify files in data directory
community.general.sefcontext:
Expand Down Expand Up @@ -197,6 +197,6 @@
- name: Configure cron job for automatic postgres backups
ansible.builtin.include_tasks: configure_cron_backup.yml

- name: Create databse
- name: Create database
ansible.builtin.include_tasks:
file: create_database.yml
2 changes: 1 addition & 1 deletion roles/provision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you would like to run Ansible Molecule to test this role, the requirements ar

`server_locale`: the sets the user's language, region, etc. This is set to "en_GB.UTF-8"

`EXTERNAL_STORAGE_DRIVE`: path to mounted storage. By default this is undefined.
`external_storage_drive`: path to mounted storage. By default this is undefined.

## Dependencies

Expand Down
4 changes: 2 additions & 2 deletions roles/provision/tasks/CentOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
option: mirrorlist
value: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
backup: true
mode: 0644
mode: "0644"

- name: Ensure updates mirrorlist is in repository file (CentOS)
community.general.ini_file:
Expand All @@ -15,7 +15,7 @@
option: mirrorlist
value: http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
backup: true
mode: 0644
mode: "0644"

- name: Check if locale already set
ansible.builtin.shell: |
Expand Down
Loading