This commit is contained in:
parent
d908339cd0
commit
66bc8e2256
14
.ansible/ansible.cfg
Normal file
14
.ansible/ansible.cfg
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[defaults]
|
||||||
|
inventory = inventory
|
||||||
|
remote_tmp = $HOME/.ansible/tmp
|
||||||
|
remote_user = root
|
||||||
|
nocows = 1
|
||||||
|
roles_path = roles
|
||||||
|
retry_files_enabled = False
|
||||||
|
max_diff_size = 250000
|
||||||
|
|
||||||
|
[ssh_connection]
|
||||||
|
pipelining = True
|
||||||
|
scp_if_ssh = True
|
||||||
|
retries = 7
|
||||||
|
|
3
.ansible/inventory
Normal file
3
.ansible/inventory
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[testtgt]
|
||||||
|
dotya.ml
|
||||||
|
|
1
.ansible/playbooks/host_vars/dotya.ml.yml
Normal file
1
.ansible/playbooks/host_vars/dotya.ml.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
7
.ansible/playbooks/playbook.yml
Normal file
7
.ansible/playbooks/playbook.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
- hosts: testtgt
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
become_method: sudo
|
||||||
|
roles:
|
||||||
|
- { role: sayhi }
|
9
.ansible/roles/sayhi/README.md
Normal file
9
.ansible/roles/sayhi/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# sayhi
|
||||||
|
this role is used to say hi (create test files)
|
||||||
|
|
||||||
|
## License
|
||||||
|
GPLv3
|
||||||
|
|
||||||
|
## Author
|
||||||
|
wanderer@git.dotya.ml
|
||||||
|
|
1
.ansible/roles/sayhi/defaults/main.yml
Normal file
1
.ansible/roles/sayhi/defaults/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
9
.ansible/roles/sayhi/tasks/main.yml
Normal file
9
.ansible/roles/sayhi/tasks/main.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: verify files are not present
|
||||||
|
file:
|
||||||
|
path: "/tmp/{{item}}"
|
||||||
|
state: absent
|
||||||
|
mode: 0755
|
||||||
|
with_items:
|
||||||
|
- "{{additional_var}}"
|
||||||
|
- "{{another_var}}"
|
1
.ansible/roles/sayhi/vars/main.yml
Normal file
1
.ansible/roles/sayhi/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
22
.drone.yml
22
.drone.yml
@ -33,4 +33,24 @@ steps:
|
|||||||
- echo $PATH
|
- echo $PATH
|
||||||
- echo $SHELL
|
- echo $SHELL
|
||||||
- /usr/local/bin/giteaupdater
|
- /usr/local/bin/giteaupdater
|
||||||
- ansible --version
|
|
||||||
|
- name: ansible - sayhi
|
||||||
|
image: plugins/ansible:3.0.0
|
||||||
|
environment:
|
||||||
|
ANSIBLE_CONFIG: .ansible/ansible.cfg
|
||||||
|
DEFAULT_REMOTE_USER:
|
||||||
|
from_secret: username
|
||||||
|
settings:
|
||||||
|
playbook: .ansible/playbooks/playbook.yml
|
||||||
|
inventory: .ansible/inventory
|
||||||
|
extra_vars:
|
||||||
|
'additional_var=footestpls,another_var=bartest'
|
||||||
|
ssh_extra_args: "'-o StrictHostKeyChecking=no'"
|
||||||
|
private_key:
|
||||||
|
from_secret: ssh-key
|
||||||
|
verbose: 2
|
||||||
|
user:
|
||||||
|
from_secret: username
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
Loading…
Reference in New Issue
Block a user