Compare commits
10 Commits
8b522e0af0
...
42a5c69d19
Author | SHA1 | Date | |
---|---|---|---|
42a5c69d19 | |||
76848d2ea9 | |||
3be846c946 | |||
ba96e7bedb | |||
b58d631147 | |||
e6d00bd2b4 | |||
2994a8f849 | |||
bb39241a44 | |||
0f5b85cf0c | |||
365a79fe87 |
174
.drone.yml
Normal file
174
.drone.yml
Normal file
@ -0,0 +1,174 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: run_ansible_tests_centos9
|
||||
|
||||
global-variables:
|
||||
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/centos9:release-34"
|
||||
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
|
||||
ansible_playbook : &ansible_playbook "baseos.yml"
|
||||
|
||||
environment:
|
||||
ANSIBLE_INVENTORY : *ansible_inventory
|
||||
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
event: [push]
|
||||
|
||||
steps:
|
||||
- name: "ansible_environment_verify"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- git log -1
|
||||
- ansible --version
|
||||
- ansible-lint --version
|
||||
|
||||
- name: "ansible_galaxy_requirements"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-galaxy install -r requirements.yml
|
||||
|
||||
- name: "ansible_lint"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-lint --offline
|
||||
|
||||
- name: "ansible_playbook_execution"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: run_ansible_tests_fedora39
|
||||
|
||||
global-variables:
|
||||
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/fedora39:release-34"
|
||||
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
|
||||
ansible_playbook : &ansible_playbook "baseos.yml"
|
||||
|
||||
environment:
|
||||
ANSIBLE_INVENTORY : *ansible_inventory
|
||||
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
event: [push]
|
||||
|
||||
steps:
|
||||
- name: "ansible_environment_verify"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- git log -1
|
||||
- ansible --version
|
||||
- ansible-lint --version
|
||||
|
||||
- name: "ansible_galaxy_requirements"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-galaxy install -r requirements.yml
|
||||
|
||||
- name: "ansible_lint"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-lint --offline
|
||||
|
||||
- name: "ansible_playbook_execution"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: run_ansible_tests_debian11
|
||||
|
||||
global-variables:
|
||||
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian11:release-34"
|
||||
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
|
||||
ansible_playbook : &ansible_playbook "baseos.yml"
|
||||
|
||||
environment:
|
||||
ANSIBLE_INVENTORY : *ansible_inventory
|
||||
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
event: [push]
|
||||
|
||||
steps:
|
||||
- name: "ansible_environment_verify"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- git log -1
|
||||
- ansible --version
|
||||
- ansible-lint --version
|
||||
|
||||
- name: "ansible_galaxy_requirements"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-galaxy install -r requirements.yml
|
||||
|
||||
- name: "ansible_lint"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-lint --offline
|
||||
|
||||
- name: "ansible_playbook_execution"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: run_ansible_tests_debian12
|
||||
|
||||
global-variables:
|
||||
ansible_image : &ansible_image "gitea.thezengarden.net/podman/ansible-dev/debian12:release-34"
|
||||
ansible_inventory : &ansible_inventory "-i 127.0.0.1, --connection=local"
|
||||
ansible_playbook : &ansible_playbook "baseos.yml"
|
||||
|
||||
environment:
|
||||
ANSIBLE_INVENTORY : *ansible_inventory
|
||||
ANSIBLE_PLAYBOOK : *ansible_playbook
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
event: [push]
|
||||
|
||||
steps:
|
||||
- name: "ansible_environment_verify"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- git log -1
|
||||
- ansible --version
|
||||
- ansible-lint --version
|
||||
|
||||
- name: "ansible_galaxy_requirements"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-galaxy install -r requirements.yml
|
||||
|
||||
- name: "ansible_lint"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-lint --offline
|
||||
|
||||
- name: "ansible_playbook_execution"
|
||||
image: *ansible_image
|
||||
commands:
|
||||
- ansible-playbook -v $ANSIBLE_INVENTORY $ANSIBLE_PLAYBOOK
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
inventory/*
|
||||
host_vars
|
||||
ansible.cfg
|
||||
collections/ansible_collections/
|
25
ansible.cfg
25
ansible.cfg
@ -1,25 +0,0 @@
|
||||
[defaults]
|
||||
inventory = inventory/hosts
|
||||
roles_path = /etc/ansible/roles
|
||||
collections_path = /etc/ansible/collections
|
||||
remote_tmp = /tmp/.ansible-${USER}/tmp
|
||||
gathering = smart
|
||||
gather_timeout = 600
|
||||
fact_caching = jsonfile
|
||||
fact_caching_connection = /etc/ansible/facts
|
||||
fact_caching_timeout = 300
|
||||
retry_files_enabled = False
|
||||
forks = 40
|
||||
timeout = 30
|
||||
host_key_checking = False
|
||||
display_skipped_hosts = False
|
||||
bin_ansible_callbacks = True
|
||||
callback_whitelist = ansible.posix.profile_tasks, ansible.posix.timer
|
||||
deprecation_warnings = False
|
||||
command_warnings = False
|
||||
|
||||
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey
|
||||
|
14
baseos.yml
14
baseos.yml
@ -1,12 +1,8 @@
|
||||
---
|
||||
- name: Provisions hosts using the jchristianh.baseos Ansible collection
|
||||
- name: Deploy a standardized base configuration
|
||||
hosts: all
|
||||
become: yes
|
||||
gather_facts: yes
|
||||
|
||||
|
||||
collections:
|
||||
- jchristianh.baseos
|
||||
become: true
|
||||
gather_facts: true
|
||||
|
||||
|
||||
vars_files:
|
||||
@ -15,9 +11,9 @@
|
||||
|
||||
tasks:
|
||||
- name: Include relevant role(s)
|
||||
include_role:
|
||||
ansible.builtin.include_role:
|
||||
name: "{{ item }}"
|
||||
loop: "{{ baseos_include_roles }}"
|
||||
loop: "{{ __baseos_include_roles }}"
|
||||
|
||||
|
||||
...
|
||||
|
@ -1,6 +1,14 @@
|
||||
---
|
||||
collections:
|
||||
# Our Collections
|
||||
- name: jchristianh.basos
|
||||
source: https://github.com/jchristianh-ansible-collections/baseos.git
|
||||
type: git
|
||||
version: main
|
||||
|
||||
# External Collections
|
||||
- name: community.general
|
||||
- name: ansible.posix
|
||||
|
||||
|
||||
...
|
||||
|
@ -1,2 +0,0 @@
|
||||
debian-test ansible_host=10.1.1.41
|
||||
centos-test ansible_host=10.1.1.27 ansible_user=root
|
@ -1,9 +1,13 @@
|
||||
---
|
||||
baseos_include_roles:
|
||||
- etc_hosts
|
||||
- base_packages
|
||||
- resolv_conf
|
||||
- update_all_packages
|
||||
__baseos_include_roles:
|
||||
- jchristianh.baseos.resolv_conf
|
||||
- jchristianh.baseos.hostname
|
||||
- jchristianh.baseos.etc_hosts
|
||||
- jchristianh.baseos.bashrc
|
||||
- jchristianh.baseos.motd
|
||||
- jchristianh.baseos.update_all_packages
|
||||
- jchristianh.baseos.base_packages
|
||||
- jchristianh.baseos.snmpd_conf
|
||||
|
||||
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user