Use simpler file structure

This commit is contained in:
Sonny Bakker 2021-01-29 21:47:47 +01:00
parent 633a61b6f2
commit af7211830d
24 changed files with 180 additions and 225 deletions

View file

@ -1,3 +1,37 @@
- hosts: localhost
pre_tasks:
- name: load OS specific vars
include_vars: '{{ item }}'
with_first_found:
- files:
- '{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml'
- '{{ ansible_distribution|lower }}.yml'
- '{{ ansible_os_family|lower }}.yml'
paths:
- 'vars/'
- name: add gitlab to known hosts
include_role:
name: common
tasks_from: 'known_hosts.yml'
vars:
user: '{{ ansible_user_id }}'
items:
- { domain: '{{ gitlab_domain }}', key: '{{ gitlab_host_key }}' }
- name: install packages
become: true
package:
name: '{{ item }}'
state: present
loop: '{{ packages }}'
roles:
- development
- common
- npm
tasks:
- import_tasks: 'tasks/main.yml'
- include_role:
name: common
tasks_from: 'poetry.yml'
- import_tasks: 'tasks/dotfiles.yml'
- import_tasks: 'tasks/coc.yml'
vars_files:
- 'vars/main.yml'