Merge pull request #177 from noelmcloughlin/vimrc
Dont require vim-formula by default
This commit is contained in:
commit
7ab8f2ed06
@ -45,7 +45,7 @@ True' in pillar per user. Defaults to False.
|
|||||||
|
|
||||||
Ensures the vimrc file exists in the users home directory. Sets 'manage_vimrc:
|
Ensures the vimrc file exists in the users home directory. Sets 'manage_vimrc:
|
||||||
True' in pillar per user. Defaults to False.
|
True' in pillar per user. Defaults to False.
|
||||||
This depends on the vim-formula to be installed.
|
This depends on the vim-formula being available and pillar `users:use_vim_formula: True`.
|
||||||
|
|
||||||
``users.user_files``
|
``users.user_files``
|
||||||
---------------
|
---------------
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
users-formula:
|
users-formula:
|
||||||
|
use_vim_formula: True
|
||||||
lookup: # override the defauls in map.jinja
|
lookup: # override the defauls in map.jinja
|
||||||
root_group: root
|
root_group: root
|
||||||
|
|
||||||
|
6
users/defaults.yaml
Normal file
6
users/defaults.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
|
||||||
|
users-formula:
|
||||||
|
use_vim_formula: False
|
||||||
|
|
@ -1,6 +1,8 @@
|
|||||||
# vim: sts=2 ts=2 sw=2 et ai
|
# vim: sts=2 ts=2 sw=2 et ai
|
||||||
|
|
||||||
{% set users = salt['grains.filter_by']({
|
{% set users = salt['grains.filter_by'](
|
||||||
|
defaults,
|
||||||
|
merge=salt['grains.filter_by']({
|
||||||
'MacOS': {
|
'MacOS': {
|
||||||
'sudoers_dir': '/etc/sudoers.d',
|
'sudoers_dir': '/etc/sudoers.d',
|
||||||
'sudoers_file': '/etc/sudoers',
|
'sudoers_file': '/etc/sudoers',
|
||||||
@ -66,7 +68,9 @@
|
|||||||
'sudo_package': 'sudo',
|
'sudo_package': 'sudo',
|
||||||
'googleauth_package': 'libpam-google-authenticator',
|
'googleauth_package': 'libpam-google-authenticator',
|
||||||
},
|
},
|
||||||
}, merge=salt['pillar.get']('users-formula:lookup')) %}
|
}, merge=salt['pillar.get']('users-formula:lookup')),
|
||||||
|
base='users',
|
||||||
|
) %}
|
||||||
|
|
||||||
{% if grains.os == 'MacOS' %}
|
{% if grains.os == 'MacOS' %}
|
||||||
{% set group = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
|
{% set group = salt['cmd.run']("stat -f '%Sg' /dev/console") %}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{% from "users/map.jinja" import users with context %}
|
{% from "users/map.jinja" import users with context %}
|
||||||
|
|
||||||
|
{% if users.use_vim_formula %}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- users
|
- users
|
||||||
- vim
|
- vim
|
||||||
@ -28,3 +31,5 @@ users_{{ name }}_user_vimrc:
|
|||||||
- salt://users/files/vimrc/vimrc
|
- salt://users/files/vimrc/vimrc
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user