Skip to content

Commit 083233f

Browse files
committed
Add 'mode' property to filesystem modifications tasks
1 parent 7faad9d commit 083233f

File tree

8 files changed

+27
-11
lines changed

8 files changed

+27
-11
lines changed

tasks/automation-tools.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
file:
5959
dest: "{{ item }}"
6060
state: "directory"
61+
mode: '0755'
6162
with_items:
6263
- "/etc/archivematica/automation-tools"
6364

@@ -66,6 +67,7 @@
6667
src: "{{ item }}.j2"
6768
dest: "/{{ item }}"
6869
backup: "yes"
70+
mode: '644'
6971
with_items:
7072
- "etc/archivematica/automation-tools/transfers.conf"
7173
- "etc/archivematica/automation-tools/transfer-script.sh"

tasks/configure.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
src: "{{ item }}"
66
dest: "/etc/rsyslog.d/archivematica.conf"
77
backup: "yes"
8+
mode: '644'
89
with_first_found:
910
- files:
1011
- "templates/{{ inventory_hostname }}/rsyslog.conf.j2"
@@ -44,30 +45,30 @@
4445
become: yes
4546
remote_user: "{{ archivematica_src_configure_ss_ssh_user | default('artefactual') }}"
4647
register: archivematica_src_configure_ss_api_key_temp
47-
when:
48+
when:
4849
- "archivematica_src_configure_dashboard|bool or archivematica_src_configure_ss|bool"
4950
- "archivematica_src_configure_ss_api_key is undefined"
5051
- ss_user.stdout != ""
5152

5253
- set_fact: archivematica_src_configure_ss_api_key="{{ archivematica_src_configure_ss_api_key_temp.stdout }}"
53-
when:
54+
when:
5455
- "archivematica_src_configure_dashboard|bool"
5556
- "archivematica_src_configure_ss_api_key_temp.stdout is defined"
5657

5758
# Create api-key if not defined and SS user was not already configured
5859
- set_fact: archivematica_src_configure_ss_api_key={{ 999999999999999999999 | random | to_uuid | hash('md5') }}
59-
when:
60+
when:
6061
- "archivematica_src_configure_ss_api_key is undefined"
6162
- "archivematica_src_configure_ss|bool"
6263

6364
- name: "Create SS superuser"
6465
django_manage:
65-
command: >
66-
create_user
66+
command: >
67+
create_user
6768
--username="{{ archivematica_src_configure_ss_user }}"
68-
--password="{{ archivematica_src_configure_ss_password }}"
69+
--password="{{ archivematica_src_configure_ss_password }}"
6970
--email="{{ archivematica_src_configure_ss_email }}"
70-
--api-key="{{ archivematica_src_configure_ss_api_key }}"
71+
--api-key="{{ archivematica_src_configure_ss_api_key }}"
7172
--superuser
7273
app_path: "{{ archivematica_src_ss_app }}"
7374
virtualenv: "{{ archivematica_src_ss_virtualenv }}"
@@ -116,7 +117,7 @@
116117
- name: "Create Dashboard user and register pipeline on SS"
117118
django_manage:
118119
command: >
119-
install
120+
install
120121
--username="{{ archivematica_src_configure_am_user }}"
121122
--password="{{ archivematica_src_configure_am_password }}"
122123
--email="{{ archivematica_src_configure_am_email }}"
@@ -187,7 +188,7 @@
187188
- archivematica_src_configure_dashboard|bool
188189
- archivematica_src_configure_dashboardsettings is defined
189190

190-
# The rsync user is defined in the rsync_target, as user@host:/path
191+
# The rsync user is defined in the rsync_target, as user@host:/path
191192
- name: "Get rsync user for dip upload"
192193
set_fact:
193194
atom_dipupload_ssh_user: "{{ archivematica_src_configure_dashboardsettings['rsync_target'].split('@')[0] }}"

tasks/pipeline-clonecode.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@
3131
force: "yes"
3232
accept_hostkey: "yes"
3333
recursive: "no"
34+
umask: '0022'
3435
become_flags: "-ES"

