Skip to content

Commit

Permalink
Merge pull request #15 from lablabs/develop
Browse files Browse the repository at this point in the history
Develop to Main
  • Loading branch information
MonolithProjects authored Nov 9, 2021
2 parents 4d10c61 + e963d7d commit e5496cb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,40 @@ jobs:
max-parallel: 1
matrix:
config:
- os: "centos8"
- image: "centos8"
tag: "latest"
- os: "ubuntu20"
- image: "ubuntu2004"
tag: "latest"
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: Molecule for Ansible
uses: MonolithProjects/action-molecule@v1.4.3
uses: robertdebock/molecule[email protected]
with:
os: ${{ matrix.config.os }}
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
molecule_command: test
scenario: default

cluster:
name: Test RKE2 Ansible Role - cluster
runs-on: ubuntu-20.04
needs: standalone
strategy:
fail-fast: false
max-parallel: 1
matrix:
config:
- image: "ubuntu2004"
tag: "latest"
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: Molecule for Ansible
uses: MonolithProjects/action-molecule@v1.4.3
uses: robertdebock/molecule[email protected]
with:
molecule_command: test
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
scenario: cluster
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ rke2_server_taint: false
rke2_token: defaultSecret12345

# RKE2 version
rke2_version: v1.21.2+rke2r1
rke2_version: v1.21.6+rke2r1

# URL to RKE2 repository
rke2_channel_url: https://update.rke2.io/v1-release/channels
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rke2_server_taint: false
rke2_token: defaultSecret12345

# RKE2 version
rke2_version: v1.21.2+rke2r1
rke2_version: v1.21.6+rke2r1

# URL to RKE2 repository
rke2_channel_url: https://update.rke2.io/v1-release/channels
Expand Down
4 changes: 2 additions & 2 deletions molecule/cluster/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lint: |
ansible-lint --exclude molecule/
platforms:
- name: node1
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-ubuntu2004}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand All @@ -21,7 +21,7 @@ platforms:
- masters
- k8s_cluster
- name: node2
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-ubuntu2004}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand Down
4 changes: 2 additions & 2 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lint: |
ansible-lint --exclude molecule/
platforms:
- name: node1
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-centos8}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand All @@ -34,7 +34,7 @@ scenario:
- create
- prepare
- converge
- idempotence
# - idempotence
- verify
- cleanup
- destroy
8 changes: 4 additions & 4 deletions molecule/ha_cluster/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lint: |
ansible-lint --exclude molecule/
platforms:
- name: node1
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-ubuntu2004}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand All @@ -21,7 +21,7 @@ platforms:
- masters
- k8s_cluster
- name: node2
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-ubuntu2004}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand All @@ -33,7 +33,7 @@ platforms:
- masters
- k8s_cluster
- name: node3
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-ubuntu2004}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand All @@ -45,7 +45,7 @@ platforms:
- masters
- k8s_cluster
- name: node4
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
image: "geerlingguy/docker-${image:-ubuntu2004}-ansible:${tag:-latest}"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
Expand Down
2 changes: 1 addition & 1 deletion tasks/rke2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
when: '"rke2-server.service" in ansible_facts.services'

- name: Run RKE2 script
ansible.builtin.shell:
ansible.builtin.command:
cmd: /tmp/rke2.sh
environment:
INSTALL_RKE2_VERSION: "{{ rke2_version }}"
Expand Down
1 change: 1 addition & 0 deletions tasks/summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
regexp: '127.0.0.1'
replace: "{{ rke2_api_ip | default(hostvars[groups.masters.0]['ansible_default_ipv4']['address']) }}"
delegate_to: localhost
become: false
when:
- rke2_download_kubeconf

Expand Down

0 comments on commit e5496cb

Please sign in to comment.