标签:keyword HERE cep imp UNC www add 任务 .text
https://docs.saltstack.com/en/getstarted/system/plugins.html
plug-ins(左边):场景可插拔包-变成命令

|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
apache:#yum 安装pkg.installed: [] service.running: #apache必须运行 - reload: True - watch: - file: /etc/httpd/conf/httpd.conf #如果配置文件有变更就重启 user.present: - uid: 87 #- username: alex - gid: 87 - home: /var/www/html - shell: /bin/nologin - require: - group: apache group.present: #apache组不存在上面的命令不执行 - gid: 87 - require: - pkg: apache/etc/httpd/conf/httpd.conf: #每执行一次配置文件就更新一次 file.managed: - source: salt://apache/httpd.conf - user: root - group: root - mode: 644 |

from django.db import models
# Create your models here.
class Host(models.Model):
‘‘‘
salt里面根本用不上ip,他是使用id或者grup组ID和hostname区别主机的唯一性的
saltsack服务器端和客户端是如何认证的 ?
客户端和服务器端的认证是通过key来进行认证,客户端主动找服务器验证,
我想被你管理,服务器有一个待审批想被管理的列表,同意后就可以管理了
‘‘‘
hostname = models.CharField(max_length=128,unique=True)
key = models.TextField()
status_choices = ((0,‘Waiting Approval‘),
(1,‘Accepted‘),
(2,‘Rejected‘))
‘‘‘每个主机的三个状态等待、允许、拒绝‘‘‘
def __str__(self):
return self.hostname
class HostGroup(models.Model):
name = models.CharField(max_length=64,unique=True)
hosts = models.ManyToManyField(Host,blank=True)
def __str__(self):
return self.name
标签:keyword HERE cep imp UNC www add 任务 .text
原文地址:https://www.cnblogs.com/luoahong/p/9419074.html