Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 1c4c5a9

Browse files
authored
Merge pull request #3 from Diesel-Net/development
rotate secret
2 parents a19aa68 + 19efbcb commit 1c4c5a9

4 files changed

Lines changed: 30 additions & 15 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
domain: ldap.diesel.net
2+
admin_password: "{{ lookup('env', 'LDAP_ADMIN_PASSWORD') }}"

.ansible/inventory/stable/group_vars/tools/config.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.drone.yaml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,43 @@ clone:
77
depth: 1
88

99
steps:
10-
- name: deploy
10+
- name: configure & deploy (development)
1111
image: plugins/ansible:3
1212
environment:
1313
ANSIBLE_CONFIG: .ansible/ansible.cfg
1414
settings:
15+
inventory: .ansible/inventory/development/hosts
1516
playbook: .ansible/deploy.yaml
1617
galaxy: .ansible/roles/requirements.yaml
1718
private_key:
18-
from_secret: ansible_private_key
19+
from_secret: automation_id_rsa
1920
vault_password:
2021
from_secret: ansible_vault_password
21-
commands:
22-
# dynamically select inventory based on Git branch/tag
23-
- version=$DRONE_BRANCH
24-
- if [ ! -z $DRONE_TAG ]; then version=production; fi
25-
- /bin/drone-ansible --inventory .ansible/inventory/$$version/hosts
22+
when:
23+
branch:
24+
- development
25+
event:
26+
- push
27+
28+
- name: configure & deploy (production)
29+
image: plugins/ansible:3
30+
environment:
31+
ANSIBLE_CONFIG: .ansible/ansible.cfg
32+
LDAP_ADMIN_PASSWORD:
33+
from_secret: ldap_admin_password
34+
settings:
35+
playbook: .ansible/deploy.yaml
36+
inventory: .ansible/inventory/production/hosts
37+
galaxy: .ansible/roles/requirements.yaml
38+
private_key:
39+
from_secret: automation_id_rsa
40+
vault_password:
41+
from_secret: ansible_vault_password
42+
when:
43+
branch:
44+
- stable
45+
event:
46+
- push
2647

2748
trigger:
2849
branch:

0 commit comments

Comments
 (0)