Pillar is also one of the most important components of saltstack, and its role is to define any data related to the controlled host, and the defined data can be used by other components such as templates, State, API, etc. The data defined in pillar is associated with the minion of different business features so that different minion can only see their own matching data, so pillar security is very high, suitable for some more sensitive data, which is t
default shell
Unique
Requirement is unique UID, default is True
System
Select UID between First_system_uid and last_system_uid, default = False
FullName
User's full name
Roomnumber
User Room Number
Workphone
User Work Phone
HomePhone
User Home Phone
Da
status statements You cannot declare/ETC/MOTD as an ID at the same time: motd_perms:file.managed:Nbsp;-name:/etc/motd-mode:644motd_quote: file.append:-name:/etc/motd-text : "Ofallsmells,bread;ofalltastes,salt." Another common reason is that if the ID declaration is long, it needs to be referenced in multiple places. For example, the following example, use mywebsite to replace /etc/apache2/sites-available/mywebsite.com can be:mywebsite: file.managed:-name:/etc/apache2/sites-available/mywebsite.c
cause Minion end to be added to master's minions_denied directory, delete/etc/salt/pki/master/minions and/etc/salt/pki/master/ This node IP in the minions_denied directory/var/log/salt/minion logs to see the cause of the errorThe-n parameter specifies a set of IPs, which need to be configured with the group name and the included ip:nodegroups in the/etc/salt/master fileSalt "*" Cmd.run "W" executes commands on the nodeThe Salt "*" Cmd.script salt://test.sh executes the test.sh script on the nod
allows you to call any number of external pillar interfaces when collecting pillar data. This configuration is based on the ext_pillar function from which you can find this function https://github.com/saltstack/salt/blob/develop/salt/pillarBy default, this ext_pillar interface is not configured to run.Default Value: None
ext_pillar: - hiera: /etc/hiera.yaml - cmd_yaml: cat /etc/salt/yaml - reclass: inventory_base_uri: /etc/reclass
Here we can f
to none if func is not none and func not in instance. _ mixin_after_parsed_funcs: instance. _ mixin_after_parsed_funcs.append (func) # This list is empty if it is started, however, the # MARK process _
The next step is to call the _ init _ () method of optionparser to initializeNext, call the parse_args method of optionparser.
Def parse_args (self, argS = none, values = none): Options, argS = optparse. optionparser. parse_args (self, argS, values) # The options value above is {'daemon': false,
Configure the saltstack module for normal users.
Use client_acl1. Overview: enable special modules on the master for non-root system users. These module names can be expressed using regular expressions and cannot be specified for which minion commands are executed. To execute a command, you only need to switch to a specific user without authentication. 2. Enable Configuration:
Vim/etc/salt/masterclient_acl: test:-test. ping-cmd .*
Configuration exp
Preface:
I am working on a cluster configuration platform recently. I have also done a similar demo before. I remember that I used the paramiko module last year. I first said that I used ssh to configure the connection, pexpect is also sometimes used for interaction. In complex configurations, problems often occur. The configuration mainly involves the regular expression matching.
Now we are in a new company. The first thing we need to do is to refactor the code to build a configuration tool fo
Syndic is used by saltstack for cluster deployment. The general structure Syndic is a special Minion. The syndic class inherits from the minion class. syndic can be regarded as a proxy and only performs data transmission. Syndic has been installed when the master is installed on centos. You only need to set order_master of the topmaster to true, and set syndic_master of syndic to the hostname or IP address of the topmaster. The following is an in
following options:
Name: Specifies the username to be deleted.
Purge: Set to clear User Files (Home Directory)
Force: if the user is currently logged on, the absent state will fail. If the _ force _ option is set to true, the user will be deleted even if the user is currently logged on.
When managing users, you must specify at least _ User. Present _ or _ User. Absent _. Other options are optional, such as _ uid _, _ GID _, and _ home.
Users. SLS
The following is an example of a State Decl
-saltstack Configuration1, copy installation package to salt/redis/files/2, copy configuration file to salt/redis/files/3, copy startup script to salt/redis/files/directory, no to create;Install.sls is as follows:
File.managed:-Name:/usr/local/src/redis-3.0.7.tar.gz-Source:salt://redis/files/redis-3.0.7.tar.gz-User:root-Group:root-mode:755Cmd.run:-Name:cd/usr/local/src Tar XF redis-3.0.7.tar.gz cd redis-3.0.7 Prefix=/usr/local/redi s Install-Unles
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.