tasks/pipeline-environment.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
src: "{{ item.src }}"
3939
dest: "{{ item.dest }}"
4040
backup: "yes"
41+
mode: '644'
4142
with_items:
4243
- src: "etc/sysconfig/archivematica-mcp-server.j2"
4344
dest: "{{ systemd_environment_path }}/archivematica-mcp-server"
@@ -49,6 +50,7 @@
4950
src: "{{ item.src }}"
5051
dest: "{{ item.dest }}"
5152
backup: "yes"
53+
mode: '644'
5254
with_items:
5355
- src: "etc/sysconfig/archivematica-mcp-client.j2"
5456
dest: "{{ systemd_environment_path }}/archivematica-mcp-client"
@@ -100,6 +102,7 @@
100102
src: "{{ item }}"
101103
dest: /etc/archivematica/{{ item | basename | regex_replace('\.j2','') }}
102104
backup: "yes"
105+
mode: '644'
103106
with_first_found:
104107
- "templates/{{ inventory_hostname }}/dashboard.logging.json.j2"
105108
- "templates/dashboard.logging.json.j2"
@@ -111,6 +114,7 @@
111114
src: "{{ item }}"
112115
dest: /etc/archivematica/{{ item | basename | regex_replace('\.j2','') }}
113116
backup: "yes"
117+
mode: '644'
114118
with_first_found:
115119
- "templates/{{ inventory_hostname }}/serverConfig.logging.json.j2"
116120
- "templates/serverConfig.logging.json.j2"
@@ -122,6 +126,7 @@
122126
src: "{{ item }}"
123127
dest: /etc/archivematica/{{ item | basename | regex_replace('\.j2','') }}
124128
backup: "yes"
129+
mode: '644'
125130
with_first_found:
126131
- "templates/{{ inventory_hostname }}/clientConfig.logging.json.j2"
127132
- "templates/clientConfig.logging.json.j2"
@@ -149,6 +154,7 @@
149154
src: "{{ item.src }}"
150155
dest: "{{ item.dest }}"
151156
backup: "yes"
157+
mode: '644'
152158
when:
153159
- "ansible_service_mgr == 'systemd'"
154160
with_items:
@@ -171,6 +177,7 @@
171177
with_items:
172178
- "archivematica-mcp-server"
173179
- "archivematica-dashboard"
180+
- "fits-nailgun"
174181
when:
175182
- ansible_service_mgr == "systemd"
176183

@@ -196,4 +203,3 @@
196203
- ansible_service_mgr == "systemd"
197204
- archivematica_src_am_mcpclient_instances > 1
198205
tags: amsrc-mcp-client
199-

tasks/pipeline-instcode.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
backup: "yes"
3636
force: "yes"
3737
remote_src: "yes"
38+
mode: '0644'
3839

3940
#
4041
# front-end

tasks/pipeline-osconf.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
file:
99
dest: "{{ item }}"
1010
state: "directory"
11+
mode: '0755'
1112
with_items:
1213
- "/usr/lib/archivematica"
1314
- "/usr/share/archivematica/archivematicaCommon"

tasks/ss-main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
virtualenv: "{{ archivematica_src_ss_virtualenv }}"
9696
virtualenv_command: "{{ archivematica_src_virtualenv }}"
9797
virtualenv_python: "{{ archivematica_src_virtualenv_python }}"
98-
name:
98+
name:
9999
- "pip=={{ archivematica_src_pip_version }}"
100100
- "pip-tools=={{ archivematica_src_pip_tools_version }}"
101101
tags: "amsrc-ss-pydep"
@@ -119,6 +119,7 @@
119119
file:
120120
dest: "{{ item }}"
121121
state: "directory"
122+
mode: '0755'
122123
with_items:
123124
- "/usr/lib/archivematica"
124125
tags: "amsrc-ss-osconf"
@@ -137,6 +138,7 @@
137138
file:
138139
dest: "{{ item }}"
139140
state: "directory"
141+
mode: '0755'
140142
with_items:
141143
- "/etc/archivematica"
142144
tags: "amsrc-ss-osconf"
@@ -200,6 +202,7 @@
200202
backup: "yes"
201203
force: "yes"
202204
remote_src: "yes"
205+
mode: '0644'
203206
tags: "amsrc-ss-websrv"
204207

205208

tasks/ss-osconf.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
src: "{{ item }}"
2727
dest: "/etc/archivematica/storageService.logging.json"
2828
backup: "yes"
29+
mode: '644'
2930
with_first_found:
3031
- files:
3132
- "templates/{{ inventory_hostname }}/storageService.logging.json.j2"

0 commit comments

Comments
 (0)