Ansible script - small
Budget: ₹600 – ₹1,500 INR
write a small Ansible role and test that it functions as required.
The requirements from role:
The role should create <n> empty files in a target directory <path> on the target machines in the inventory.
The names of the files should be <file_name> and it should be prefixed with initial timestamp <ts> and index <i>. The file name in the end should look like <file_name>-<ts>-<i>.
The intial time stamp <ts> should the same for all and should indicate the role run time stamp and not the file creation timestamp
The role should also contain a template file report.txt that will be copied over to the the same target directory <path>. It should contain four lines:
ts: <ts>
path: <path>
file name: <file_name>
files count: <n>
<n>, <file_name>, <path> should be configured by the user.
A unit test for the working role should also be implemented. The test should be affective - testing the requirements and should be easily migratebale to a ci/cd pipeline.
Any necessary developement stack tools/frameworks necessary for the development of the role should be installed and configured by the candidate prior to or while developing the role.
The requirements from role:
The role should create <n> empty files in a target directory <path> on the target machines in the inventory.
The names of the files should be <file_name> and it should be prefixed with initial timestamp <ts> and index <i>. The file name in the end should look like <file_name>-<ts>-<i>.
The intial time stamp <ts> should the same for all and should indicate the role run time stamp and not the file creation timestamp
The role should also contain a template file report.txt that will be copied over to the the same target directory <path>. It should contain four lines:
ts: <ts>
path: <path>
file name: <file_name>
files count: <n>
<n>, <file_name>, <path> should be configured by the user.
A unit test for the working role should also be implemented. The test should be affective - testing the requirements and should be easily migratebale to a ci/cd pipeline.
Any necessary developement stack tools/frameworks necessary for the development of the role should be installed and configured by the candidate prior to or while developing the role.