Skip to content

Commit 47f9bcc

Browse files
author
Sohan Yadav
authored
Merge pull request #12 from clouddrove/CD-339
Fixed ansible-lint & updated version to 8.0
2 parents cffee5f + d7b7f97 commit 47f9bcc

31 files changed

+194
-552
lines changed

.ansible-lint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
3+
skip_list:
4+
- 'role-name'

.github/workflows/galaxy.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Release to Ansible Galaxy
3+
4+
'on':
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-18.04
12+
steps:
13+
- name: galaxy
14+
uses: robertdebock/galaxy-action@1.0.1
15+
with:
16+
galaxy_api_key: ${{ secrets.galaxy_api_key }}

.github/workflows/lint.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: Lint
3+
'on':
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
11+
yamllint:
12+
name: yamllint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out the codebase.
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Python 3.7.
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install yamllist
24+
run: pip3 install yamllint
25+
26+
- name: Run yamllint.
27+
run: yamllint .
28+
29+
ansible-lint:
30+
name: ansible-lint
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout the codebase.
34+
uses: actions/checkout@v2
35+
36+
- name: Set up Python 3.7.
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: '3.x'
40+
41+
- name: Install ansible and other packages
42+
run: pip3 install ansible ansible-lint
43+
44+
- name: Run ansible-lint.
45+
run: ansible-lint
46+
47+
pre-commit:
48+
name: 'Pre-Commit'
49+
needs:
50+
- yamllint
51+
- ansible-lint
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: 'Checkout'
55+
uses: actions/checkout@v2.3.4
56+
57+
- name: Install ansible-lint
58+
run: pip3 install ansible-lint
59+
60+
- name: 'Pre-Commit 🔎'
61+
uses: pre-commit/action@v2.0.3
62+
continue-on-error: true
63+
64+
- name: 'Slack Notification'
65+
uses: clouddrove/action-slack@v2
66+
with:
67+
status: ${{ job.status }}
68+
fields: repo,author
69+
author_name: 'CloudDrove Inc.'
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ANSIBLE }}
73+
if: always()

.github/workflows/molecule.yml

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

.github/workflows/readme.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: 'Create README.md file'
3+
'on':
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
readme-create:
10+
name: 'Autogenerate Readme file'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 'Checkout'
14+
uses: actions/checkout@master
15+
16+
- name: Set up Python 3.7.
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
21+
- name: 'Generate readme.md from readme.yaml'
22+
uses: 'clouddrove/github-actions@v8.0'
23+
with:
24+
actions_subcommand: 'readme'
25+
github_token: '${{ secrets.GITHUB }}'
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Install ansible-lint
30+
run: pip3 install ansible-lint
31+
32+
- name: pre-commit check errors
33+
uses: pre-commit/action@v2.0.0
34+
continue-on-error: true
35+
36+
- name: pre-commit fix errors
37+
uses: pre-commit/action@v2.0.0
38+
continue-on-error: true
39+
40+
- name: 'push readme'
41+
uses: 'clouddrove/github-actions@v8.0'
42+
continue-on-error: true
43+
with:
44+
actions_subcommand: 'push'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: 'Slack Notification'
49+
uses: clouddrove/action-slack@v2
50+
with:
51+
status: ${{ job.status }}
52+
fields: repo,author
53+
author_name: 'CloudDrove Inc.'
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_ANSIBLE }}
57+
if: always()

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.idea
33
*.iml
44
*.zip
5+
.cache

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
repos:
33

44
- repo: https://github.com/pre-commit/pre-commit-hooks.git
5-
rev: v3.3.0
5+
rev: v3.4.0
66
hooks:
77
- id: end-of-file-fixer
88
- id: trailing-whitespace
@@ -15,7 +15,7 @@ repos:
1515
- id: check-added-large-files
1616

1717
- repo: https://github.com/ansible/ansible-lint.git
18-
rev: v4.3.7
18+
rev: v5.0.8
1919
hooks:
2020
- id: ansible-lint
2121
files: \.(yaml|yml)$

.yamllint

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ extends: default
33

44
rules:
55
line-length:
6-
max: 120
6+
max: 140
77
level: warning
88
truthy:
99
allowed-values: ['true', 'false', 'yes', 'no']

README.md

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!-- This file was automatically generated by the `geine`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
22

3-
43
<p align="center"> <img src="https://user-images.githubusercontent.com/50652676/62451340-ba925480-b78b-11e9-99f0-13a8a9cc0afa.png" width="100" height="100"></p>
54

