38 lines
735 B
YAML
38 lines
735 B
YAML
---
|
|
- name: check support
|
|
fail:
|
|
msg: Role not supported in your system
|
|
when: ansible_os_family != "RedHat"
|
|
|
|
- name: install ansible packages
|
|
package:
|
|
name: "{{ item }}"
|
|
state: installed
|
|
with_items:
|
|
- ansible
|
|
- git
|
|
- libvirt-client
|
|
- virt-install
|
|
- yamllint
|
|
|
|
- name: create private directory and force permissions
|
|
file:
|
|
path: /export/private
|
|
owner: root
|
|
group: root
|
|
mode: 0700
|
|
state: directory
|
|
|
|
- name: link private directory
|
|
file:
|
|
src: "/export/private"
|
|
dest: "/srv/private"
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
state: link
|
|
follow: false
|
|
|
|
- name: clone ansible repository
|
|
git:
|
|
dest: /srv/ansible
|
|
repo: https://git.foo.sh/ansible.git
|