Remove some whitespace

This commit is contained in:
Slavi Pantaleev 2021-03-16 09:56:29 +02:00
parent 011e95c1d2
commit c890e351fc
12 changed files with 32 additions and 44 deletions

View File

@ -33,7 +33,7 @@
curl -sku {{ tower_username }}:{{ tower_password }} -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"write"}' https://{{ tower_host }}/api/v2/users/1/personal_tokens/ | jq '.token' | sed -r 's/\"//g' curl -sku {{ tower_username }}:{{ tower_password }} -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"write"}' https://{{ tower_host }}/api/v2/users/1/personal_tokens/ | jq '.token' | sed -r 's/\"//g'
register: tower_token register: tower_token
no_log: True no_log: True
- name: Recreate 'Backup Server' job template - name: Recreate 'Backup Server' job template
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
awx.awx.tower_job_template: awx.awx.tower_job_template:
@ -62,8 +62,7 @@
- name: Set boolean value to exit playbook - name: Set boolean value to exit playbook
set_fact: set_fact:
end_playbook: true end_playbook: true
- name: End playbook if this task list is called. - name: End playbook if this task list is called.
meta: end_play meta: end_play
when: end_playbook is defined and end_playbook|bool when: end_playbook is defined and end_playbook|bool

View File

@ -10,10 +10,10 @@
when: admin_access == 'false' when: admin_access == 'false'
- name: Examine if server admin set - name: Examine if server admin set
set_fact: set_fact:
admin_bool: 1 admin_bool: 1
when: admin_access == 'true' when: admin_access == 'true'
- name: Set boolean value to exit playbook - name: Set boolean value to exit playbook
set_fact: set_fact:
end_playbook: true end_playbook: true
@ -25,7 +25,7 @@
- name: Result - name: Result
debug: msg="{{ cmd.stdout }}" debug: msg="{{ cmd.stdout }}"
- name: End playbook if this task list is called. - name: End playbook if this task list is called.
meta: end_play meta: end_play
when: end_playbook is defined and end_playbook|bool when: end_playbook is defined and end_playbook|bool

View File

@ -21,7 +21,7 @@
with_dict: with_dict:
'matrix_nginx_proxy_base_domain_homepage_enabled': 'false' 'matrix_nginx_proxy_base_domain_homepage_enabled': 'false'
when: customise_base_domain_website|bool == true when: customise_base_domain_website|bool == true
- name: Record custom 'Customise Website + Access Export' variables locally on AWX - name: Record custom 'Customise Website + Access Export' variables locally on AWX
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
@ -34,7 +34,7 @@
'sftp_auth_method': '"{{ sftp_auth_method }}"' 'sftp_auth_method': '"{{ sftp_auth_method }}"'
'sftp_password': '"{{ sftp_password }}"' 'sftp_password': '"{{ sftp_password }}"'
'sftp_public_key': '"{{ sftp_public_key }}"' 'sftp_public_key': '"{{ sftp_public_key }}"'
- name: Copy new 'matrix_vars.yml' to target machine - name: Copy new 'matrix_vars.yml' to target machine
copy: copy:
src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml' src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
@ -170,7 +170,7 @@
group: sftp group: sftp
mode: '0644' mode: '0644'
when: (sftp_public_key | length > 0) and (sftp_auth_method == "SSH Key") when: (sftp_public_key | length > 0) and (sftp_auth_method == "SSH Key")
- name: Alter SSH Subsystem State 1 - name: Alter SSH Subsystem State 1
lineinfile: lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
@ -227,4 +227,3 @@
service: service:
name: ssh.service name: ssh.service
state: restarted state: restarted

View File

@ -3,4 +3,3 @@
include_vars: include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml' file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True no_log: True

View File

@ -16,7 +16,7 @@
when: run_setup|bool and matrix_awx_enabled|bool when: run_setup|bool and matrix_awx_enabled|bool
tags: tags:
- create-user - create-user
# Perform extra self-check functions # Perform extra self-check functions
- import_tasks: "{{ role_path }}/tasks/self_check.yml" - import_tasks: "{{ role_path }}/tasks/self_check.yml"
when: run_setup|bool and matrix_awx_enabled|bool when: run_setup|bool and matrix_awx_enabled|bool
@ -58,12 +58,12 @@
when: run_setup|bool and matrix_awx_enabled|bool when: run_setup|bool and matrix_awx_enabled|bool
tags: tags:
- setup-ma1sd - setup-ma1sd
# Additional playbook to set the variable file during Corporal configuration # Additional playbook to set the variable file during Corporal configuration
- import_tasks: "{{ role_path }}/tasks/set_variables_corporal.yml" - import_tasks: "{{ role_path }}/tasks/set_variables_corporal.yml"
when: run_setup|bool and matrix_awx_enabled|bool when: run_setup|bool and matrix_awx_enabled|bool
tags: tags:
- setup-corporal - setup-corporal
# Additional playbook to set the variable file during Synapse Admin configuration # Additional playbook to set the variable file during Synapse Admin configuration
- import_tasks: "{{ role_path }}/tasks/set_variables_synapse_admin.yml" - import_tasks: "{{ role_path }}/tasks/set_variables_synapse_admin.yml"
@ -76,4 +76,3 @@
when: run_setup|bool and matrix_awx_enabled|bool when: run_setup|bool and matrix_awx_enabled|bool
tags: tags:
- always - always

