File tree Expand file tree Collapse file tree 2 files changed +21
-14
lines changed
deploy/linux/go/redhat/roles/configure/tasks
manual/definitions/apm/go Expand file tree Collapse file tree 2 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 2
2
- debug :
3
3
msg : Install go
4
4
5
- - name : install go
5
+ - name : Install go
6
6
shell : yum install go -y
7
7
become : true
8
8
9
9
- name : Create templates directory
10
10
file :
11
- path : ~ /templates
11
+ path : /home/ec2-user /templates
12
12
state : directory
13
13
14
14
- name : Copy files to templates directory
15
15
synchronize :
16
16
src : " {{ item }}"
17
- dest : ~/templates/
17
+ dest : /home/ec2-user/templates
18
18
mode : push
19
19
with_fileglob :
20
20
- " ../../../../templates/*"
21
21
become : true
22
22
23
- - name : Run go mod init
24
- shell : cd /home/ec2-user/templates && go mod init home/ec2-user/templates
23
+ - name : Initialize and tidy Go modules
24
+ shell : |
25
+ cd /home/ec2-user/templates &&
26
+ export GOPATH=/home/ec2-user/go &&
27
+ export GOBIN=/home/ec2-user/go/bin &&
28
+ go mod init home/ec2-user/templates &&
29
+ go mod tidy
25
30
become : true
26
-
27
- - name : Run go mod tidy
28
- shell : cd /home/ec2-user/templates && go mod tidy
29
- become : true
30
-
31
- - name : Change Permissions for /home/ec2-user/templates
32
- shell : chown -R ec2-user:ec2-user /home/ec2-user/templates/ && chmod -R 755 /home/ec2-user/templates
31
+ environment :
32
+ PATH : " {{ ansible_env.PATH }}"
33
+
34
+ - name : Change Permissions for /home/ec2-user/templates && go
35
+ shell : |
36
+ chown -R ec2-user:ec2-user /home/ec2-user/templates/ &&
37
+ chmod -R 755 /home/ec2-user/templates &&
38
+ chown -R ec2-user:ec2-user /home/ec2-user/go/ &&
39
+ chmod -R 755 /home/ec2-user/go
33
40
become : true
34
41
35
42
# Use the below command to run it locally
Original file line number Diff line number Diff line change 19
19
{
20
20
"id" : " go" ,
21
21
"source_repository" : " https://github.com/newrelic/open-install-library.git" ,
22
- "deploy_script_path" : " test/deploy/linux/go/redhat/roles" ,
22
+ "deploy_script_path" : " test/deploy/linux/go/redhat/roles" ,
23
23
"port" : 80 ,
24
24
"destinations" : [" go-l2" ]
25
25
}
26
26
]
27
- }
27
+ }
You can’t perform that action at this time.
0 commit comments