mirror of
https://github.com/saltstack-formulas/salt-formula.git
synced 2025-04-21 12:34:37 +02:00
Merge 23eb122aa9f64fd52dbe18b5147b684c95040970 into b00844fbe4695ad1ec40c4606ff6a5eb81edef3a
This commit is contained in:
commit
bec5342009
@ -106,6 +106,23 @@ salt:
|
||||
- IAD
|
||||
- SYD
|
||||
- HKG
|
||||
|
||||
# Configure the proxmox providers you want to use (one per cluster, normally)
|
||||
proxmox_providers:
|
||||
test:
|
||||
user: root@pam
|
||||
password: password
|
||||
url: prox-test.mydomain
|
||||
live:
|
||||
user: root@pam
|
||||
password: password
|
||||
url: prox-live.mydomain
|
||||
|
||||
# You'll need to hand-edit your profiles, but you can insert a default root password
|
||||
# from here
|
||||
proxmox_profile_defaults:
|
||||
default_password: somesecretpassword
|
||||
|
||||
reactor:
|
||||
- 'deploy':
|
||||
- /srv/salt/reactors/deploy.sls
|
||||
|
19
salt/files/cloud.profiles.d/proxmox.conf
Normal file
19
salt/files/cloud.profiles.d/proxmox.conf
Normal file
@ -0,0 +1,19 @@
|
||||
# This file managed by Salt, do not edit by hand!!
|
||||
{% set cloud = salt['pillar.get']('salt:cloud', {}) -%}
|
||||
{% if 'proxmox_profile_defaults' in cloud %}
|
||||
{% set defaults = cloud.get('proxmox_profile_defaults') %}
|
||||
|
||||
prox-test-1:
|
||||
provider: proxmox-test
|
||||
image: ISO:vztmpl/debian-7.0-standard_7.0-2_i386.tar.gz
|
||||
technology: openvz
|
||||
host: testvm01
|
||||
cpus: 2
|
||||
memory: 2048
|
||||
swap: 2048
|
||||
disk: 5
|
||||
password: {{ defaults.get('default_password', 'password') }}
|
||||
ip_address: 192.168.1.100
|
||||
|
||||
{% endif %}
|
||||
|
11
salt/files/cloud.providers.d/proxmox.conf
Normal file
11
salt/files/cloud.providers.d/proxmox.conf
Normal file
@ -0,0 +1,11 @@
|
||||
# This file managed by Salt, do not edit by hand!!
|
||||
{% set cloud = salt['pillar.get']('salt:cloud', {}) -%}
|
||||
{% for name, config in cloud.get('proxmox_providers',dict()).items() %}
|
||||
proxmox-{{ name }}:
|
||||
minion:
|
||||
master: {{ cloud.get('master', 'salt') }}
|
||||
user: {{ config.get('user', '') }}
|
||||
password: {{ config.get('password', '') }}
|
||||
url: {{ config.get('url', '') }}
|
||||
provider: proxmox
|
||||
{% endfor %}
|
@ -282,11 +282,9 @@ event_return_blacklist:
|
||||
# - network.*
|
||||
{% if 'client_acl' in cfg_master -%}
|
||||
client_acl:
|
||||
{%- for name, user in cfg_master['client_acl']|dictsort %}
|
||||
{%- for name, items in cfg_master['client_acl']|dictsort %}
|
||||
{{ name}}:
|
||||
{%- for command in user %}
|
||||
- {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %}
|
||||
{%- endfor -%}
|
||||
{{ items | yaml }}
|
||||
{%- endfor -%}
|
||||
{% elif 'client_acl' in cfg_salt -%}
|
||||
client_acl:
|
||||
|
@ -32,6 +32,12 @@ master:
|
||||
# choose a random master
|
||||
{{ get_config('random_master', 'False') }}
|
||||
|
||||
# Set the master type
|
||||
{{ get_config('master_type', 'str') }}
|
||||
|
||||
# Set the master alive interval (if master type set to failover)
|
||||
{{ get_config('master_alive_interval', '30') }}
|
||||
|
||||
# use IPv6
|
||||
{{ get_config('ipv6', 'False') }}
|
||||
|
||||
@ -150,7 +156,7 @@ mine_functions:
|
||||
|
||||
# include extra config
|
||||
{% if 'include' in cfg_minion -%}
|
||||
{% if isinstance(cfg_minion['include'], list) -%}
|
||||
{% if cfg_minion['include'] is iterable -%}
|
||||
include:
|
||||
{% for include in cfg_minion['include'] -%}
|
||||
- {{ include }}
|
||||
@ -159,7 +165,7 @@ mine_functions:
|
||||
include: cfg_minion['include']
|
||||
{% endif -%}
|
||||
{% elif 'include' in cfg_salt -%}
|
||||
{% if isinstance(cfg_salt['include'], list) -%}
|
||||
{% if cfg_salt['include'] is iterable -%}
|
||||
include:
|
||||
{% for include in cfg_salt['include'] -%}
|
||||
- {{ include }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user