Skip to content

Commit

Permalink
Change .github
Browse files Browse the repository at this point in the history
  • Loading branch information
Tompage1994 committed Apr 9, 2024
1 parent b85bc99 commit d21907e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .github/collection_index.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
title: {{ collection_name }}
has_children: true
---

# {{ collection_name }}
13 changes: 11 additions & 2 deletions .github/fix_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- name: Get collections
ansible.builtin.find:
path: "{{ r_tempfile.path }}/{{ outer_item}}/roles/"
path: "{{ r_tempfile.path }}/{{ outer_item }}/roles/"
file_type: directory
register: r_roles

Expand Down Expand Up @@ -38,14 +38,23 @@
line: |
---
layout: default
parent: {{ outer_item }}
---
loop: "{{ roles_list }}"

- name: Copy and rename readme
ansible.builtin.copy:
src: "{{ r_tempfile['path'] }}/{{ outer_item }}/roles/{{ item }}/README.md"
dest: "../_collections/{{ outer_item }}/{{ item }}.md"
dest: "../collections/{{ outer_item }}/{{ item }}.md"
remote_src: true
mode: "0644"
loop: "{{ roles_list }}"

- name: Create collection index page
ansible.builtin.template:
src: collection_index.md.j2
dest: "../collections/{{ outer_item }}/index.md"
mode: "0644"
vars:
collection_name: "{{ outer_item }}"
...
3 changes: 2 additions & 1 deletion .github/index.md.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---

layout: default
nav_order: 1
---

# Ansible Automation Platform Configuration as Code Collections
Expand Down
18 changes: 9 additions & 9 deletions .github/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
tasks:
- name: Delete directories
ansible.builtin.file:
path: "../_collections"
path: "../collections"
state: absent
mode: "0755"

- name: Create _collections directory
- name: Create collections directory
ansible.builtin.file:
path: "../_collections"
path: "../collections"
state: directory
mode: "0755"

- name: Create sub directories
ansible.builtin.file:
path: "../_collections/{{ item }}"
path: "../collections/{{ item }}"
state: directory
mode: "0755"
loop:
Expand Down Expand Up @@ -100,7 +100,7 @@

- name: Get list of files controller_config
ansible.builtin.find:
path: ../_collections/controller_configuration
path: ../collections/controller_configuration
file_type: file
patterns: '*.md'
register: r_controller_config
Expand All @@ -112,7 +112,7 @@

- name: Get list of files galaxy_collection
ansible.builtin.find:
path: ../_collections/galaxy_collection
path: ../collections/galaxy_collection
file_type: file
patterns: '*.md'
register: r_galaxy_collection
Expand All @@ -124,7 +124,7 @@

- name: Get list of files eda_config
ansible.builtin.find:
path: ../_collections/eda_configuration
path: ../collections/eda_configuration
file_type: file
patterns: '*.md'
register: r_eda_config
Expand All @@ -136,7 +136,7 @@

- name: Get list of files aap_utilities
ansible.builtin.find:
path: ../_collections/aap_utilities
path: ../collections/aap_utilities
file_type: file
patterns: '*.md'
register: r_aap_utilities
Expand All @@ -148,7 +148,7 @@

- name: Get list of files ee_utilities
ansible.builtin.find:
path: ../_collections/ee_utilities
path: ../collections/ee_utilities
file_type: file
patterns: '*.md'
register: r_ee_utilities
Expand Down
3 changes: 1 addition & 2 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
has_children: true
title: Home
nav_order: 1
---

# Ansible Automation Platform Configuration as Code Collections
Expand Down

0 comments on commit d21907e

Please sign in to comment.