commit 7728a8daed2e58290bf2dc758e9cc3e780eef022 Author: Chris Hammer Date: Wed Feb 12 08:07:16 2020 -0500 0.1.0-DEV-20200212-80132 ------------------------ * INITIAL: - initial repo commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9287486 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +facts.d/* +inventory/hosts diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e708ddf --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,82 @@ +# CI Mark that build is executed in CI environment +# GITLAB_CI Mark that build is executed in GitLab CI environment +# CI_SERVER Mark that build is executed in CI environment +# CI_SERVER_NAME CI server that is used to coordinate builds +# CI_SERVER_VERSION Not yet defined +# CI_SERVER_REVISION Not yet defined +# CI_BUILD_REF The commit revision for which project is built +# CI_BUILD_BEFORE_SHA The first commit that were included in push request +# CI_BUILD_REF_NAME The branch or tag name for which project is built +# CI_BUILD_ID The unique id of the current build that GitLab CI uses internally +# CI_BUILD_REPO The URL to clone the Git repository +# CI_PROJECT_ID The unique id of the current project that GitLab CI uses internally +# CI_PROJECT_DIR The full path where the repository is cloned and where the build is ran + + +variables: + ANSIBLE_PLAY: "zen_dhcpd.yml" + ANSIBLE_PLAY_PATH: "${CI_PROJECT_DIR}" + ANSIBLE_EXTRA_VARS: "" + + +stages: + - check_and_lint + - test_deploy + + +### BEGIN TEMPLATES ### +.tags_template: &tags_template + tags: + - zen-ci-workstation + + +.header_template: &header + variables: + DOCKER_IMG_TAG: "7.7.1908" + + +.check_versions_template: &check_vers + <<: *tags_template + stage: check_and_lint + script: + - /usr/bin/hostname + - "cd ${CI_PROJECT_DIR} && git log -1" + - "ansible --version" + - "ansible-lint --version" + + +.lint_play_template: &lint_play + <<: *tags_template + stage: check_and_lint + script: + - chmod 755 ${ANSIBLE_PLAY_PATH} + - ansible-lint -v ${ANSIBLE_PLAY_PATH}/*.yml + + +.test_deploy_template: &test_deploy + <<: *tags_template + stage: test_deploy + script: + - chmod 755 ${ANSIBLE_PLAY_PATH} + - pwd + - ls -ltr + - ansible-galaxy install -r roles/requirements.yml + - ansible-playbook -v -i '127.0.0.1,' --connection=local ${ANSIBLE_EXTRA_VARS} ${ANSIBLE_PLAY} +### END TEMPLATES ### + + +### BEGIN JOBS ### +Version Checks: + <<: *header + <<: *check_vers + + +Lint Play: + <<: *header + <<: *lint_play + + +Test Deploy: + <<: *header + <<: *test_deploy +### END JOBS ### diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..3bc2af3 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,20 @@ +[defaults] +inventory = /home/chris/git/ansible/inventory/hosts +roles_path = /etc/ansible/roles +remote_tmp = /tmp/.ansible-${USER}/tmp +gathering = smart +gather_timeout = 30 +fact_caching = jsonfile +fact_caching_connection = facts.d +fact_caching_timeout = 1800 +retry_files_enabled = False +forks = 8 +timeout = 30 +host_key_checking = False +display_skipped_hosts = False +ansible_python_interpreter=/usr/bin/python3 + + +[ssh_connection] +pipelining = True +ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey diff --git a/node_status/status.csv b/node_status/status.csv new file mode 100644 index 0000000..fc035ea --- /dev/null +++ b/node_status/status.csv @@ -0,0 +1,19 @@ +1574631226,chef.thezengarden.net,CentOS,7.7 +1574631183,awx.thezengarden.net,CentOS,7.7 +1574631183,gitlab.thezengarden.net,CentOS,7.7 +1574631183,ipa.thezengarden.net,CentOS,7.7 +1574631183,ipa2.thezengarden.net,CentOS,7.7 +1574631183,kansai.thezengarden.net,CentOS,6.10 +1574631183,lxc.thezengarden.net,CentOS,7.7 +1574631184,mailcow.thezengarden.net,Fedora,30 +1574631184,nms-vm.thezengarden.net,CentOS,7.7 +1574631184,tokyo.thezengarden.net,CentOS,7.7 +1574631184,zg-lxut01.thezengarden.net,CentOS,7.7 +1574631184,zg-lxut02.thezengarden.net,CentOS,7.7 +1574631184,zg-lxoc01.thezengarden.net,CentOS,7.7 +1574631184,zg-lxdb01.thezengarden.net,CentOS,7.7 +1574631184,kaiju.thezengarden.net,Debian,9.11 +1574631184,zg-www1.thezengarden.net,Debian,10 +1574631184,docker.thezengarden.net,CentOS,7.7 +1574631184,zg-www2.thezengarden.net,Debian,10 +1574631184,zg-www3.thezengarden.net,CentOS,7.7 diff --git a/roles/requirements.yml b/roles/requirements.yml new file mode 100644 index 0000000..347f9ad --- /dev/null +++ b/roles/requirements.yml @@ -0,0 +1,6 @@ +--- + +- name : zen_dhcpd + src : https://git.thezengarden.net/zen/ansible/roles/zen-dhcpd.git + scm : git + version : master diff --git a/zen_dhcpd.yml b/zen_dhcpd.yml new file mode 100644 index 0000000..e464f99 --- /dev/null +++ b/zen_dhcpd.yml @@ -0,0 +1,8 @@ +--- +- hosts: all + become: yes + gather_facts: yes + + + roles: + - role: zen_dhcpd