-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dfb236
commit 035b424
Showing
24 changed files
with
175 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
- hosts: localhost | ||
- name: Test plays | ||
hosts: localhost | ||
remote_user: root | ||
roles: | ||
- connect_to_repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
# tasks file for createCollection | ||
- import_tasks: prerequisites.yml | ||
- name: Import prerequisites | ||
ansible.builtin.import_tasks: prerequisites.yml | ||
|
||
- import_tasks: create.yml | ||
- name: Import create | ||
ansible.builtin.import_tasks: create.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
# Collection Description | ||
- block: | ||
- name: Prompt description | ||
when: (collection_description is not defined) or (collection_description|length == 0) | ||
run_once: true | ||
block: | ||
- name: Set description to ansible collection | ||
pause: | ||
ansible.builtin.pause: | ||
prompt: "Please give a description to your collection" | ||
register: prompt_description | ||
|
||
- name: Set your description coming from prompt | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
collection_description: "{{ prompt_description['user_input'] }}" | ||
when: (collection_description is not defined) or (collection_description|length == 0) | ||
run_once: true | ||
|
||
# Email Authors for collection | ||
- block: | ||
- name: Prompt email authors | ||
when: (collection_author_email is not defined) or (collection_author_email|length == 0) | ||
run_once: true | ||
block: | ||
- name: Give an email to ansible collection | ||
pause: | ||
ansible.builtin.pause: | ||
prompt: "Please give an email that we can set as author of this collection (if empty, take as default from the git config global)" | ||
register: prompt_email | ||
|
||
- name: Set authors email | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
collection_author_email: "{{ prompt_email['user_input'] }}" | ||
when: prompt_email['user_input']|length != 0 | ||
|
||
- block: | ||
- name: Get User.Email from git global config to define authors of the collection | ||
shell: "git config --global user.email" | ||
- name: Set email authors | ||
when: prompt_email['user_input']|length == 0 | ||
block: | ||
- name: Get User.Email from git global config to define authors of the collection # noqa: command-instead-of-module | ||
ansible.builtin.shell: "set -o pipefail && git config --global user.email" | ||
args: | ||
executable: /bin/bash | ||
register: gitconfig_email | ||
changed_when: false | ||
|
||
- name: Set authors email from git config | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
collection_author_email: "{{ gitconfig_email['stdout'] }}" | ||
when: prompt_email['user_input']|length == 0 | ||
when: (collection_author_email is not defined) or (collection_author_email|length == 0) | ||
run_once: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
- hosts: localhost | ||
- name: Test plays | ||
hosts: localhost | ||
remote_user: root | ||
roles: | ||
- create_collection |
Oops, something went wrong.