mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-10 05:33:29 +01:00
Merge pull request #104 from pillarsdotnet/fix-vars
Fix variable loading.
This commit is contained in:
commit
a84bc84c22
2 changed files with 18 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Matt Willsher
|
author: Matt Willsher
|
||||||
description: OpenSSH SSH deamon configuration
|
description: OpenSSH SSH daemon configuration
|
||||||
company: Willsher Systems
|
company: Willsher Systems
|
||||||
license: LGPLv3
|
license: LGPLv3
|
||||||
min_ansible_version: 1.8
|
min_ansible_version: 1.8
|
||||||
|
|
|
@ -2,12 +2,24 @@
|
||||||
|
|
||||||
- name: Set OS dependent variables
|
- name: Set OS dependent variables
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
|
vars:
|
||||||
|
ansible_distribution_lts_offset: '{{
|
||||||
|
ansible_distribution_major_version|int % 2
|
||||||
|
if ansible_distribution == "Ubuntu"
|
||||||
|
else 0 }}'
|
||||||
|
ansible_distribution_lts_version: '{{
|
||||||
|
ansible_distribution_major_version|int -
|
||||||
|
ansible_distribution_lts_offset|int }}'
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml"
|
- files:
|
||||||
- "{{ ansible_distribution }}.yml"
|
- "{{ ansible_distribution }}_{{ ansible_distribution_lts_version }}.yml"
|
||||||
- "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
|
- "{{ ansible_distribution }}.yml"
|
||||||
- "{{ ansible_os_family }}.yml"
|
- "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
|
||||||
- default.yml
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
- default.yml
|
||||||
|
paths:
|
||||||
|
- '{{ role_path }}/vars'
|
||||||
|
- '{{ playbook_dir }}/vars'
|
||||||
|
|
||||||
- name: Override OS defaults
|
- name: Override OS defaults
|
||||||
block:
|
block:
|
||||||
|
|
Loading…
Reference in a new issue