You've already forked ansible-role-common
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c80c1b07b | |||
| 463dfdf732 | |||
| 517ac07529 | |||
| 0bf187611a | |||
| a73eb8d69b | |||
| 3b9cff78df |
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@@ -1,15 +1,12 @@
|
|||||||
name: CI
|
name: CI
|
||||||
on: push
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags:
|
||||||
|
- "!**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# lint:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v4
|
|
||||||
# - uses: actions/setup-go@v5
|
|
||||||
# with:
|
|
||||||
# go-version: '1.22'
|
|
||||||
# - uses: golangci/golangci-lint-action@v3
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -31,8 +28,9 @@ jobs:
|
|||||||
PY_COLORS: '1'
|
PY_COLORS: '1'
|
||||||
ANSIBLE_FORCE_COLOR: '1'
|
ANSIBLE_FORCE_COLOR: '1'
|
||||||
molecule:
|
molecule:
|
||||||
name: Molecule Tests ${{ matrix.os }}
|
name: Molecule Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: lint
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
@@ -58,6 +56,9 @@ jobs:
|
|||||||
MOLECULE_DISTRO: ${{ matrix.os }}
|
MOLECULE_DISTRO: ${{ matrix.os }}
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- lint
|
||||||
|
- molecule
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
debug:
|
debug:
|
||||||
msg: "Virtualization is: {{ ansible_virtualization_type }}"
|
msg: "Virtualization is: {{ ansible_virtualization_type }}"
|
||||||
|
|
||||||
- name: Ensure DNS and SSH common config
|
- name: Ensure Network Setup (RedHat only)
|
||||||
template:
|
template:
|
||||||
src: "{{ network_config.src }}"
|
src: "{{ network_config.src }}"
|
||||||
dest: "{{ network_config.dest }}"
|
dest: "{{ network_config.dest }}"
|
||||||
@@ -16,8 +16,25 @@
|
|||||||
mode: u+rw,
|
mode: u+rw,
|
||||||
a+r,
|
a+r,
|
||||||
}
|
}
|
||||||
|
when: >
|
||||||
|
ansible_virtualization_type != "docker"
|
||||||
|
and ansible_virtualization_type != "container"
|
||||||
|
and ansible_os_family == "RedHat"
|
||||||
|
loop_control:
|
||||||
|
loop_var: network_config
|
||||||
|
tags: dns
|
||||||
|
|
||||||
|
- name: Ensure Resolvers Configured
|
||||||
|
template:
|
||||||
|
src: "{{ network_config.src }}"
|
||||||
|
dest: "{{ network_config.dest }}"
|
||||||
|
mode: "{{ network_config.mode }}"
|
||||||
|
backup: yes
|
||||||
|
with_items:
|
||||||
- { src: etc.resolv.conf.j2, dest: /etc/resolv.conf, mode: u+rw, a+r }
|
- { src: etc.resolv.conf.j2, dest: /etc/resolv.conf, mode: u+rw, a+r }
|
||||||
when: ansible_virtualization_type != "docker" and ansible_virtualization_type != "container"
|
when: >
|
||||||
|
ansible_virtualization_type != "docker"
|
||||||
|
and ansible_virtualization_type != "container"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: network_config
|
loop_var: network_config
|
||||||
tags: dns
|
tags: dns
|
||||||
|
|||||||
Reference in New Issue
Block a user