commit 8b522e0af0525f55556ac02ea382f5c31f128fe9 Author: Chris Hammer Date: Tue Mar 15 12:51:21 2022 -0400 initial project commit diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..6bb04a0 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,25 @@ +[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 + diff --git a/baseos.yml b/baseos.yml new file mode 100644 index 0000000..44525b6 --- /dev/null +++ b/baseos.yml @@ -0,0 +1,23 @@ +--- +- name: Provisions hosts using the jchristianh.baseos Ansible collection + hosts: all + become: yes + gather_facts: yes + + + collections: + - jchristianh.baseos + + + vars_files: + - vars/baseos_vars.yml + + + tasks: + - name: Include relevant role(s) + include_role: + name: "{{ item }}" + loop: "{{ baseos_include_roles }}" + + +... diff --git a/collections/requirements.yml b/collections/requirements.yml new file mode 100644 index 0000000..76937c7 --- /dev/null +++ b/collections/requirements.yml @@ -0,0 +1,6 @@ +--- +collections: + - name: jchristianh.basos + source: https://github.com/jchristianh-ansible-collections/baseos.git + type: git + version: main diff --git a/inventory/hosts b/inventory/hosts new file mode 100644 index 0000000..23dadf2 --- /dev/null +++ b/inventory/hosts @@ -0,0 +1,2 @@ +debian-test ansible_host=10.1.1.41 +centos-test ansible_host=10.1.1.27 ansible_user=root diff --git a/vars/baseos_vars.yml b/vars/baseos_vars.yml new file mode 100644 index 0000000..1a25caa --- /dev/null +++ b/vars/baseos_vars.yml @@ -0,0 +1,9 @@ +--- +baseos_include_roles: + - etc_hosts + - base_packages + - resolv_conf + - update_all_packages + + +...