Managing configurations by using Ansible integration Red Hat Satellite 6.16 Configure Ansible integration in Satellite and use Ansible roles and playbooks to configure your hosts Red Hat Satellite Documentation Team satellite-doc-list@redhat.com

Commands:
satellite-installer --enable-foreman-proxy-plugin-ansible
subscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms
subscription-manager repos --enable=rhel-7-server-extras-rpms
satellite-maintain packages install rhel-system-roles
--- collections: - name: my_namespace.my_collection version: 1.2.3
ansible-vault encrypt /etc/ansible/roles/ Role_Name /vars/main.yml
chgrp foreman-proxy /etc/ansible/roles/ Role_Name /vars/main.yml chmod 0640 /etc/ansible/roles/ Role_Name /vars/main.yml
chown foreman-proxy:foreman-proxy /usr/share/foreman-proxy/.ansible_vault_password chmod 0400 /usr/share/foreman-proxy/.ansible_vault_password
[defaults] vault_password_file = /usr/share/foreman-proxy/.ansible_vault_password
name = Reboot and host.name = staging.example.com name = Reboot and host.name ~ *.staging.example.com name = "Restart service" and host_group.name = webservers
satellite-installer --foreman-proxy-plugin-remote-execution-script-mode=ssh
dnf install katello-pull-transport-migrate
yum install katello-pull-transport-migrate
systemctl status yggdrasild
hammer job-template create --file " Path_to_My_Template_File " --job-category " My_Category_Name " --name " My_Template_Name " --provider-type SSH
curl --header 'Content-Type: application/json' --request GET https:// satellite.example.com /ansible/api/v2/ansible_playbooks/fetch?proxy_id= My_capsule_ID
curl --data '{ "playbook_names": [" My_Playbook_Name "] }' --header 'Content-Type: application/json' --request PUT https:// satellite.example.com /ansible/api/v2/ansible_playbooks/sync?proxy_id= My_capsule_ID
curl -X PUT -H 'Content-Type: application/json' https:// satellite.example.com /ansible/api/v2/ansible_playbooks/sync?proxy_id= My_capsule_ID
hammer settings set --name=remote_execution_fallback_proxy --value=true
hammer settings set --name=remote_execution_global_proxy --value=true
mkdir /My_Remote_Working_Directory
chcon --reference=/tmp /My_Remote_Working_Directory
satellite-installer --foreman-proxy-plugin-ansible-working-dir /My_Remote_Working_Directory
ssh-copy-id -i ~foreman-proxy/.ssh/id_rsa_foreman_proxy.pub root@client.example.com
ssh -i ~foreman-proxy/.ssh/id_rsa_foreman_proxy root@client.example.com
ssh-keygen -p -f ~foreman-proxy/.ssh/id_rsa_foreman_proxy
mkdir ~/.ssh
curl https:// capsule.example.com :9090/ssh/pubkey >> ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
<%= snippet 'remote_execution_ssh_keys' %>
id -u foreman-proxy
umask 077
mkdir -p "/var/kerberos/krb5/user/ My_User_ID "
cp My_Client.keytab /var/kerberos/krb5/user/ My_User_ID /client.keytab
chown -R foreman-proxy:foreman-proxy "/var/kerberos/krb5/user/ My_User_ID "
chmod -wx "/var/kerberos/krb5/user/ My_User_ID /client.keytab"
restorecon -RvF /var/kerberos/krb5
satellite-installer --foreman-proxy-plugin-remote-execution-script-ssh-kerberos-auth true
hostgroup_fullname ~ " My_Host_Group *"
hammer settings set --name=remote_execution_global_proxy --value=false
hammer job-template list
hammer job-template info --id My_Template_ID
hammer job-invocation create --inputs My_Key_1 =" My_Value_1 ", My_Key_2 =" My_Value_2 ",... --job-template " My_Template_Name " --search-query " My_Search_Query "
satellite-installer --foreman-proxy-plugin-remote-execution-script-mqtt-rate-limit MAX_JOBS_NUMBER
satellite-installer --foreman-proxy-plugin-remote-execution-script-mqtt-rate-limit 200
systemctl start ansible-callback
systemctl status ansible-callback
satellite.example.com systemd[1]: Started Provisioning callback to Ansible Automation Controller
curl --data curl --data host_config_key= My_Host_Config_Key --insecure --show-error --silent https:// controller.example.com /api/v2/job_templates/ 8 /callback/
<%= render_template 'Package Action - SSH Default', :action => 'install', :package => 'nginx' %> <%= render_template 'Service Action - SSH Default', :action => 'start', :service_name => 'nginx' %>
<%= render_template 'Package Action - SSH Default', :action => 'install', :package => input("package") %>
restorecon -RvF <%= input("directory") %>
<%= render_template("Run Command - restorecon", :directory => "/home") %>
<%= render_template("Power Action - SSH Default", :action => "restart") %>