Jim Rigsbee
2019-10-28 54a06875982ee59b39e96d68e6fc539e0a745e48
Skylight: added tower/SSL settings
1 files modified
22 ■■■■ changed files
ansible/roles/skylight-ansible-tower/tasks/setup.yml 22 ●●●● patch | view | raw | blame | history
ansible/roles/skylight-ansible-tower/tasks/setup.yml
@@ -431,12 +431,22 @@
  register: response
  changed_when: response.status == 200
- name: Disable GIT cert validation
  lineinfile:
    path: /etc/tower/settings.py
    regexp: 'GIT_SSL_NO_VERIFY'
    line: "AWX_TASK_ENV['GIT_SSL_NO_VERIFY'] = 'True'"
  # notify: restart tower
- name: Change Tower settings for Git and Galaxy SSL validation
  uri:
    url:  "https://localhost/api/v2/settings/jobs/"
    method: PATCH
    user: admin
    password: "{{ tower_admin_password }}"
    body: '{"AWX_TASK_ENV": {"GALAXY_IGNORE_CERTS": "TRUE","GIT_SSL_NO_VERIFY": "TRUE"}}'
    body_format: json
    validate_certs: False
    force_basic_auth: yes
    status_code:
      - 200
      - 204
      - 400
  register: response
  changed_when: response.status == 200
  # RM: Manual restart since we need the next playbook to
  # to be able to clone the repos