Update configs & rerun prettier
This commit is contained in:
parent
005a9e993b
commit
c7a6e07e53
7 changed files with 29 additions and 56 deletions
|
|
@ -1,5 +0,0 @@
|
|||
parseable: true
|
||||
quiet: true
|
||||
skip_list:
|
||||
- '501'
|
||||
use_default_rules: true
|
||||
|
|
@ -1,33 +1,15 @@
|
|||
stages:
|
||||
- lint
|
||||
- test
|
||||
|
||||
cache:
|
||||
key: "$CI_COMMIT_REF_SLUG"
|
||||
key: $CI_COMMIT_REF_SLUG
|
||||
paths:
|
||||
- .cache/pip
|
||||
- node_modules/
|
||||
|
||||
lint:
|
||||
stage: lint
|
||||
image: python:3.7
|
||||
before_script:
|
||||
- pip install ansible ansible-lint --quiet
|
||||
script:
|
||||
- ansible-lint playbook.yml
|
||||
only:
|
||||
refs:
|
||||
- development
|
||||
- merge_requests
|
||||
|
||||
pretty-lint:
|
||||
stage: lint
|
||||
image: node:12
|
||||
before_script:
|
||||
- npm install
|
||||
- npm install prettier --no-save
|
||||
script:
|
||||
- npx prettier "**/*.yml" --check
|
||||
only:
|
||||
refs:
|
||||
- development
|
||||
- merge_requests
|
||||
- npx prettier '**/*.yml' --check
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"singleQuote": true,
|
||||
"printWidth": 90,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": true,
|
||||
"parser": "yaml"
|
||||
}
|
||||
|
||||
5
.prettierrc.yml
Normal file
5
.prettierrc.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
singleQuote: true
|
||||
printWidth: 90
|
||||
tabWidth: 2
|
||||
useTabs: false
|
||||
bracketSpacing: true
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
node_version: "12"
|
||||
node_gpg_key: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
|
||||
node_version: '12'
|
||||
node_gpg_key: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key'
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ dependencies: []
|
|||
|
||||
galaxy_info:
|
||||
author: sonny
|
||||
description: "NPM setup"
|
||||
license: "license GPLv3"
|
||||
description: 'NPM setup'
|
||||
license: 'license GPLv3'
|
||||
min_ansible_version: 2.7
|
||||
issue_tracker_url: "https://git.fudiggity.nl/sonny/ansible-playbooks/-/issues"
|
||||
issue_tracker_url: 'https://git.fudiggity.nl/sonny/ansible-playbooks/-/issues'
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
- name: load OS specific vars
|
||||
include_vars: "{{ item }}"
|
||||
include_vars: '{{ item }}'
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml"
|
||||
- "{{ ansible_distribution|lower }}.yml"
|
||||
- "{{ ansible_os_family|lower }}.yml"
|
||||
- '{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml'
|
||||
- '{{ ansible_distribution|lower }}.yml'
|
||||
- '{{ ansible_os_family|lower }}.yml'
|
||||
paths:
|
||||
- "{{ role_path }}/vars"
|
||||
- '{{ role_path }}/vars'
|
||||
|
||||
- name: update apt cache
|
||||
become: true
|
||||
|
|
@ -23,36 +23,36 @@
|
|||
- name: install needed tools
|
||||
become: yes
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name: '{{ item }}'
|
||||
state: present
|
||||
loop: "{{ pre_packages }}"
|
||||
loop: '{{ pre_packages }}'
|
||||
|
||||
- name: add nodesource apt key
|
||||
become: yes
|
||||
apt_key:
|
||||
url: "{{ node_gpg_key }}"
|
||||
url: '{{ node_gpg_key }}'
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
||||
|
||||
- name: add nodesource source
|
||||
become: yes
|
||||
template:
|
||||
src: "nodesource.list.j2"
|
||||
dest: "/etc/apt/sources.list.d/nodesource.list"
|
||||
mode: "0600"
|
||||
src: 'nodesource.list.j2'
|
||||
dest: '/etc/apt/sources.list.d/nodesource.list'
|
||||
mode: '0600'
|
||||
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
||||
|
||||
- name: create apt pinning file
|
||||
become: yes
|
||||
template:
|
||||
src: "nodesource.j2"
|
||||
dest: "/etc/apt/preferences.d/nodesource"
|
||||
mode: "0644"
|
||||
src: 'nodesource.j2'
|
||||
dest: '/etc/apt/preferences.d/nodesource'
|
||||
mode: '0644'
|
||||
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
||||
|
||||
- name: install front-end packages
|
||||
become: yes
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name: '{{ item }}'
|
||||
state: present
|
||||
loop: "{{ packages }}"
|
||||
loop: '{{ packages }}'
|
||||
|
|
|
|||
Reference in a new issue