Ansible json task
- or -
Post a project like this1242
£50(approx. $63)
- Posted:
- Proposals: 2
- Remote
- #3069951
- Awarded
Description
Experience Level: Entry
Brief:
From the ansible command below:
ansible-playbook -i hostfile playbook.yml --extra-vars '{"type":"fruits", "options":[{"APPLE":"apple","Orange":"Orange", "PINE APPLE": "pine apple"}], "enabled":true}' -vvv
I would like to get the following written in file /etc/nginx/fruits.conf file
map $fruits $cache_bucket {
default yes;
APPLE apple;
ORANGE orange;
"PINE APPLE" pineapple;
}
I have started a playbook and it is as follows, I would be grateful if you can complete it with the requirements above.
- name: "JSON Fruits Handling"
lineinfile:
dest: /etc/nginx/fruits.conf
state: present
line: "map $fruits $cache_bucket {\n default yes;\n}"
insertbefore: `include xmlrpc.conf;`
From the ansible command below:
ansible-playbook -i hostfile playbook.yml --extra-vars '{"type":"fruits", "options":[{"APPLE":"apple","Orange":"Orange", "PINE APPLE": "pine apple"}], "enabled":true}' -vvv
I would like to get the following written in file /etc/nginx/fruits.conf file
map $fruits $cache_bucket {
default yes;
APPLE apple;
ORANGE orange;
"PINE APPLE" pineapple;
}
I have started a playbook and it is as follows, I would be grateful if you can complete it with the requirements above.
- name: "JSON Fruits Handling"
lineinfile:
dest: /etc/nginx/fruits.conf
state: present
line: "map $fruits $cache_bucket {\n default yes;\n}"
insertbefore: `include xmlrpc.conf;`
Prashant R.
100% (2)Projects Completed
3
Freelancers worked with
3
Projects awarded
42%
Last project
3 Dec 2020
Mauritius
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies