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
|
- hosts: localhost
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: load OS specific vars
|
- name: install packages
|
||||||
include_vars: '{{ item }}'
|
become: true
|
||||||
with_first_found:
|
package:
|
||||||
- files:
|
name: '{{ item }}'
|
||||||
- '{{ ansible_distribution|lower }}-{{ ansible_distribution_release|lower }}.yml'
|
state: present
|
||||||
- '{{ ansible_distribution|lower }}.yml'
|
loop: '{{ packages }}'
|
||||||
- '{{ ansible_os_family|lower }}.yml'
|
|
||||||
paths:
|
|
||||||
- 'vars/'
|
|
||||||
- name: add gitlab to known hosts
|
- name: add gitlab to known hosts
|
||||||
include_role:
|
include_role:
|
||||||
name: common
|
name: common
|
||||||
|
|
@ -17,12 +14,6 @@
|
||||||
user: '{{ ansible_user_id }}'
|
user: '{{ ansible_user_id }}'
|
||||||
items:
|
items:
|
||||||
- { domain: '{{ gitlab_domain }}', key: '{{ gitlab_host_key }}' }
|
- { domain: '{{ gitlab_domain }}', key: '{{ gitlab_host_key }}' }
|
||||||
- name: install packages
|
|
||||||
become: true
|
|
||||||
package:
|
|
||||||
name: '{{ item }}'
|
|
||||||
state: present
|
|
||||||
loop: '{{ packages }}'
|
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
- npm
|
- npm
|
||||||
|
|
@ -35,3 +26,6 @@
|
||||||
- import_tasks: 'tasks/coc.yml'
|
- import_tasks: 'tasks/coc.yml'
|
||||||
vars_files:
|
vars_files:
|
||||||
- 'vars/main.yml'
|
- '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