Move platform specific vars
These will be ignored when not present
This commit is contained in:
parent
af7211830d
commit
0e5b42dcec
1 changed files with 9 additions and 15 deletions
24
playbook.yml
24
playbook.yml
|
|
@ -1,14 +1,11 @@
|
|||
- 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: install packages
|
||||
become: true
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
state: present
|
||||
loop: '{{ packages }}'
|
||||
- name: add gitlab to known hosts
|
||||
include_role:
|
||||
name: common
|
||||
|
|
@ -17,12 +14,6 @@
|
|||
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:
|
||||
- common
|
||||
- npm
|
||||
|
|
@ -35,3 +26,6 @@
|
|||
- import_tasks: 'tasks/coc.yml'
|
||||
vars_files:
|
||||
- 'vars/main.yml'
|
||||
- 'vars/{{ ansible_os_family|lower }}.yml'
|
||||
- 'vars/{{ ansible_distribution|lower }}.yml'
|
||||
- 'vars/{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue