-
-
Save jeffpatton1971/5018cfe457c18d523abe to your computer and use it in GitHub Desktop.
pillar highstate issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@salt:/srv/pillar# cat top.sls | |
base: | |
'*': | |
- admins | |
- users | |
# | |
# Error message | |
# | |
root@salt:~# salt 'ns1*' state.highstate | |
ns1.dev.irisbylowes.com: | |
---------- | |
ID: states | |
Function: no.None | |
Result: False | |
Comment: No Top file or external nodes data matches found | |
Started: | |
Duration: | |
Changes: | |
Summary | |
------------ | |
Succeeded: 0 | |
Failed: 1 | |
------------ | |
Total states run: 1 | |
# | |
# tree structure | |
# | |
/srv/ | |
├── pillar | |
│ ├── admins.sls | |
│ ├── top.sls | |
│ └── users.sls | |
└── salt | |
└── admins.sls | |
# | |
# Created /srv/salt/top.sls | |
# | |
root@salt:/srv# salt 'ns1*' state.highstate | |
ns1.dev.irisbylowes.com: | |
---------- | |
ID: states | |
Function: no.None | |
Result: False | |
Comment: No Top file or external nodes data matches found | |
Started: | |
Duration: | |
Changes: | |
Summary | |
------------ | |
Succeeded: 0 | |
Failed: 1 | |
------------ | |
Total states run: 1 | |
root@salt:/srv# cat salt/top.sls | |
base: | |
'*': | |
# | |
# Users.sls and Admins.sls are identical for the most part, there are extra settings in the Admins.sls file | |
# | |
root@salt:/srv# cat pillar/users.sls | |
users: | |
tuser1: | |
fullname: Test E Tester | |
state: present | |
groups: | |
- dev | |
pub_ssh_keys: | |
- ssh-rsa | |
# | |
# Admins.sls | |
# | |
admins: | |
jpatton: | |
fullname: Jeffrey Patton | |
state: present | |
groups: | |
- adm | |
- root | |
pub_ssh_keys: | |
- ssh-rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for username, details in pillar.get('users', {}).items() %} | |
{{ username }}: | |
user: | |
- {{ user.state }}: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment