Create user accounts--------------------------> A list of users to be created can be found in the file called user_list.ymlsave to /home/admin/ansible/--> Using the password vault created elsewhere in this exam, create a playbook calledcreate_user.ymlthat creates user accounts as follows:--> Users with a job description of developer should be:--> created on managed nodes in the 'dev' and 'test' host groups assigned thepassword from the 'dev_pass'variable and these user should be member of supplementary group 'devops'.--> Users with a job description of manager should be:--> created on managed nodes in the 'prod' host group assigned the password fromthe 'mgr_pass' variableand these user should be member of supplementary group 'opsmgr'--> Passwords should use the 'SHA512' hash format. Your playbook should work usingthe vault password filecreated elsewhere in this exam.while practising you to create these file hear. But in exam have to download as perquestation.user_list.yml file consist:---user:- name: user1job: developer- name: user2job: manager
Create a playbook called issue.yml in /home/sandy/ansible which changes the file /etc/issue on all managed nodes: If host is a member of (lev then write 'Development' If host is a member of test then write 'Test' If host is a member of prod then write 'Production'
Create a playbook called hwreport.yml that produces an output file called /root/hwreport.txt on all managed nodes with the following information:--------------------------------------------------------------------------------------------------------> Inventory host name--> Total memory in MB--> BIOS version--> Size of disk device vda--> Size of disk device vdbEach line of the output file contains a single key-value pair.* Your playbook should:hwreport.empty andsave it as /root/hwreport.txt--> Modify with the correct values.note: If a hardware item does not exist, the associated value should be set to NONE----------------------------------------------------------------------------------------------while practising you to create these file hear. But in exam have to download as perquestation.hwreport.txt file consists.my_sys=hostnamemy_BIOS=biosversionmy_MEMORY=memorymy_vda=vdasizemy_vdb=vdbsize
Create a role called apache in '/home/admin/ansible/roles' with the followingrequirements:--> The httpd package is installed, enabled on boot, and started.--> The firewall is enabled and running with a rule to allow access to the web server.--> template file index.html.j2 is used to create the file /var/www/html/index.htmlwith the output:Welcome to HOSTNAME on IPADDRESS--> Where HOSTNAME is the fqdn of the managed node and IPADDRESS is the IP-Address ofthe managed node.note: you have to create index.html.j2 file.--> Create a playbook called httpd.yml that uses this role and the playbook runs onhosts in the webservers host group.
Rekey an existing Ansible vault as follows:-----------------------------------------------* Download Ansible vault from http:// classroom.example.com /secret.yml to /home/admin/ansible/* The current vault password is curabete* The new vault password is newvare* The vault remains in an encrypted state with the new password