Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-freeman committed Feb 1, 2024
0 parents commit a67f6b8
Show file tree
Hide file tree
Showing 219 changed files with 18,173 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
# Collection wide lint-file
# DO NOT CHANGE
exclude_paths:
- .cache/
- .github/
#- docs/
- roles/sap_hypervisor_node_preconfigure
#- roles/sap_vm_provision
- roles/sap_vm_preconfigure

enable_list:
- yaml

skip_list:
# We don't want to enforce new Ansible versions for Galaxy:
- meta-runtime[unsupported-version]
# We do not want to use checks which are marked as experimental:
- experimental
# We use ignore_errors for all the assert tasks, which should be acceptable:
- ignore-errors
# We want to allow single digit version numbers in a role's meta/main.yml file:
- schema
# Allow templating inside name because it creates more detailed output:
- name[template]
- yaml[comments]
- yaml[line-length]
- no-changed-when
- no-tabs
- no-handler
- jinja[spacing]
- var-naming[no-jinja]
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yml linguist-detectable
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---

# Workflow for ansible-lint of a role

name: ansible-lint of the role sap_hypervisor_node_preconfigure

on:
push:
branches:
- main
- dev
paths:
- 'roles/sap_hypervisor_node_preconfigure/**'
pull_request:
branches:
- main
- dev
paths:
- 'roles/sap_hypervisor_node_preconfigure/**'

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
with:
python-version: '3.9'

- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_infrastructure/community.sap_infrastructure/roles/sap_hypervisor_node_preconfigure
run: ansible-lint
43 changes: 43 additions & 0 deletions .github/workflows/ansible-lint-sap_vm_preconfigure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---

# Workflow for ansible-lint of a role

name: ansible-lint of the role sap_vm_preconfigure

on:
push:
branches:
- main
- dev
paths:
- 'roles/sap_vm_preconfigure/**'
pull_request:
branches:
- main
- dev
paths:
- 'roles/sap_vm_preconfigure/**'

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@main

- name: Set up Python 3
uses: actions/setup-python@main
with:
python-version: '3.12'

- name: Install test dependencies
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1
- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_infrastructure/community.sap_infrastructure/roles/sap_vm_preconfigure
run: ansible-lint
46 changes: 46 additions & 0 deletions .github/workflows/ansible-lint-sap_vm_provision.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

# Workflow for ansible-lint of a role

name: ansible-lint of the role sap_vm_provision

on:
push:
branches:
- main
- dev
paths:
- 'roles/sap_vm_provision/**'
pull_request:
branches:
- main
- dev
paths:
- 'roles/sap_vm_provision/**'

workflow_dispatch:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install test dependencies
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1
pip3 install jmespath==1.0.1
- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_infrastructure/community.sap_infrastructure/roles/sap_vm_provision
run: ansible-lint
45 changes: 45 additions & 0 deletions .github/workflows/ansible-lint-sap_vm_temp_vip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---

# Workflow for ansible-lint of a role

name: ansible-lint of the role sap_vm_temp_vip

on:
push:
branches:
- main
- dev
paths:
- 'roles/sap_vm_temp_vip/**'
pull_request:
branches:
- main
- dev
paths:
- 'roles/sap_vm_temp_vip/**'

workflow_dispatch:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install test dependencies
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1
- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_infrastructure/community.sap_infrastructure/roles/sap_vm_temp_vip
run: ansible-lint
46 changes: 46 additions & 0 deletions .github/workflows/ansible-lint-sap_vm_verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

# Workflow for ansible-lint of a role

name: ansible-lint of the role sap_vm_verify

on:
push:
branches:
- main
- dev
paths:
- 'roles/sap_vm_verify/**'
pull_request:
branches:
- main
- dev
paths:
- 'roles/sap_vm_verify/**'

workflow_dispatch:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install test dependencies
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1
pip3 install jmespath==1.0.1
- name: Run ansible-lint
working-directory: /home/runner/work/community.sap_infrastructure/community.sap_infrastructure/roles/sap_vm_verify
run: ansible-lint
54 changes: 54 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---

# Workflow for ansible-lint of the collection

name: ansible-lint of the collection

on:
schedule:
- cron: '31 13 * * 1'

workflow_dispatch:

jobs:
ansible-lint:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies for Python
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1
pip3 install jmespath==1.0.1
- name: Install dependencies for Ansible
run: ansible-galaxy collection install -r /home/runner/work/community.sap_infrastructure/community.sap_infrastructure/requirements.yml

- name: Move the collection to the correct location - Create new directory
run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community

- name: Move the collection to the correct location - Move the collection
working-directory: /home/runner/
run: mv /home/runner/work/community.sap_infrastructure/community.sap_infrastructure /home/runner/.ansible/collections/ansible_collections/community

- name: Move the collection to the correct location - Rename the directory
working-directory: /home/runner/
run: mv /home/runner/.ansible/collections/ansible_collections/community/community.sap_infrastructure /home/runner/.ansible/collections/ansible_collections/community/sap_infrastructure

- name: Run ansible-lint
working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_infrastructure
run: ansible-lint

- name: Move the collection to its previous location
working-directory: /home/runner/
run: mv /home/runner/.ansible/collections/ansible_collections/community/sap_infrastructure /home/runner/work/community.sap_infrastructure/community.sap_infrastructure
53 changes: 53 additions & 0 deletions .github/workflows/ansible-test-sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---

# Worflow for ansible-test sanity tests

name: ansible-test sanity of the collection

on:
schedule:
- cron: '31 12 * * 1'

workflow_dispatch:

jobs:
sanity:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install test dependencies
run: |
pip3 install ansible-lint==6.22.1
pip3 install ansible-compat==4.1.10
# - name: Install collection dependencies
# run: ansible-galaxy collection install community.general

- name: Move the collection to the correct location - Create new directory
run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community

- name: Move the collection to the correct location - Move the collection
working-directory: /home/runner/
run: mv /home/runner/work/community.sap_infrastructure/community.sap_infrastructure /home/runner/.ansible/collections/ansible_collections/community

- name: Move the collection to the correct location - Rename the directory
working-directory: /home/runner/
run: mv /home/runner/.ansible/collections/ansible_collections/community/community.sap_infrastructure /home/runner/.ansible/collections/ansible_collections/community/sap_infrastructure


- name: Run sanity tests
working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_infrastructure
run: ansible-test sanity


- name: Move the collection to its previous location
working-directory: /home/runner/
run: mv /home/runner/.ansible/collections/ansible_collections/community/sap_infrastructure /home/runner/work/community.sap_infrastructure/community.sap_infrastructure
21 changes: 21 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CodeSpell

on:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
# lowercase only
ignore_words_list: aas,hsa,te,chage,addopt,sybsystem,uptodate
Loading

0 comments on commit a67f6b8

Please sign in to comment.