Compare commits
No commits in common. "3fc8e359cea17418aa6776c0ff83c8293d8f1daa" and "20285ca30381f3e8e72caf3fc66f90858f5d0ac7" have entirely different histories.
3fc8e359ce
...
20285ca303
@ -1,3 +1,4 @@
|
||||
# export ANSIBLE_LINT_EXCLUSION="--exclude collections/ansible_collections/ansible* --exclude collections/ansible_collections/community* --exclude .gitea"
|
||||
export ANSIBLE_LINT_EXCLUSION="--exclude collections/ansible_collections --exclude .gitea"
|
||||
export ANSIBLE_INVENTORY="-i 127.0.0.1, --connection=local"
|
||||
export ANSIBLE_PLAYBOOK="gitea.yml"
|
@ -1,39 +0,0 @@
|
||||
name: Ansible Code Pipeline
|
||||
run-name: ${{ gitea.actor }} is running Ansible Code Pipeline
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- development
|
||||
|
||||
jobs:
|
||||
Ansible-Development-Pipeline:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ansible-dev-centos9, ansible-dev-fedora39, ansible-dev-debian12 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Ansible Environment Verify
|
||||
run: |
|
||||
whoami
|
||||
. ./.ci.env
|
||||
env
|
||||
git log -1
|
||||
ansible --version
|
||||
ansible-lint --version
|
||||
|
||||
- name: Install Ansible Galaxy Dependencies
|
||||
run: |
|
||||
ansible-galaxy install -r requirements.yml
|
||||
|
||||
- name: Run Ansible-Lint
|
||||
run: |
|
||||
. ./.ci.env
|
||||
ansible-lint --offline $ANSIBLE_LINT_EXCLUSION
|
||||
|
||||
- name: Run Ansible-Playbook
|
||||
run: |
|
||||
. ./.ci.env
|
||||
ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
@ -24,12 +24,14 @@
|
||||
name : git
|
||||
state : present
|
||||
|
||||
|
||||
- name: Check if Gitea is present and is correct version
|
||||
ansible.builtin.command : /usr/local/bin/gitea --version
|
||||
ignore_errors : true
|
||||
changed_when : false
|
||||
register : r_check_gitea
|
||||
|
||||
|
||||
- name: Fetch Gitea binary and notify user
|
||||
when :
|
||||
- (r_check_gitea.rc == 1 or r_check_gitea.stdout is not search(__gitea_version))
|
||||
@ -45,6 +47,7 @@
|
||||
mode : "0755"
|
||||
notify : Restart Gitea
|
||||
|
||||
|
||||
- name: Create Gitea user
|
||||
ansible.builtin.user:
|
||||
name : "{{ __gitea_user.name }}"
|
||||
@ -54,6 +57,7 @@
|
||||
create_home : true
|
||||
state : present
|
||||
|
||||
|
||||
- name: Create required directories
|
||||
ansible.builtin.file:
|
||||
path : "{{ item }}"
|
||||
@ -68,11 +72,13 @@
|
||||
- /var/lib/gitea/log
|
||||
- /etc/gitea
|
||||
|
||||
|
||||
- name: Debug ansible_virtualization_type
|
||||
ansible.builtin.debug:
|
||||
var: ansible_virtualization_type
|
||||
verbosity: 1
|
||||
|
||||
|
||||
- name: Manage Gitea service
|
||||
when:
|
||||
- not ansible_virtualization_type | regex_search('(podman|docker|container)')
|
||||
|
Loading…
x
Reference in New Issue
Block a user