Skip to content
Snippets Groups Projects
Commit d7bda16c authored by Adrian K.'s avatar Adrian K.
Browse files

Fix ansible-lint

parent bf49faae
Branches
Tags
1 merge request!1Add ansible-lint and fix all warnings and errors
Pipeline #88825 passed
--- ---
- name: restart nginx - name: restart nginx
service: ansible.builtin.service:
name: nginx name: nginx
state: restarted state: restarted
...@@ -15,7 +15,7 @@ galaxy_info: ...@@ -15,7 +15,7 @@ galaxy_info:
# - CC-BY-4.0 # - CC-BY-4.0
license: BSD-3-Clause 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. # If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version: # min_ansible_container_version:
...@@ -29,8 +29,7 @@ galaxy_info: ...@@ -29,8 +29,7 @@ galaxy_info:
platforms: platforms:
- name: Ubuntu - name: Ubuntu
versions: versions:
- 18.04 - all
- 20.04
galaxy_tags: [] galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes # List tags for your role here, one per line. A tag is a keyword that describes
......
--- ---
- name: Install dependencies. - name: Install dependencies.
apt: ansible.builtin.apt:
name: name:
- gpg-agent - gpg-agent
state: present state: present
update-cache: yes update-cache: true
when: ansible_distribution_release == 'focal' when: ansible_distribution_release == 'focal'
- name: Add official nginx APT key - name: Add official nginx APT key
apt_key: ansible.builtin.apt_key:
url: http://nginx.org/keys/nginx_signing.key url: http://nginx.org/keys/nginx_signing.key
- name: Add official nginx repository - name: Add official nginx repository
apt_repository: ansible.builtin.apt_repository:
repo: "deb http://nginx.org/packages/mainline/ubuntu {{ ansible_distribution_release }} nginx" repo: "deb http://nginx.org/packages/mainline/ubuntu {{ ansible_distribution_release }} nginx"
- name: Install nginx - name: Install nginx
apt: ansible.builtin.apt:
name: nginx name: nginx
state: present state: present
- name: Remove default page - name: Remove default page
file: ansible.builtin.file:
path: /etc/nginx/conf.d/default.conf path: /etc/nginx/conf.d/default.conf
state: absent state: absent
notify: restart nginx notify: restart nginx
- name: Copy nginx config - name: Copy nginx config
copy: ansible.builtin.copy:
src: "{{ item }}" src: "{{ item }}"
dest: /etc/nginx/ dest: /etc/nginx/
mode: 0644
with_fileglob: files/* with_fileglob: files/*
notify: restart nginx notify: restart nginx
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment