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
cat << EOF | foreman-rake console | |
Katello::ContentViewEnvironment.all.each do |cve| | |
ForemanTasks.async_task( | |
Actions::Candlepin::Environment::SetContent, | |
cve.content_view, | |
cve.owner, | |
cve, | |
) | |
end | |
EOF |
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
#!/bin/bash | |
# To enable screen logging press: Ctrl + b followed by H | |
grep -q tmux.log 2>/dev/null ~/.tmux.conf || cat << _EOF >> ~/.tmux.conf | |
bind-key H pipe-pane -o "exec cat >>$HOME/'#W-tmux.log'" \; display-message 'Toggled logging to $HOME/#W-tmux.log' | |
_EOF | |
tmux new -s tmux-logged | |
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
#!/bin/bash | |
# Criteria: | |
# Expected Column of the report: | |
# | |
# CV, CV Version, Lifecycle, Latest Kernel Package in the version | |
# | |
# Considerations: | |
# | |
# We will only choose those CV versions that have any lifecycle promoted to it. |
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
Requirements: | |
* Satellite 6.10 ( latest minor release ) installed on RHEL 7 | |
* Organization RedHat and Location GSS | |
* No Repo content is required to be enabled\synced | |
Breakfix Playbook: | |
~~~ | |
--- |
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
Requirements: | |
* Satellite 6.11 ( latest minor release ) installed on RHEL 7 or RHEL 8 | |
* Organization RedHat and Location GSS | |
* No contents\repo\manifest required | |
Breakfix Playbook: | |
~~~ | |
--- |
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
Requirements: | |
* Satellite 6.10 ( latest minor release ) installed on RHEL 7 | |
* Organization RedHat and Location GSS | |
Breakfix Playbook: | |
~~~ | |
--- | |
- name: Creating breakfix for candlepin_events failure in Satellite 6.10 |
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
#!/bin/bash | |
export path_of_repos='' | |
path_of_repos=$(echo "COPY (select base_path from core_distribution) TO STDOUT;" | su - postgres -c "psql pulpcore") | |
for repo in $path_of_repos | |
do | |
echo "COPY(select core_d.base_path,cpa.relative_path,ca.file from core_distribution as core_d RIGHT JOIN core_publication as cp ON core_d.publication_id=cp.pulp_id LEFT JOIN core_publishedartifact as cpa ON cp.pulp_id=cpa.publication_id LEFT JOIN core_contentartifact as core_ca ON core_ca.pulp_id=cpa.content_artifact_id LEFT JOIN core_artifact as ca ON ca.pulp_id=core_ca.artifact_id where core_d.base_path = '$repo' order by core_d.base_path) TO STDOUT WITH CSV" | su - postgres -c "psql pulpcore" | |
done > /tmp/repo_to_artifact.txt |
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
* Satellite 6.10+ is already installed and having an activation key created to register a system | |
* The client host has been registered with satellite , associated with "Default Organization view" CV + "Library" lifecycle and has been populated with remote execution ssh keys from satellite's foreman-proxy user. | |
i.e. Satellite should be able to run any commands, playbook, role etc. on this system via remote execution. | |
Manual Reproducer: | |
----------- | |
On the client system: |
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
#!/bin/bash | |
# Create directory /etc/pki/product/. | |
mkdir -p /etc/pki/product/ | |
# Remove existing 69.pem files | |
[ -f /etc/pki/product-default/69.pem ] && rm -f /etc/pki/product-default/69.pem | |
[ -f /etc/pki/product/69.pem ] && rm -f /etc/pki/product-default/69.pem | |
sleep 3 |
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
#!/bin/bash | |
# | |
## Assuming satellite 6.10 or 6.11 is installed with organization name RedHat. | |
## Also the "strace" package should be installed on the satellite server OS | |
for i in KATELLO_AGENT_STAT QPID_STAT; do unset $i; done | |
KATELLO_AGENT_STAT=$(awk '/enable_katello_agent:/{print $NF}' /etc/foreman-installer/scenarios.d/satellite-answers.yaml) | |
if [[ $KATELLO_AGENT_STAT = "false" ]] |