mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-28 17:11:00 -05:00
Fix Ansible tests (#2668)
This commit is contained in:
parent
c5e5046b8b
commit
657efa16e5
8 changed files with 27 additions and 27 deletions
|
@ -9,6 +9,6 @@
|
|||
# GHE config apply #
|
||||
####################
|
||||
- name: ghe config apply
|
||||
command: ghe-config-apply
|
||||
ansible.builtin.command: ghe-config-apply
|
||||
poll: 0
|
||||
async: 300
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: Wait for Admin port to come up (Port 8443)
|
||||
## Doc: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
|
||||
## Helpful Google: ansible wait_for
|
||||
wait_for:
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ ansible_host }}"
|
||||
port: 8443
|
||||
delay: 5
|
||||
|
@ -19,7 +19,7 @@
|
|||
#################################
|
||||
- name: Wait for http status 200
|
||||
changed_when: false
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ ansible_host }}:8443"
|
||||
validate_certs: "no"
|
||||
register: http_result
|
||||
|
@ -35,7 +35,7 @@
|
|||
# and place it on the new remote machine
|
||||
- name: Copy collectd-settings.json File to GHE
|
||||
become: true
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "collectd-settings.json.j2"
|
||||
dest: /tmp/collectd-settings.json
|
||||
owner: admin
|
||||
|
@ -47,7 +47,7 @@
|
|||
########################################################
|
||||
- name: Setup Grafana
|
||||
# yamllint disable
|
||||
shell: curl --fail -Lk \
|
||||
ansible.builtin.shell: curl --fail -Lk \
|
||||
-X PUT "https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings" \
|
||||
--data-urlencode "settings=`cat /tmp/collectd-settings.json`"
|
||||
# yamllint enable
|
||||
|
@ -63,7 +63,7 @@
|
|||
#####################################
|
||||
- name: Copy forwarding.conf File to GHE
|
||||
become: true
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
force: true
|
||||
src: "forwarding.conf.j2"
|
||||
dest: /etc/collectd/conf.d/forwarding.conf
|
||||
|
@ -76,7 +76,7 @@
|
|||
###########################################
|
||||
- name: Restart Collectd service
|
||||
become: true
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: collectd
|
||||
state: restarted
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# Run config to take in settings #
|
||||
##################################
|
||||
- name: Run Configure for Settings to Take Effect
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ ansible_host }}:8443/setup/api/configure"
|
||||
method: POST
|
||||
return_content: "yes"
|
||||
|
@ -31,7 +31,7 @@
|
|||
# https://docs.ansible.com/ansible/uri_module.html
|
||||
# yamllint disable-line
|
||||
# https://developer.github.com/enterprise/v3/enterprise-admin/management_console/#check-configuration-status
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ ansible_host }}:8443/setup/api/configcheck"
|
||||
method: GET
|
||||
return_content: "yes"
|
||||
|
@ -51,7 +51,7 @@
|
|||
# files that were copied to the ghe server
|
||||
- name: Remove temp Files from GHE
|
||||
become: true
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
########################################
|
||||
- name: Copy the script to the GHE instance
|
||||
become: true
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
force: 'yes'
|
||||
src: "ghe-config-apply.sh"
|
||||
dest: /tmp/ghe-config-apply.sh
|
||||
|
@ -17,7 +17,7 @@
|
|||
# Run config to take in settings #
|
||||
##################################
|
||||
- name: Run ghe-config-apply for Settings to Take Effect
|
||||
shell: "nohup ./tmp/ghe-config-apply.sh </dev/null >/dev/null 2>&1 &"
|
||||
ansible.builtin.shell: "nohup ./tmp/ghe-config-apply.sh </dev/null >/dev/null 2>&1 &"
|
||||
async: 300
|
||||
poll: 0
|
||||
args:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# yamllint disable-line
|
||||
## Documentation: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
|
||||
## Helpful Google: ansible wait_for
|
||||
wait_for:
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ ansible_host }}"
|
||||
port: 8443
|
||||
delay: 5
|
||||
|
@ -20,7 +20,7 @@
|
|||
#################################
|
||||
- name: Wait for http status 200
|
||||
changed_when: false
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ ansible_host }}:8443"
|
||||
validate_certs: "no"
|
||||
register: http_result
|
||||
|
@ -36,7 +36,7 @@
|
|||
# and place it on the new remote machine
|
||||
- name: Copy License File to GHE
|
||||
become: true
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ role_path }}/files/ghe-license.ghl"
|
||||
dest: /tmp/ghe-license.ghl
|
||||
owner: admin
|
||||
|
@ -50,7 +50,7 @@
|
|||
# and place it on the new remote machine
|
||||
- name: Copy settings.json File to GHE
|
||||
become: true
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "settings.json.j2"
|
||||
dest: /tmp/settings.json
|
||||
owner: admin
|
||||
|
@ -61,7 +61,7 @@
|
|||
# Set up Admin password, License, and Initial Settings #
|
||||
########################################################
|
||||
- name: Setup License, Admin Password, and Initial Settings
|
||||
command: curl --fail -Lk \
|
||||
ansible.builtin.command: curl --fail -Lk \
|
||||
-X POST "https://{{ ansible_host }}:8443/setup/api/start" \
|
||||
-F license=@/tmp/ghe-license.ghl \
|
||||
-F "password={{ github_admin_password }}" \
|
||||
|
@ -75,7 +75,7 @@
|
|||
# Set the GHE Admin Password fact #
|
||||
###################################
|
||||
- name: Set the GitHub Admin password fact
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
github_admin_password: "{{ github_admin_password }}"
|
||||
|
||||
######################
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# and place it on the new remote machine
|
||||
- name: Copy ldap-settings.json File to GHE
|
||||
become: true
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "ldap-settings.json.j2"
|
||||
dest: /tmp/ldap-settings.json
|
||||
owner: admin
|
||||
|
@ -18,7 +18,7 @@
|
|||
# Set up LDAP with ldap-settings.json #
|
||||
#######################################
|
||||
- name: Setup ldap with ldap-settings.json
|
||||
shell: curl --fail -Lk -X PUT 'https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings' --data-urlencode "settings=`cat /tmp/ldap-settings.json`" # yamllint disable-line
|
||||
ansible.builtin.shell: curl --fail -Lk -X PUT 'https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings' --data-urlencode "settings=`cat /tmp/ldap-settings.json`" # yamllint disable-line
|
||||
retries: 10
|
||||
delay: 2
|
||||
register: http_ldapconfig_result
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# Need to run the tasks to stand up the GHE instance #
|
||||
######################################################
|
||||
# Configure the base system
|
||||
- include_tasks: ghe-initial-configuration.yml
|
||||
- ansible.builtin.include_tasks: ghe-initial-configuration.yml
|
||||
|
||||
######################
|
||||
# Set the tags block #
|
||||
|
@ -32,7 +32,7 @@
|
|||
# Need to run the tasks to config LDAP on the GHE instance #
|
||||
############################################################
|
||||
# Configure the base system
|
||||
- include_tasks: ghe-ldap-configuration.yml
|
||||
- ansible.builtin.include_tasks: ghe-ldap-configuration.yml
|
||||
|
||||
######################
|
||||
# Set the tags block #
|
||||
|
@ -53,7 +53,7 @@
|
|||
# Need to run the tasks to stand up the GHE instance #
|
||||
######################################################
|
||||
# Configure the base system
|
||||
- include_tasks: ghe-api-config-apply.yml
|
||||
- ansible.builtin.include_tasks: ghe-api-config-apply.yml
|
||||
|
||||
######################
|
||||
# Set the tags block #
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: Wait for Admin port to come up (Port 8443)
|
||||
## Doc: http://docs.ansible.com/ansible/latest/modules/wait_for_module.html
|
||||
## Helpful Google: ansible wait_for
|
||||
wait_for:
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ ansible_host }}"
|
||||
port: 8443
|
||||
delay: 5
|
||||
|
@ -19,7 +19,7 @@
|
|||
#################################
|
||||
- name: Wait for http status 200
|
||||
changed_when: false
|
||||
uri:
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ ansible_host }}:8443"
|
||||
validate_certs: "no"
|
||||
register: http_result
|
||||
|
@ -35,7 +35,7 @@
|
|||
# and place it on the new remote machine
|
||||
- name: Copy splunk-settings.json File to GHE
|
||||
become: true
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: "splunk-settings.json.j2"
|
||||
dest: /tmp/splunk-settings.json
|
||||
owner: admin
|
||||
|
@ -47,7 +47,7 @@
|
|||
########################################################
|
||||
- name: Setup Splunk
|
||||
# yamllint disable
|
||||
shell: curl --fail -Lk \
|
||||
ansible.builtin.shell: curl --fail -Lk \
|
||||
-X PUT "https://api_key:{{ github_admin_password }}@{{ ansible_host }}:8443/setup/api/settings" \
|
||||
--data-urlencode "settings=`cat /tmp/splunk-settings.json`"
|
||||
# yamllint enable
|
||||
|
|
Loading…
Reference in a new issue