Skip to content
Snippets Groups Projects
Commit 6f46f21b authored by David Mehren's avatar David Mehren
Browse files

Merge branch 'linting' into 'master'

Add ansible-lint and fix all warnings and errors

See merge request !1
parents aa32ff99 d7bda16c
No related branches found
No related tags found
1 merge request!1Add ansible-lint and fix all warnings and errors
Pipeline #246110 failed
---
stages:
- linting
cache:
paths:
- .cache
ansible-lint:
stage: linting
image:
name: registry.gitlab.fachschaften.org/fsi-ansible/ci-docker-image:latest
entrypoint: [""]
script:
- ansible-lint -v --offline
---
# defaults file for .
\ No newline at end of file
# defaults file for .
---
- name: restart nginx
service:
ansible.builtin.service:
name: nginx
state: restarted
\ No newline at end of file
state: restarted
......@@ -15,7 +15,7 @@ galaxy_info:
# - CC-BY-4.0
license: BSD-3-Clause
min_ansible_version: 2.9
min_ansible_version: "2.9"
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
......@@ -27,10 +27,9 @@ galaxy_info:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: Ubuntu
versions:
- 18.04
- 20.04
- name: Ubuntu
versions:
- all
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
......
---
- name: Install dependencies.
apt:
ansible.builtin.apt:
name:
- gpg-agent
state: present
update-cache: yes
update-cache: true
when: ansible_distribution_release == 'focal'
- name: Add official nginx APT key
apt_key:
ansible.builtin.apt_key:
url: http://nginx.org/keys/nginx_signing.key
- name: Add official nginx repository
apt_repository:
ansible.builtin.apt_repository:
repo: "deb http://nginx.org/packages/mainline/ubuntu {{ ansible_distribution_release }} nginx"
- name: Install nginx
apt:
ansible.builtin.apt:
name: nginx
state: present
- name: Remove default page
file:
ansible.builtin.file:
path: /etc/nginx/conf.d/default.conf
state: absent
notify: restart nginx
- name: Copy nginx config
copy:
ansible.builtin.copy:
src: "{{ item }}"
dest: /etc/nginx/
mode: 0644
with_fileglob: files/*
notify: restart nginx
---
# vars file for .
\ No newline at end of file
# vars file for .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment