|
64 | 64 | working-directory: ansible_collections/cozystack/installer |
65 | 65 | run: ansible-test sanity --color |
66 | 66 |
|
| 67 | + master-nodes: |
| 68 | + name: Multi-master MASTER_NODES |
| 69 | + runs-on: ubuntu-latest |
| 70 | + steps: |
| 71 | + - name: Checkout |
| 72 | + uses: actions/checkout@v6 |
| 73 | + |
| 74 | + - name: Set up Python |
| 75 | + uses: actions/setup-python@v6 |
| 76 | + with: |
| 77 | + python-version: "3.14" |
| 78 | + |
| 79 | + - name: Install Ansible and dependencies |
| 80 | + run: pip install ansible-core netaddr |
| 81 | + |
| 82 | + - name: Install required collections |
| 83 | + run: ansible-galaxy collection install ansible.utils |
| 84 | + |
| 85 | + - name: Test auto-detection from server group (3 nodes) |
| 86 | + run: >- |
| 87 | + ansible-playbook tests/test-master-nodes.yml |
| 88 | + --inventory tests/test-multi-master-inventory.yml |
| 89 | +
|
| 90 | + - name: Test single-node auto-detection (IP host key) |
| 91 | + run: >- |
| 92 | + ansible-playbook tests/test-master-nodes.yml |
| 93 | + --inventory tests/test-single-master-inventory.yml |
| 94 | +
|
| 95 | + - name: Test single-node explicit override (CI inventory) |
| 96 | + run: >- |
| 97 | + ansible-playbook tests/test-master-nodes.yml |
| 98 | + --inventory tests/ci-inventory.yml |
| 99 | +
|
| 100 | + - name: Test hostname host keys are rejected |
| 101 | + run: | |
| 102 | + if ansible-playbook tests/test-master-nodes.yml \ |
| 103 | + --inventory tests/test-hostname-inventory.yml 2>&1; then |
| 104 | + echo "ERROR: Expected failure for hostname host keys, but playbook succeeded" |
| 105 | + exit 1 |
| 106 | + else |
| 107 | + echo "OK: Hostname host keys correctly rejected" |
| 108 | + fi |
| 109 | +
|
67 | 110 | e2e: |
68 | 111 | name: E2E |
69 | 112 | runs-on: ubuntu-latest |
|
76 | 119 | with: |
77 | 120 | python-version: "3.14" |
78 | 121 |
|
79 | | - - name: Install Ansible |
80 | | - run: pip install ansible-core |
| 122 | + - name: Install Ansible and dependencies |
| 123 | + run: pip install ansible-core netaddr |
81 | 124 |
|
82 | 125 | - name: Build and install collection |
83 | 126 | run: | |
|
0 commit comments