2018-03-16 18:28:19 +01:00
|
|
|
- name: Create an SCM Credential
|
|
|
|
tower_credential:
|
|
|
|
name: SCM Credential for Project
|
|
|
|
organization: Default
|
|
|
|
kind: scm
|
|
|
|
|
|
|
|
- name: Create a Project
|
|
|
|
tower_project:
|
|
|
|
name: my-project
|
|
|
|
organization: Default
|
|
|
|
state: present
|
|
|
|
scm_credential: SCM Credential for Project
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
|
|
|
|
|
|
|
- name: Delete a Project
|
|
|
|
tower_project:
|
|
|
|
name: my-project
|
|
|
|
state: absent
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
2018-06-15 09:55:21 +02:00
|
|
|
|
|
|
|
- name: create a project directory for manual project
|
|
|
|
import_tasks: create_project_dir.yml
|
|
|
|
|
|
|
|
- name: Create a manual project
|
|
|
|
tower_project:
|
|
|
|
name: manual project
|
|
|
|
organization: Default
|
|
|
|
scm_type: manual
|
|
|
|
local_path: "manual_test_project"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
2018-07-24 17:18:50 +02:00
|
|
|
|
|
|
|
- name: Create a git project without credentials
|
|
|
|
tower_project:
|
|
|
|
name: git project
|
|
|
|
organization: Default
|
|
|
|
scm_type: git
|
|
|
|
scm_url: https://github.com/ansible/ansible
|
2018-12-19 13:01:12 +01:00
|
|
|
|
|
|
|
- name: "Create {{ item }}"
|
|
|
|
tower_organization:
|
|
|
|
name: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- TestOrg1
|
|
|
|
- TestOrg2
|
|
|
|
|
|
|
|
- name: "Create credential"
|
|
|
|
tower_credential:
|
|
|
|
kind: scm
|
|
|
|
name: TestCred1
|
|
|
|
organization: "{{ item }}"
|
|
|
|
loop:
|
|
|
|
- TestOrg2
|
|
|
|
- TestOrg1
|
|
|
|
|
|
|
|
- name: Create project TestProject
|
|
|
|
tower_project:
|
|
|
|
name: TestProject
|
|
|
|
organization: TestOrg1
|
|
|
|
scm_type: git
|
|
|
|
scm_url: "https://github.com/ansible/ansible"
|
|
|
|
scm_credential: TestCred1
|
|
|
|
register: multi_org_cred_project
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "multi_org_cred_project is changed"
|