In the process of deleting groups that I find to be not needed. Is there a way to see if the group is tied to anything before deleting? Example: is the group used as an approver on a gate or PR rule?
TinyRickSystems
u/TinyRickSystems
Does anyone know if it is possible to have Slack fire off a webook only if certain criteria is met? Example would be someone @'ing a group from within a certain #channel.
I have a dev branch I need to merge into my main branch. The dev branch I need to merge from a specific commit from Mar 1. The main branch has different commits up to Mar 20 and must be missing a lot from the dev branch. What is the best way of doing this? Trying to research it but the examples are obviously very generic so I figured I'd ask my specific problem in hopes of guidance.
I am trying to migrate my Release GUI pipelines to YAML based pipelines using source control. One issue is I am trying to copy the current ability we have in a pre-deployment gate on a Release pipeline stage that checks for work items, see docs here. This gives the ability to stop a specific stage in all Release pipelines based on an open work item. Can I do the same with a YAML pipeline?
I am using Invoke-RestMethod to do a POST and would like to parse out a value I am returned. The reply is HTML with a bunch of stuff but I only care about this part and what is supplied as the value:
<form id="SamlForm" method="post">
<input name="RelayState" id="RelayState" type="hidden" />
<input name="SAMLResponse" id="SAMLResponse" type="hidden" value="theTextIwant..." />
Any help is appreciated.
Is is possible to somehow call these together so I get the full output in one, instead of doing them separate and trying to mash them together in Excel.
salt \* pkg.version salt-minion
salt \* grains.item osfullname osrelease oscodename
So ideally I could do:
salt \* grains.item osfullname osrelease oscodename && pkg.version salt-minion
Hi all, I have a beacon working on OL 7.8 but when I try the same config on OL 7.7 it does not fire. I am not seeing anything in the minion logs when it starts, no errors on the beacon. Anything you can think of to check? The simple beacon:
beacons:
inotify:
- files:
/etc:
mask:
- modify
- close_write
- delete
- attrib
recurse: True
auto_add: True
We currently use SaltStack and use what they call "Beacons" to monitor changes to files or services, etc... To monitor files Salt uses pyinotify to watch the file, and because of this use of inotify sometimes file changes go unnoticed due to how everything works. What does Ansible use to monitor files? Does anyone else see this type of behavior?
Does anyone here use Enterprise? We are looking into it, but are getting hung up on simple features like LDAP. Setting up LDAP is much harder than it should be, it queries all your groups then you must select the groups you want to use. With thousands of groups and no way to search in the list it is basically impossible. Their suggestion is filtering in the LDAP query but that is silly to me as we don't want to have to change that every time someone needs access. I haven't had issues like this with LDAP and other tools so I am curious on others opinions here.
Is there a way to mange the kernel version to a specific version? In the docs (https://docs.saltstack.com/en/latest/ref/states/all/salt.states.kernelpkg.html) it looks like it can only do upgrade to latest available.
I have a SALT specific Jinja question. I have a file that needs a certain line of text at the top if it is a VMware vm. I have jinja code that determines this but I am not sure how it renders the file.
This is the jinja:
{% if salt['grains.get']('virtual','KVM') == 'VMware' %}
tinker panic 0
{% endif %}
When the file is rendered and placed on the machine it looks like this:
Blank line
tinker panic 0
Blank line
Does the jinja render as blank lines here? Should I change it to
{% if salt['grains.get']('virtual','KVM') == 'VMware' %}tinker panic 0{% endif %}
I am trying to fresh install or update a python module, specifically pyinotify. Currently I have 0.9.4 on my servers and am trying to move to 0.9.6 to have SALT beacons work correctly. I am trying to do this all via SALT but am having issues with this module. I can't get any pkg.installed state to work, I receive an error saying no package available.
I was able to manually do this by deleting /usr/lib/python2.7/site-packages/pyinotify* and then rerunning pip install pyinotify. Is there a better way (automated via SALT) to do this? Thanks in advance for any input.
I am trying to do some config drift management and would like to push out a specific version of files. In this example resolv.conf and nscd.conf. After I place the correct file via the state in the same state I want to restart the service it applies to. Is this a possible state? Below is some sudo code, just not sure if the watch pkg is needed and if so what pkg to watch for this example:
{% import_yaml "dns/map.yaml" as osmap %}
{% set dns = salt['grains.filter_by'](osmap) %}
dns_conf:
file.managed:
- name: {{dns.file}}
- source: {{dns.source_file}}
- user: root
- group: root
- mode: 644
network:
service.running:
I am trying to breakdown my Top.sls further to use pillar data. We have two fields in the pillar I would like to match on. What is the correct way to write this? I tried
'pillarfield1:keydata1 and pillarfield2:keydata2'
- match: pillar
I am trying to filter by os and not os_family since they return different values. The default for grains.filter_by is the os_family grain.
I am trying to place a conf file in a certain directory based on OS and I am having trouble.
Here is my map.yaml that I use to define the OS name and file location and also my init.sls
map.yaml
RedHat:
name: nscd
file: /etc/nscd.conf
source_file: salt://srv/salt/nscd-NEW/files/RedHat.conf
SUSE:
name: nscd
file: /etc/nscd.conf
source_file: salt://srv/salt/nscd-NEW/files/SUSE.conf
OEL:
name: nscd
file: /etc/nscd.conf
source_file: salt://srv/salt/nscd-NEW/files/OEL.conf
init.sls
{%