-
Notifications
You must be signed in to change notification settings - Fork 0
/
ansible_repo_enable_and_update.yml
36 lines (31 loc) · 1.39 KB
/
ansible_repo_enable_and_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
# Red Hat Insights has recommended one or more actions for you, a system administrator, to review and if you
# deem appropriate, deploy on your systems running Red Hat software. Based on the analysis, we have automatically
# generated an Ansible Playbook for you. Please review and test the recommended actions and the Playbook as
# they may contain configuration changes, updates, reboots and/or other changes to your systems. Red Hat is not
# responsible for any adverse outcomes related to these recommendations or Playbooks.
#
# ansible_repo_enable
# https://cloud.redhat.com/insights/remediations/398513be-4ec6-4a9f-ba13-e85876a8e430
# Generated by Red Hat Insights on Tue, 06 Aug 2019 16:05:37 GMT
# New Ansible Engine packages are inaccessible when dedicated Ansible repo is not enabled
# Identifier: (advisor:ansible_deprecated_repo|ANSIBLE_DEPRECATED_REPO,fix)
# Version: 6d5af87defecc699f107e4a054df084c94026870
- name: Enable ansible repo and update ansible package
hosts: "rhel7-syno-vm01.local"
become: true
tasks:
- name: Enable ansible repo
command: subscription-manager repos --enable=rhel-7-server-ansible-2-rpms
- name: Update ansible package
yum:
name: ansible
state: latest
- name: run insights
hosts: "rhel7-syno-vm01.local"
become: True
gather_facts: False
tasks:
- name: run insights
command: insights-client
changed_when: false