Commit 1c6261cd by Arbab Nazar Committed by GitHub

Merge pull request #3209 from edx/arbab/minos-rewrite

proper YAML syntax for rewriting ansible tasks
parents d5f51911 2603e0f5
...@@ -35,27 +35,29 @@ ...@@ -35,27 +35,29 @@
# #
#TODO: remove #TODO: remove
- name: maintain backwards-compatable config location - name: Maintain backwards-compatable config location
file: > file:
path={{ COMMON_CFG_DIR }}/{{ minos_service_name }}/{{ minos_service_name }}.yml src: "{{ COMMON_CFG_DIR }}/{{ minos_service_name }}.yml"
state=link dest: "{{ COMMON_CFG_DIR }}/{{ minos_service_name }}/{{ minos_service_name }}.yml"
src={{ COMMON_CFG_DIR }}/{{ minos_service_name }}.yml state: link
owner=root owner: root
group=root group: root
- name: create minos config directory - name: Create minos config directory
file: > file:
path={{ minos_voter_cfg }} path: "{{ minos_voter_cfg }}"
state=directory state: directory
owner=root owner: root
group=root group: root
mode=0755 mode: "0755"
- name: create minos voters configs - name: Create minos voters configs
template: > template:
dest={{ minos_voter_cfg }}/{{ item }}.yml dest: "{{ minos_voter_cfg }}/{{ item }}.yml"
src=edx/etc/minos/conf.d/{{ item }}.yml.j2 src: "edx/etc/minos/conf.d/{{ item }}.yml.j2"
mode=0755 owner=root group=root mode: "0755"
owner: root
group: root
with_items: with_items:
- "BellwetherVoter" - "BellwetherVoter"
- "ProccessQuiescenceVoterPython" - "ProccessQuiescenceVoterPython"
...@@ -63,33 +65,27 @@ ...@@ -63,33 +65,27 @@
- "ZippedTrackingLogVoter" - "ZippedTrackingLogVoter"
- "RolledTrackingLogVoter" - "RolledTrackingLogVoter"
# Optional auth for git # Optional auth for git
- name: create ssh script for git (not authenticated) - name: Create ssh script for git
template: > template:
src=tmp/git-identity.sh.j2 dest={{ minos_git_ssh }} src: "tmp/git-identity.sh.j2"
mode=750 dest: "{{ minos_git_ssh }}"
when: mode: "0750"
- MINOS_GIT_IDENTITY is not defined
- name: create ssh script for git (authenticated) - name: Install read-only ssh key
template: > copy:
src=tmp/git-identity.sh.j2 dest={{ minos_git_ssh }} content: "{{ MINOS_GIT_IDENTITY }}"
mode=750 dest: "{{ minos_git_identity }}"
when: force: yes
- MINOS_GIT_IDENTITY is defined mode: "0600"
- name: install read-only ssh key - name: Install python custom-requirements
copy: > pip:
content="{{ MINOS_GIT_IDENTITY }}" dest="{{ minos_git_identity }}" name: "{{ item }}"
force=yes mode=0600 virtualenv: "{{ minos_app_dir }}/venvs/"
state: present
- name: install python custom-requirements extra_args: "--exists-action w"
pip: > version: "{{ minos_edx_server_tools_version }}"
name="{{ item }}"
virtualenv="{{ minos_app_dir }}/venvs/"
state=present
extra_args="--exists-action w"
version="{{ minos_edx_server_tools_version }}"
environment: environment:
GIT_SSH: "{{ minos_git_ssh }}" GIT_SSH: "{{ minos_git_ssh }}"
with_items: with_items:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment