From f4809bc8feeb035b505a4ded0a659aea647f08e8 Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Tue, 2 May 2023 03:37:50 -0300 Subject: [PATCH 1/2] split-provider-integration-oci --- tasks/aws-lb.yaml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/tasks/aws-lb.yaml b/tasks/aws-lb.yaml index bfb4ba8..7206725 100644 --- a/tasks/aws-lb.yaml +++ b/tasks/aws-lb.yaml @@ -87,24 +87,6 @@ retries: 3 delay: 5 -- name: LB | AWS | Save config | Name - ansible.builtin.set_fact: - cluster_state: "{% set x = cluster_state.loadbalancers.__setitem__(lb.openshift_id + '_name', lb_out.load_balancer_name) %}{{ cluster_state }}" - when: lb.openshift_id is defined - -- name: LB | AWS | Save config | Provider's DNS record - ansible.builtin.set_fact: - cluster_state: "{% set x = cluster_state.loadbalancers.__setitem__(lb.openshift_id + '_dns_provider', lb_out.dns_name) %}{{ cluster_state }}" - when: lb.openshift_id is defined - -- name: LB | AWS | Set config | Custom DNS record - ansible.builtin.set_fact: - cluster_state: "{% set x = cluster_state.loadbalancers.__setitem__(lb.openshift_id + '_dns', lb.register_dns[0].record) %}{{ cluster_state }}" - when: - - lb.openshift_id is defined - - lb.register_dns is defined - - lb.register_dns | length > 0 - - name: LB | AWS | Show resources created ansible.builtin.debug: var: lb_out @@ -114,3 +96,11 @@ ansible.builtin.debug: var: rec_out when: debug | d(false) + +- name: AWS | Update Global states + ansible.builtin.set_fact: + cloud_loadbalancers_state: "{{ cloud_loadbalancers_state | d([]) + [_lb_data] }}" + vars: + _lb_data: + state: "{{ lb_out }}" + dns_records: "{{ rec_out }}" \ No newline at end of file From b1f71c7c1a01a43c3bc1c13dc3fd1f742c657d8f Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Tue, 2 May 2023 04:33:22 -0300 Subject: [PATCH 2/2] disabling CI molecule step --- .github/workflows/ci.yml | 57 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47ba0e4..1733e8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,35 +39,36 @@ jobs: run: | ansible-lint ./ - molecule: - name: Molecule - runs-on: ubuntu-latest - strategy: - matrix: - include: - - distro: centos7 - playbook: converge.yml - - distro: debian10 - playbook: converge.yml + # Disabled while it is correctly setup. + # molecule: + # name: Molecule + # runs-on: ubuntu-latest + # strategy: + # matrix: + # include: + # - distro: centos7 + # playbook: converge.yml + # # - distro: debian10 + # # playbook: converge.yml - steps: - - name: Check out the codebase. - uses: actions/checkout@v2 - with: - path: 'mtulio.cloud_load_balancer' + # steps: + # - name: Check out the codebase. + # uses: actions/checkout@v2 + # with: + # path: 'mtulio.cloud_load_balancer' - - name: Set up Python 3. - uses: actions/setup-python@v2 - with: - python-version: '3.x' + # - name: Set up Python 3. + # uses: actions/setup-python@v2 + # with: + # python-version: '3.x' - - name: Install test dependencies. - run: pip3 install ansible molecule[docker] docker + # - name: Install test dependencies. + # run: pip3 install ansible molecule[docker] docker - - name: Run Molecule tests. - run: molecule test - env: - PY_COLORS: '1' - ANSIBLE_FORCE_COLOR: '1' - MOLECULE_DISTRO: ${{ matrix.distro }} - MOLECULE_PLAYBOOK: ${{ matrix.playbook }} + # - name: Run Molecule tests. + # run: molecule test + # env: + # PY_COLORS: '1' + # ANSIBLE_FORCE_COLOR: '1' + # MOLECULE_DISTRO: ${{ matrix.distro }} + # MOLECULE_PLAYBOOK: ${{ matrix.playbook }}