Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
miteshget committed Nov 19, 2024
1 parent a008d14 commit 34163da
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
8 changes: 6 additions & 2 deletions ansible/roles/ansible_bu_setup_workshop/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ ansible_bu_setup_workshop_aap_packages:
- ansible-core
- ansible-navigator

# Ansible BU exercise base directory
# Ansible BU exercise content repo
ansible_bu_setup_workshop_content_git_repo: https://github.com/ansible/workshops.git
ansible_bu_setup_workshop_content_git_version: devel

# Ansible BU exercise base directory
ansible_bu_setup_workshop_exercise_src: ansible_rhel
# Destination directory where exercise will be copied
# Destination directory where exercise will be copied
# /home/{{ student_name }}/[Destination directory]
ansible_bu_setup_workshop_exercise_dest: rhel-workshop

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Clone rhel-workshop
ansible.builtin.git:
repo: "{{ ansible_bu_setup_workshop_content_git_repo }}"
dest: /tmp/workshops
version: "{{ ansible_bu_setup_workshop_content_git_version }}"

- name: Copy rhel-workshop to users home
ansible.builtin.copy:
src: "/tmp/workshops/exercises/{{ ansible_bu_setup_workshop_exercise_src }}/"
dest: "/home/{{ student_name }}/{{ ansible_bu_setup_workshop_exercise_dest }}/"
remote_src: true
owner: "{{ student_name }}"
group: "{{ student_name }}"
mode: '0755'

- name: Clean workshop clone directory
ansible.builtin.file:
path: "/tmp/workshops"
state: absent
23 changes: 4 additions & 19 deletions ansible/roles/ansible_bu_setup_workshop/tasks/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,8 @@
dest: "/home/{{ student_name }}/setup.yml"
owner: "{{ student_name }}"
group: "{{ student_name }}"

- name: Clone rhel-workshop
ansible.builtin.git:
repo: https://github.com/ansible/workshops.git
dest: /tmp/workshops
version: devel

- name: Copy rhel-workshop to users home
ansible.builtin.copy:
src: "/tmp/workshops/exercises/{{ ansible_bu_setup_workshop_exercise_src }}/"
dest: "/home/{{ student_name }}/rhel-workshop/{{ ansible_bu_setup_workshop_exercise_dest }}/"
remote_src: true
owner: "{{ student_name }}"
group: "{{ student_name }}"
mode: '0755'

- name: Clean workshop clone directory
ansible.builtin.file:
path: "/tmp/workshops"
state: absent
- name: Clone workshop content
ansible.builtin.include_tasks:
file: ./common/clone-workshop-content.yml

0 comments on commit 34163da

Please sign in to comment.