forked from mit-scripts/ansible-pacemaker-corosync
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dmitriy Rabotyagov
committed
Jun 15, 2022
1 parent
70d3c59
commit 45db22a
Showing
12 changed files
with
115 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Molecule | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
fail-fast: false | ||
matrix: | ||
scenario: | ||
- centos-systemd:stream8 | ||
- centos-systemd:stream9 | ||
- debian-systemd:11 | ||
- ubuntu-systemd:20.04 | ||
- ubuntu-systemd:22.04 | ||
python-version: | ||
- 3.8 | ||
ansible-version: | ||
- 2.12.6 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "${{ github.repository }}" | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r ${{ github.repository }}/test-requirements.txt | ||
- name: Install ansible | ||
run: | | ||
python3 -m pip install ansible-core==${{ matrix.ansible-version }} | ||
- name: Install ansible collections | ||
run: | | ||
ansible-galaxy install -r ${{ github.repository }}/test-requirements.yml | ||
- name: Test with molecule | ||
run: | | ||
cd ${{ github.repository }} | ||
export docker_image_tag="${{ matrix.scenario }}" | ||
python3 -m molecule test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
tasks: | ||
- name: Apt update and install rsync, ping, iproute | ||
apt: | ||
update_cache: yes | ||
name: | ||
- rsync | ||
- inetutils-ping | ||
- iproute2 | ||
state: present | ||
when: ansible_os_family == "Debian" | ||
vars_files: | ||
- "tests/pacemaker_corosync_local.yml" | ||
pre_tasks: | ||
- name: Apt update and install rsync, ping, iproute | ||
apt: | ||
update_cache: yes | ||
name: | ||
- rsync | ||
- inetutils-ping | ||
- iproute2 | ||
state: present | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: Yum install iproute to fix undefined ansible_default_ipv4.address | ||
yum: | ||
name: iproute | ||
state: present | ||
when: | ||
- ansible_distribution == "CentOS" | ||
- ansible_distribution_major_version == "7" | ||
- name: Yum install iproute to fix undefined ansible_default_ipv4.address | ||
yum: | ||
name: iproute | ||
state: present | ||
when: | ||
- ansible_distribution == "CentOS" | ||
- ansible_distribution_major_version == "7" | ||
|
||
- name: Add a container to a network, leaving existing containers connected | ||
delegate_to: localhost | ||
community.general.docker_network: | ||
name: pacemaker-network | ||
connected: | ||
- "{{ inventory_hostname }}" | ||
appends: yes | ||
- name: Add a container to a network, leaving existing containers connected | ||
delegate_to: localhost | ||
community.general.docker_network: | ||
name: pacemaker-network | ||
connected: | ||
- "{{ inventory_hostname }}" | ||
appends: yes | ||
|
||
- name: Re-collect network facts required after installation iproute | ||
setup: | ||
gather_subset: network | ||
- name: Re-collect network facts required after installation iproute | ||
setup: | ||
gather_subset: network | ||
|
||
- name: Show ansible_interfaces | ||
debug: | ||
var: ansible_interfaces | ||
- name: Show ansible_interfaces | ||
debug: | ||
var: ansible_interfaces | ||
|
||
- name: Include keepalived vars | ||
include_vars: "tests/pacemaker_corosync_local.yml" | ||
|
||
- name: "Include ansible-role-pacemaker-corosync" | ||
include_role: | ||
name: "ansible-role-pacemaker_corosync" | ||
roles: | ||
- role: "{{ playbook_dir | dirname | dirname | basename }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
bashate>=0.2 # Apache-2.0 | ||
flake8<2.6.0,>=2.5.4 # MIT | ||
docker==5.0.3 | ||
molecule==3.6.1 | ||
molecule-docker==1.1.0 | ||
ansible-lint==5.0.10 | ||
rich>=9.5.1,<11.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
collections: | ||
- community.general | ||
- community.docker | ||
- ansible.netcommon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
|
||
_pacemaker_remote_group_exists: "{{ (pacemaker_remote_group is defined and pacemaker_remote_group in groups) }}" | ||
_pacemaker_remote_group_exists: "{{ (pacemaker_remote_group is defined and pacemaker_remote_group in groups) }}" |