25 lines
606 B
YAML
25 lines
606 B
YAML
---
|
|
- hosts: instances
|
|
remote_user: cloud-user
|
|
become: true
|
|
vars:
|
|
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
|
|
tasks:
|
|
- name: copy dns server
|
|
copy:
|
|
src: /etc/resolv.conf
|
|
dest: /etc/resolv.conf
|
|
mode: 0644
|
|
|
|
- name: copy necessary repos
|
|
copy:
|
|
src: /root/rhel9.repo/
|
|
dest: /etc/yum.repos.d/rhel9.repo
|
|
mode: 0644
|
|
|
|
- name: copy .ssh dir to root
|
|
shell: cp -r /home/cloud-user/.ssh/ /root/ && chmod -R 0600 /root/.ssh/
|
|
|
|
- name: install podman and wget
|
|
shell: yum install wget -y && yum install podman -y
|