View File

@ -1,21 +1,21 @@
- name: Install prerequisite apt packages on target - name: Install prerequisite apt packages on target
apt: apt:
name: name:
- sysstat - sysstat
state: present state: present
- name: Install prerequisite yum packages on AWX - name: Install prerequisite yum packages on AWX
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
yum: yum:
name: name:
- bind-utils - bind-utils
state: present state: present
- name: Install prerequisite pip packages on AWX - name: Install prerequisite pip packages on AWX
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
pip: pip:
name: name:
- dnspython - dnspython
state: present state: present
@ -23,7 +23,7 @@
shell: iostat -c shell: iostat -c
register: cpu_usage_stat register: cpu_usage_stat
no_log: True no_log: True
- name: Print CPU usage statistics - name: Print CPU usage statistics
debug: debug:
msg: "{{ cpu_usage_stat.stdout.split('\n') }}" msg: "{{ cpu_usage_stat.stdout.split('\n') }}"
@ -91,4 +91,3 @@
debug: debug:
msg: "{{ docker_stats.stdout.split('\n') }}" msg: "{{ docker_stats.stdout.split('\n') }}"
when: docker_stats is defined when: docker_stats is defined

View File

@ -8,7 +8,7 @@
insertafter: '# Corporal Settings' insertafter: '# Corporal Settings'
with_dict: with_dict:
'matrix_corporal_enabled': '{{ matrix_corporal_enabled }}' 'matrix_corporal_enabled': '{{ matrix_corporal_enabled }}'
- name: Enable Shared Secret Auth if Corporal enabled - name: Enable Shared Secret Auth if Corporal enabled
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
@ -19,7 +19,7 @@
with_dict: with_dict:
'matrix_synapse_ext_password_provider_shared_secret_auth_enabled': 'true' 'matrix_synapse_ext_password_provider_shared_secret_auth_enabled': 'true'
when: matrix_corporal_enabled|bool when: matrix_corporal_enabled|bool
- name: Disable Shared Secret Auth if Corporal disabled - name: Disable Shared Secret Auth if Corporal disabled
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
@ -30,7 +30,7 @@
with_dict: with_dict:
'matrix_synapse_ext_password_provider_shared_secret_auth_enabled': 'false' 'matrix_synapse_ext_password_provider_shared_secret_auth_enabled': 'false'
when: not matrix_corporal_enabled|bool when: not matrix_corporal_enabled|bool
- name: Enable Rest Auth Endpoint if Corporal enabled - name: Enable Rest Auth Endpoint if Corporal enabled
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
@ -97,7 +97,7 @@
"Type": "static_file", "Type": "static_file",
"Path": "/etc/matrix-corporal/corporal-policy.json" "Path": "/etc/matrix-corporal/corporal-policy.json"
} }
when: matrix_corporal_policy_provider_mode == "Simple Static File" when: matrix_corporal_policy_provider_mode == "Simple Static File"
- name: Touch the /matrix/corporal/ directory - name: Touch the /matrix/corporal/ directory
file: file:
@ -130,7 +130,7 @@
owner: matrix owner: matrix
group: matrix group: matrix
mode: '660' mode: '660'
- name: Touch the last-policy.json file to ensure it exists - name: Touch the last-policy.json file to ensure it exists
file: file:
path: "/matrix/corporal/config/last-policy.json" path: "/matrix/corporal/config/last-policy.json"
@ -138,7 +138,7 @@
owner: matrix owner: matrix
group: matrix group: matrix
mode: '660' mode: '660'
- name: Record 'Simple Static File' configuration content in corporal-policy.json - name: Record 'Simple Static File' configuration content in corporal-policy.json
copy: copy:
content: "{{ matrix_corporal_simple_static_config | string }}" content: "{{ matrix_corporal_simple_static_config | string }}"
@ -211,16 +211,16 @@
src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_corporal.json' src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_corporal.json'
dest: '/matrix/awx/configure_corporal.json' dest: '/matrix/awx/configure_corporal.json'
mode: '0660' mode: '0660'
- debug: - debug:
msg: "matrix_corporal_matrix_homeserver_api_endpoint: {{ matrix_corporal_matrix_homeserver_api_endpoint }}" msg: "matrix_corporal_matrix_homeserver_api_endpoint: {{ matrix_corporal_matrix_homeserver_api_endpoint }}"
- debug: - debug:
msg: "matrix_corporal_matrix_auth_shared_secret: {{ matrix_corporal_matrix_auth_shared_secret }}" msg: "matrix_corporal_matrix_auth_shared_secret: {{ matrix_corporal_matrix_auth_shared_secret }}"
- debug: - debug:
msg: "matrix_corporal_http_gateway_internal_rest_auth_enabled: {{ matrix_corporal_http_gateway_internal_rest_auth_enabled }}" msg: "matrix_corporal_http_gateway_internal_rest_auth_enabled: {{ matrix_corporal_http_gateway_internal_rest_auth_enabled }}"
- debug: - debug:
msg: "matrix_corporal_matrix_registration_shared_secret: {{ matrix_corporal_matrix_registration_shared_secret }}" msg: "matrix_corporal_matrix_registration_shared_secret: {{ matrix_corporal_matrix_registration_shared_secret }}"
@ -251,4 +251,3 @@
tower_host: "https://{{ tower_host }}" tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes

