Update ansible test

Signed-off-by: Brett Logan <lindluni@github.com>
This commit is contained in:
Brett Logan 2023-04-10 14:33:15 -04:00
parent 21a606688b
commit 751e5c5444
9 changed files with 58 additions and 60 deletions

View file

@ -1,5 +1,6 @@
--- ---
- hosts: github_primary - name: Configure the GHE Instance
hosts: github_primary
vars: vars:
demo_github_initial_user: "{{ hostvars['localhost'].local_user }}" demo_github_initial_user: "{{ hostvars['localhost'].local_user }}"
github_host: "{{ hostvars['github_primary'].ansible_host }}" github_host: "{{ hostvars['github_primary'].ansible_host }}"

View file

@ -8,7 +8,7 @@
#################### ####################
# GHE config apply # # GHE config apply #
#################### ####################
- name: ghe config apply - name: GHE Config Apply
ansible.builtin.command: ghe-config-apply ansible.builtin.command: ghe-config-apply
poll: 0 poll: 0
async: 300 async: 300

View file

@ -1,5 +1,14 @@
--- ---
- name: Wait for admin port to open - name: Wait for admin port to open
######################
# Set the tags block #
######################
tags:
- metrics
- github
- ghe_primary
- initialize
block: block:
- name: Wait for Admin port to come up (Port 8443) - name: Wait for Admin port to come up (Port 8443)
## Doc: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html ## Doc: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
@ -77,12 +86,3 @@
ansible.builtin.service: ansible.builtin.service:
name: collectd name: collectd
state: restarted state: restarted
######################
# Set the tags block #
######################
tags:
- metrics
- github
- ghe_primary
- initialize

View file

@ -1,5 +1,12 @@
--- ---
- name: GHE API Configuration - name: GHE API Configuration
######################
# Set the tags block #
######################
tags:
- github
- ghe_primary
- initialize
block: block:
# ################################## # ##################################
# # Run config to take in settings # # # Run config to take in settings #
@ -59,11 +66,3 @@
- "/tmp/ghe-license.ghl" - "/tmp/ghe-license.ghl"
- "/tmp/settings.json" - "/tmp/settings.json"
- "/tmp/ldap-settings.json" - "/tmp/ldap-settings.json"
######################
# Set the tags block #
######################
tags:
- github
- ghe_primary
- initialize

View file

@ -1,5 +1,13 @@
--- ---
- name: GHE Config apply - name: GHE Config apply
######################
# Set the tags block #
######################
tags:
- github
- ghe_primary
- initialize
block: block:
######################################## ########################################
# Copy the script to the local machine # # Copy the script to the local machine #
@ -23,11 +31,3 @@
poll: 0 poll: 0
args: args:
executable: "/bin/bash" executable: "/bin/bash"
######################
# Set the tags block #
######################
tags:
- github
- ghe_primary
- initialize

View file

@ -1,5 +1,13 @@
--- ---
- name: GHE Initial configuration - name: GHE Initial configuration
######################
# Set the tags block #
######################
tags:
- github
- ghe_primary
- initialize
block: block:
############################### ###############################
# Wait for admin port to open # # Wait for admin port to open #
@ -78,11 +86,3 @@
- name: Set the GitHub Admin password fact - name: Set the GitHub Admin password fact
ansible.builtin.set_fact: ansible.builtin.set_fact:
github_admin_password: "{{ github_admin_password }}" github_admin_password: "{{ github_admin_password }}"
######################
# Set the tags block #
######################
tags:
- github
- ghe_primary
- initialize

View file

@ -1,5 +1,10 @@
--- ---
- name: GHE LDAP configuration - name: GHE LDAP configuration
######################
# Set the tags block #
######################
tags:
- openldap
block: block:
####################################################### #######################################################
# Copy License file to GHE to decrypt file and upload # # Copy License file to GHE to decrypt file and upload #
@ -24,9 +29,3 @@
delay: 2 delay: 2
register: http_ldapconfig_result register: http_ldapconfig_result
until: http_ldapconfig_result.rc == 0 until: http_ldapconfig_result.rc == 0
######################
# Set the tags block #
######################
tags:
- openldap

View file

@ -1,34 +1,34 @@
--- ---
- name: Configure the GHE Instance - name: Configure the GHE Instance
tags:
- github
- ghe_primary
- initialize
block: block:
###################################################### ######################################################
# Need to run the tasks to stand up the GHE instance # # Need to run the tasks to stand up the GHE instance #
###################################################### ######################################################
# Configure the base system # Configure the base system
- ansible.builtin.include_tasks: ghe-initial-configuration.yml - ansible.builtin.include_tasks: ghe-initial-configuration.yml
tags:
- github
- ghe_primary
- initialize
- name: Configure the GHE LDAP - name: Configure the GHE LDAP
tags:
- openldap
block: block:
############################################################ ############################################################
# Need to run the tasks to config LDAP on the GHE instance # # Need to run the tasks to config LDAP on the GHE instance #
############################################################ ############################################################
# Configure the base system # Configure the base system
- ansible.builtin.include_tasks: ghe-ldap-configuration.yml - ansible.builtin.include_tasks: ghe-ldap-configuration.yml
tags:
- openldap
- name: Configure the GHE Instance Block - name: Configure the GHE Instance Block
tags:
- github
- ghe_primary
- initialize
block: block:
###################################################### ######################################################
# Need to run the tasks to stand up the GHE instance # # Need to run the tasks to stand up the GHE instance #
###################################################### ######################################################
# Configure the base system # Configure the base system
- ansible.builtin.include_tasks: ghe-api-config-apply.yml - ansible.builtin.include_tasks: ghe-api-config-apply.yml
tags:
- github
- ghe_primary
- initialize

View file

@ -1,5 +1,13 @@
--- ---
- name: Splunk settings - name: Splunk settings
######################
# Set the tags block #
######################
tags:
- splunk
- github
- ghe_primary
- initialize
block: block:
############################### ###############################
# Wait for admin port to open # # Wait for admin port to open #
@ -57,12 +65,3 @@
register: http_splunk_config_result register: http_splunk_config_result
until: http_splunk_config_result.rc == 0 until: http_splunk_config_result.rc == 0
notify: ghe config apply notify: ghe config apply
######################
# Set the tags block #
######################
tags:
- splunk
- github
- ghe_primary
- initialize