65
<h1 align="center">
@@ -20,15 +19,20 @@
2019
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="Licence">
2120
</a>
2221
<a href="https://ubuntu.com/">
23-
<img src="https://img.shields.io/badge/ubuntu-16.x-orange?style=flat&logo=ubuntu" alt="Distribution">
22+
<img src="https://img.shields.io/badge/ubuntu-18.x-orange?style=flat&logo=ubuntu" alt="Distribution">
2423
</a>
2524
<a href="https://ubuntu.com/">
26-
<img src="https://img.shields.io/badge/ubuntu-18.x-orange?style=flat&logo=ubuntu" alt="Distribution">
25+
<img src="https://img.shields.io/badge/ubuntu-20.x-orange?style=flat&logo=ubuntu" alt="Distribution">
2726
</a>
2827
<a href="https://www.centos.org/">
29-
<img src="https://img.shields.io/badge/centos-7.x-orange" alt="Distribution">
28+
<img src="https://img.shields.io/badge/centos-8.x-orange" alt="Distribution">
29+
</a>
30+
<a href="https://aws.amazon.com/amazon-linux-ami/">
31+
<img src="https://img.shields.io/badge/Amazone_linux-2-yellow?style=flat&logo=linux" alt="Distribution">
32+
</a>
33+
<a href="https://github.com/clouddrove/ansible-role-docker-php/actions/workflows/lint.yml">
34+
<img src="https://github.com/clouddrove/ansible-role-docker-php/actions/workflows/lint.yml/badge.svg" alt="Actions">
3035
</a>
31-
3236

3337
</p>
3438
<p align="center">
@@ -46,14 +50,10 @@
4650
</p>
4751
<hr>
4852

49-
50-
5153
We eat, drink, sleep and most importantly love **DevOps**. DevOps always promotes automation and standardisation. While setting up various environments like local, dev, testing, production, etc. it is critical to maintain the same environment across. This can easily be achieved using automating the environment setup & installation with the help of ansible-playbooks.
5254

5355
Smaller roles are created for each environment elements; which also include tasks & tests. These roles can then be grouped together in [ansible-playbook](https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html) to achieve the desired yet consistent results.
5456

55-
56-
5757
## Prerequisites
5858

5959
This module has a few dependencies:
@@ -62,59 +62,44 @@ This module has a few dependencies:
6262
- [Python](https://www.python.org/downloads)
6363
- [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu)
6464

65-
66-
67-
6865
## What Includes
6966

7067
Followiing things includes in this role:
71-
- Php-7.3
68+
69+
- Php-8.0
7270
- Php-fpm
7371
- Pecl
7472
- Composer
7573

76-
77-
78-
79-
80-
81-
8274
## Example Playbook
8375

8476
**IMPORTANT:** Since the `master` branch used in `source` varies based on new modifications, we suggest that you use the release versions [here](https://github.com/clouddrove/ansible-role-docker-php/releases).
8577

86-
8778
```yaml
8879
- hosts: localhost
8980
remote_user: root
9081
roles:
9182
- clouddrove.ansible_role_docker_php
9283
```
9384
94-
9585
## Variables
9686
9787
```yaml
98-
php_version: 7.3.3
99-
php_user: www-data
100-
php_group: www-data
101-
php_opt_dir: "/opt/php"
102-
php_config_dir: "{{ php_opt_dir }}/config"
88+
php_version: 8.0.7-fpm
89+
php_user: www-data
90+
php_group: www-data
91+
php_opt_dir: "/opt/php"
92+
php_config_dir: "{{ php_opt_dir }}/config"
10393
```
10494
105-
10695
## Installation
10796
10897
```console
10998
$ ansible-galaxy install clouddrove.ansible_role_docker_php
11099
```
111100

112-
113-
114-
115-
116-
117101
## Feedback
102+
118103
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/ansible-role-docker-php/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).
119104

120105
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/ansible-role-docker-php)!
@@ -127,9 +112,9 @@ At [CloudDrove][website], we offer expert guidance, implementation support and s
127112
<hr />
128113
<p align="center">We ❤️ <a href="https://github.com/clouddrove">Open Source</a> and you can check out <a href="https://github.com/clouddrove">our other modules</a> to get help with your new Cloud ideas.</p>
129114

130-
[website]: https://clouddrove.com
131-
[github]: https://github.com/clouddrove
132-
[linkedin]: https://cpco.io/linkedin
133-
[twitter]: https://twitter.com/clouddrove/
134-
[email]: https://clouddrove.com/contact-us.html
135-
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=
115+
[website]: https://clouddrove.com
116+
[github]: https://github.com/clouddrove
117+
[linkedin]: https://cpco.io/linkedin
118+
[twitter]: https://twitter.com/clouddrove/
119+
[email]: https://clouddrove.com/contact-us.html
120+
[terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language=

0 commit comments

Comments
 (0)