myos
This commit is contained in:
@@ -66,6 +66,15 @@ aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
|
||||
aws_user: 'root'
|
||||
```
|
||||
|
||||
### Git variables
|
||||
|
||||
* `git_repositories` - Clone git repositories
|
||||
|
||||
``` yaml
|
||||
git_repositories:
|
||||
- { "repo": "https://github.com/aynicos/myos", "dest": "/dns/com/github/aynicos/myos", "key_file": "~/.ssh/id_rsa", "version": "master" }
|
||||
```
|
||||
|
||||
## Example playbook
|
||||
|
||||
``` yaml
|
||||
|
||||
@@ -19,6 +19,9 @@ aws_user: "{{ ansible_user|default('root') }}"
|
||||
# aws_secret_access_key to add in ~/.aws/credentials
|
||||
aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
|
||||
|
||||
# git repositories to clone
|
||||
git_repositories: []
|
||||
|
||||
# packages to install/remove
|
||||
remotes_packages: []
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
# file: tasks/files.yml
|
||||
|
||||
- name: files - get remote binary files
|
||||
with_items:
|
||||
- https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch
|
||||
get_url: url={{item}} dest=/usr/local/bin owner=root group=root mode=0755
|
||||
ignore_errors: true
|
||||
become: yes
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
# file: tasks/git.yml
|
||||
|
||||
- name: git - clone repositories
|
||||
with_items: "{{ git_repositories|default([]) }}"
|
||||
git:
|
||||
repo: "{{ item.repo }}"
|
||||
dest: "{{ item.dest|default('/src') }}"
|
||||
key_file: "{{ item.key_file|default('~/.ssh/id_rsa') }}"
|
||||
version: "{{ item.version|default('HEAD') }}"
|
||||
ignore_errors: true
|
||||
become: yes
|
||||
|
||||
@@ -4,9 +4,15 @@
|
||||
- import_tasks: vars.yml
|
||||
tags:
|
||||
- vars
|
||||
- import_tasks: files.yml
|
||||
tags:
|
||||
- files
|
||||
- import_tasks: packages.yml
|
||||
tags:
|
||||
- packages
|
||||
- import_tasks: git.yml
|
||||
tags:
|
||||
- git
|
||||
- import_tasks: pips.yml
|
||||
tags:
|
||||
- pips
|
||||
|
||||
Reference in New Issue
Block a user