saltstack-formulas / users-formula

Configure users via pillar
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
99 stars 362 forks source link

Nuwbie issue with setup #218

Closed ingtarius closed 4 years ago

ingtarius commented 4 years ago

Hello! I start learning salt app for few days ago and now try to manage users with this formula I try simplest task - add one user to all hosts Folder struct. I use docker-compose for tests, master folder mount insude container

├── confs │   └── master_ │   └── master ├── docker-compose.yaml ├── master │   ├── admins.sls │   ├── common │   │   ├── grub.sls │   │   ├── packages.sls │   │   ├── sysctl_RWmem.sls │   │   └── sysctl.sls │   ├── configs │   │   └── grub.conf.default │   ├── formulas │   │   └── users-formula │   │   ├── AUTHORS.md │   │   ├── bin │   │   │   └── kitchen │   │   ├── CHANGELOG.md │   │   ├── commitlint.config.js │   │   ├── docs │   │   │   ├── AUTHORS.rst │   │   │   ├── CHANGELOG.rst │   │   │   └── README.rst │   │   ├── FORMULA │   │   ├── Gemfile │   │   ├── kitchen.yml │   │   ├── LICENSE │   │   ├── pillar.example │   │   ├── pre-commit_semantic-release.sh │   │   ├── release.config.js │   │   ├── release-rules.js │   │   ├── test │   │   │   ├── integration │   │   │   │   ├── default │   │   │   │   │   ├── controls │   │   │   │   │   │   └── config_spec.rb │   │   │   │   │   ├── inspec.yml │   │   │   │   │   └── README.md │   │   │   │   └── vimrc │   │   │   │   ├── controls │   │   │   │   │   └── config_spec.rb │   │   │   │   ├── inspec.yml │   │   │   │   └── README.md │   │   │   └── salt │   │   │   └── pillar │   │   │   ├── default.sls │   │   │   └── vimrc.sls │   │   └── users │   │   ├── bashrc.sls │   │   ├── defaults.yaml │   │   ├── files │   │   │   ├── bashrc │   │   │   │   └── bashrc │   │   │   ├── profile │   │   │   │   └── profile │   │   │   ├── user │   │   │   └── vimrc │   │   │   └── vimrc │   │   ├── googleauth.sls │   │   ├── init.sls │   │   ├── map.jinja │   │   ├── polkit.sls │   │   ├── profile.sls │   │   ├── sudo.sls │   │   ├── user_files.sls │   │   └── vimrc.sls │   └── top.sls └── README.md

top.sls:

base: '*':

  • common.packages
  • common.sysctl
  • common.grub
  • admins 'E@salt-minion1':
  • common.sysctl_RWmem

and admins.sls

users: auser: fullname: Simple User

And after this i get error on minion -

local: Data failed to compile:

State 'users' in SLS 'admins' is not formed as a list

I find inside formula folder pillar.example file, but dont know, how to use it. If i add pillar folder and copy top.sls and admins.sls files - nothing happen Can you help me with this?

ingtarius commented 4 years ago

https://medium.com/@siddharth.d/configuration-management-with-salt-formulas-and-pillar-79b180014b58 find this manual and its work. sorry ;)