Skip to content

Commit 502975d

Browse files
committed
Initial demo checkin
0 parents  commit 502975d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1431
-0
lines changed

ansible/ansible.cfg

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[defaults]
2+
roles_path=./roles_external:./roles_internal
3+
retry_files_enabled = True
4+
retry_files_save_path = ./.retries
5+
host_key_checking = False
6+
nocows = 1
7+
remote_user = root
8+
9+
# Workaround for an Ansible issue with temporary paths:
10+
# https://github.com/ansible/ansible/issues/21562
11+
remote_tmp = $HOME/.ansible/tmp
12+
local_tmp = $HOME/.ansible/tmp
13+
14+
# Some providers take a long time to actually begin accepting
15+
# connections even after the OpenSSH daemon has started.
16+
timeout = 100
17+
18+
[paramiko_connection]
19+
record_host_keys = False
20+
21+
[ssh_connection]
22+
ssh_args = "-o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null"
23+
pipelining = True
24+
control_path = /tmp/ansible-ssh-%%h-%%p-%%r
25+
stdout_callback = skippy
26+
callback_whitelist = timer, profile_tasks

ansible/inventory/a_terraform.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
set -o pipefail
4+
5+
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
TERRAFORM_INVENTORY=`which terraform-inventory`
7+
TF_STATE=${CURRENT_DIR}/../../terraform
8+
TERRAFORM_STATE=${CURRENT_DIR}/../../terraform/terraform.tfstate
9+
#${TERRAFORM_INVENTORY} $@ ${TERRAFORM_STATE}
10+
${TERRAFORM_INVENTORY} $@

ansible/inventory/b_static.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
3+
scaleway:
4+
vars:
5+
ansible_user: root
6+
ansible_ssh_private_key_file: "{{ lookup('env','SSH_KEY') }}"
7+
children:
8+
node:
9+
vars:
10+
ansible_ssh_common_args: '-o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes'
11+
router:
12+
vars:
13+
ansible_ssh_common_args: '-o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes'

ansible/playbooks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: deploy nginx
3+
hosts: webserver_pool
4+
remote_user: "root"
5+
become: true
6+
roles:
7+
- geerlingguy.nginx
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
---
3+
github: geerlingguy
4+
patreon: geerlingguy
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 90
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 30
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- pinned
16+
- security
17+
- planned
18+
19+
# Set to true to ignore issues in a project (defaults to false)
20+
exemptProjects: false
21+
22+
# Set to true to ignore issues in a milestone (defaults to false)
23+
exemptMilestones: false
24+
25+
# Set to true to ignore issues with an assignee (defaults to false)
26+
exemptAssignees: false
27+
28+
# Label to use when marking as stale
29+
staleLabel: stale
30+
31+
# Limit the number of actions per hour, from 1-30. Default is 30
32+
limitPerRun: 30
33+
34+
pulls:
35+
markComment: |-
36+
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!
37+
38+
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale.
39+
40+
unmarkComment: >-
41+
This pull request is no longer marked for closure.
42+
43+
closeComment: >-
44+
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.
45+
46+
issues:
47+
markComment: |-
48+
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
49+
50+
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
51+
52+
unmarkComment: >-
53+
This issue is no longer marked for closure.
54+
55+
closeComment: >-
56+
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.retry
2+
*/__pycache__
3+
*.pyc
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
language: python
3+
services: docker
4+
5+
env:
6+
global:
7+
- ROLE_NAME: nginx
8+
matrix:
9+
- MOLECULE_DISTRO: centos8
10+
- MOLECULE_DISTRO: ubuntu2004
11+
- MOLECULE_DISTRO: ubuntu1804
12+
- MOLECULE_DISTRO: debian10
13+
14+
install:
15+
# Install test dependencies.
16+
- pip install molecule yamllint ansible-lint docker
17+
18+
before_script:
19+
# Use actual Ansible Galaxy role name for the project directory.
20+
- cd ../
21+
- mv ansible-role-$ROLE_NAME geerlingguy.$ROLE_NAME
22+
- cd geerlingguy.$ROLE_NAME
23+
24+
script:
25+
# Run tests.
26+
- molecule test
27+
28+
notifications:
29+
webhooks: https://galaxy.ansible.com/api/v1/notifications/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: default
3+
rules:
4+
line-length:
5+
max: 120
6+
level: warning
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Jeff Geerling
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)