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:
|
stages:
|
||||||
- lint
|
- lint
|
||||||
- test
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
key: "$CI_COMMIT_REF_SLUG"
|
key: $CI_COMMIT_REF_SLUG
|
||||||
paths:
|
paths:
|
||||||
- .cache/pip
|
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
|
||||||
lint:
|
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
|
stage: lint
|
||||||
image: node:12
|
image: node:12
|
||||||
before_script:
|
before_script:
|
||||||
- npm install
|
- npm install prettier --no-save
|
||||||
script:
|
script:
|
||||||
- npx prettier "**/*.yml" --check
|
- npx prettier '**/*.yml' --check
|
||||||
only:
|
|
||||||
refs:
|
|
||||||
- development
|
|
||||||
- merge_requests
|
|
||||||
|
|
|
||||||
|
|
@ -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_version: '12'
|
||||||
node_gpg_key: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
|
node_gpg_key: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key'
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@ dependencies: []
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: sonny
|
author: sonny
|
||||||
description: "NPM setup"
|
description: 'NPM setup'
|
||||||
license: "license GPLv3"
|
license: 'license GPLv3'
|
||||||
min_ansible_version: 2.7
|
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:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
- name: load OS specific vars
|
- name: load OS specific vars
|
||||||
include_vars: "{{ item }}"
|
include_vars: '{{ item }}'
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml"
|
- '{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml'
|
||||||
- "{{ ansible_distribution|lower }}.yml"
|
- '{{ ansible_distribution|lower }}.yml'
|
||||||
- "{{ ansible_os_family|lower }}.yml"
|
- '{{ ansible_os_family|lower }}.yml'
|
||||||
paths:
|
paths:
|
||||||
- "{{ role_path }}/vars"
|
- '{{ role_path }}/vars'
|
||||||
|
|
||||||
- name: update apt cache
|
- name: update apt cache
|
||||||
become: true
|
become: true
|
||||||
|
|
@ -23,36 +23,36 @@
|
||||||
- name: install needed tools
|
- name: install needed tools
|
||||||
become: yes
|
become: yes
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
loop: "{{ pre_packages }}"
|
loop: '{{ pre_packages }}'
|
||||||
|
|
||||||
- name: add nodesource apt key
|
- name: add nodesource apt key
|
||||||
become: yes
|
become: yes
|
||||||
apt_key:
|
apt_key:
|
||||||
url: "{{ node_gpg_key }}"
|
url: '{{ node_gpg_key }}'
|
||||||
state: present
|
state: present
|
||||||
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
||||||
|
|
||||||
- name: add nodesource source
|
- name: add nodesource source
|
||||||
become: yes
|
become: yes
|
||||||
template:
|
template:
|
||||||
src: "nodesource.list.j2"
|
src: 'nodesource.list.j2'
|
||||||
dest: "/etc/apt/sources.list.d/nodesource.list"
|
dest: '/etc/apt/sources.list.d/nodesource.list'
|
||||||
mode: "0600"
|
mode: '0600'
|
||||||
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
||||||
|
|
||||||
- name: create apt pinning file
|
- name: create apt pinning file
|
||||||
become: yes
|
become: yes
|
||||||
template:
|
template:
|
||||||
src: "nodesource.j2"
|
src: 'nodesource.j2'
|
||||||
dest: "/etc/apt/preferences.d/nodesource"
|
dest: '/etc/apt/preferences.d/nodesource'
|
||||||
mode: "0644"
|
mode: '0644'
|
||||||
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
when: ansible_facts['os_family'] == "Debian" or ansible_facts['os_family'] == "Ubuntu"
|
||||||
|
|
||||||
- name: install front-end packages
|
- name: install front-end packages
|
||||||
become: yes
|
become: yes
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
loop: "{{ packages }}"
|
loop: '{{ packages }}'
|
||||||
|
|
|
||||||
Reference in a new issue