--- # Project and user administration - name: "Create project for workload {{namespace}}" shell: "oc new-project {{namespace}}" - name: Make sure we go back to default project shell: "oc project default" # ############### enmasse specific ############### - name: Ensure the following directory is refreshed in remote, /tmp/{{namespace}}/enmasse file: path: "/tmp/{{namespace}}" state: absent - file: path: "/tmp/{{namespace}}" state: directory - name: get enmasse release and unzip; {{enmasse_repo_url}} get_url: url: "{{enmasse_repo_url}}" dest: "/tmp/{{namespace}}" - unarchive: src: "/tmp/{{namespace}}/enmasse-{{enmasse_repo_tag}}.tgz" dest: "/tmp/{{namespace}}" remote_src: yes # templates/install/ansible/inventory/singletenant-standard.example - name: execute ansible-playbook using shell to create standard deployment shell: | ansible-playbook -i "enmasse," -c local {{enmasse_dest_dir}}/ansible/playbooks/openshift/{{enmasse_template_file}} \ -e namespace={{namespace}} \ -e multitenant=true \ -e address_space_type=standard \ -e address_space_plan=unlimited-standard \ > /tmp/{{namespace}}/enmasse_install_standard.log # ############################################### - name: annotate the project as requested by user shell: "oc annotate namespace {{namespace}} openshift.io/requester={{ocp_username}} --overwrite" - name: Give ocp_username access to ocp_project shell: "oc policy add-role-to-user admin {{ocp_username}} -n {{namespace}}" - name: workload Tasks Complete debug: msg: workload Tasks Complete