View File

@ -53,7 +53,7 @@
curl -sku {{ tower_username }}:{{ tower_password }} -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"write"}' https://{{ tower_host }}/api/v2/users/1/personal_tokens/ | jq '.token' | sed -r 's/\"//g' curl -sku {{ tower_username }}:{{ tower_password }} -H "Content-Type: application/json" -X POST -d '{"description":"Tower CLI", "application":null, "scope":"write"}' https://{{ tower_host }}/api/v2/users/1/personal_tokens/ | jq '.token' | sed -r 's/\"//g'
register: tower_token register: tower_token
no_log: True no_log: True
- name: Recreate 'Configure Element' job template - name: Recreate 'Configure Element' job template
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
awx.awx.tower_job_template: awx.awx.tower_job_template:
@ -74,4 +74,3 @@
tower_host: "https://{{ tower_host }}" tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes

View File

@ -55,4 +55,3 @@
tower_host: "https://{{ tower_host }}" tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes

View File

@ -44,14 +44,14 @@
regexp: '^.*\n' regexp: '^.*\n'
after: '# Start ma1sd Extension' after: '# Start ma1sd Extension'
before: '# End ma1sd Extension' before: '# End ma1sd Extension'
- name: Replace conjoined ma1sd configuration extension limiters - name: Replace conjoined ma1sd configuration extension limiters
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
replace: replace:
path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml' path: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
regexp: '^# Start ma1sd Extension# End ma1sd Extension' regexp: '^# Start ma1sd Extension# End ma1sd Extension'
replace: '# Start ma1sd Extension\n# End ma1sd Extension' replace: '# Start ma1sd Extension\n# End ma1sd Extension'
- name: Insert ma1sd configuration extension header if using external LDAP/AD with ma1sd - name: Insert ma1sd configuration extension header if using external LDAP/AD with ma1sd
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
@ -125,6 +125,5 @@
tower_host: "https://{{ tower_host }}" tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes
# ^ This playbook isn't executing so the survey isn't being updated! :P
# ^ This playbook isn't executing so the survey isn't being updated! :P

View File

@ -15,7 +15,7 @@
'matrix_synapse_max_upload_size_mb': '{{ matrix_synapse_max_upload_size_mb }}' 'matrix_synapse_max_upload_size_mb': '{{ matrix_synapse_max_upload_size_mb }}'
'matrix_synapse_url_preview_enabled': '{{ matrix_synapse_url_preview_enabled }}' 'matrix_synapse_url_preview_enabled': '{{ matrix_synapse_url_preview_enabled }}'
'matrix_synapse_allow_guest_access': '{{ matrix_synapse_allow_guest_access }}' 'matrix_synapse_allow_guest_access': '{{ matrix_synapse_allow_guest_access }}'
- name: Empty Synapse variable 'matrix_synapse_auto_join_rooms' locally on AWX, if raw inputs empty - name: Empty Synapse variable 'matrix_synapse_auto_join_rooms' locally on AWX, if raw inputs empty
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
replace: replace:
@ -143,7 +143,7 @@
line: " - {{ item }}" line: " - {{ item }}"
with_items: "{{ ext_federation_whitelist_raw.splitlines() }}" with_items: "{{ ext_federation_whitelist_raw.splitlines() }}"
when: ext_federation_whitelist_raw|length > 0 when: ext_federation_whitelist_raw|length > 0
- name: Record Synapse Custom variables locally on AWX - name: Record Synapse Custom variables locally on AWX
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
lineinfile: lineinfile:
@ -220,4 +220,3 @@
tower_host: "https://{{ tower_host }}" tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes

View File

@ -54,5 +54,3 @@
tower_host: "https://{{ tower_host }}" tower_host: "https://{{ tower_host }}"
tower_oauthtoken: "{{ tower_token.stdout }}" tower_oauthtoken: "{{ tower_token.stdout }}"
validate_certs: yes validate_certs: yes