-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3f89b2
commit fc858d2
Showing
9 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
exclude_paths: | ||
- .github/ | ||
skip_list: | ||
- risky-file-permissions | ||
- risky-file-permissions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.direnv/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
--- | ||
- name: Base server AMI | ||
|
||
# Create a server base AMI | ||
|
||
- name: Server base AMI | ||
hosts: 127.0.0.1 | ||
connection: local | ||
become: true | ||
roles: | ||
- common | ||
- unattended_upgrades | ||
- useraccounts | ||
- aws_ssm | ||
- aws_codedeploy | ||
- security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
|
||
# Install current AWS Codedeploy agent | ||
|
||
- name: Install Codedeploy agent dependencys | ||
ansible.builtin.apt: | ||
name: | ||
- ruby | ||
- gdebi-core | ||
|
||
- name: Copy install package | ||
ansible.builtin.get_url: | ||
url: https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install | ||
dest: /tmp/codedeploy-installer | ||
owner: root | ||
group: root | ||
mode: '0755' | ||
|
||
- name: Install Codedeploy agent | ||
ansible.builtin.command: /tmp/codedeploy-installer auto | ||
changed_when: true | ||
|
||
- name: Keep less Codedeploy revisions | ||
ansible.builtin.lineinfile: | ||
path: /etc/codedeploy-agent/conf/codedeployagent.yml | ||
regexp: '^:max_revisions' | ||
line: ':max_revisions: 1' | ||
|
||
- name: Enable Codedeploy agent service | ||
ansible.builtin.systemd: | ||
name: codedeploy-agent | ||
enabled: true | ||
masked: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
|
||
# Install AWS SSM agent | ||
|
||
- name: SSM agent install package for arm64 architecture | ||
ansible.builtin.apt: | ||
deb: https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_arm64/amazon-ssm-agent.deb | ||
when: | ||
- ansible_facts['architecture'] == "aarch64" | ||
|
||
- name: SSM agent install package for x86_64 architecture | ||
ansible.builtin.apt: | ||
deb: https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb | ||
when: | ||
- ansible_facts['architecture'] == "x86_64" | ||
|
||
- name: Enable SSM agent service | ||
ansible.builtin.systemd: | ||
name: amazon-ssm-agent | ||
enabled: true | ||
masked: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
# Disable standard ubuntu user | ||
|
||
- name: Disable Ubuntu default user | ||
ansible.builtin.user: | ||
name: ubuntu | ||
password: "!" | ||
expires: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters