how do I break this play up into roles/tasks/variables etc…
you are showing a playbook with a single task and no variables, there
is not much to break up here
my variables are
ansibletestbucket12345
arn:aws:kms:us-west-1:462518063038:key/f164e76a-f6f8-4773-84dc-053a44b2678d
prod
s3 bucket
util
32
atomdomain
Did you read the reply?
What do you want to achieve?
What is the intention?
Why do you say "break this play up into roles/tasks/variables etc."?
i want to reuse the role. i only want to modify the variables for future use
ok so here is what i have
s3_bucket.yml
Splitting a single task into a role does not make much sense to me.
But if you want to go ahead with it, just pass any variables you are currently using in your task, to the role.
Something like this:
- include_role:
name: role-s3bucket-creator
apply:
delegate_to: localhost
vars:
role_var_name1: “{{ foo }}”
role_var_name2: “{{ bar }}”
Going forward I suggest you ellaborate a little bit more on your questions, so people can actually understand what are you trying to achieve.
Regards,
Remove the leading - character on the - hosts line.
it is still not working.
yaml checker says ok
it is still not working.
With a little effort a sensible mind would discover that hosts: doesn't belong into task files.
Just my two cents.
Racke
ok
corrected it
any idea? why is sudo password needed?
any idea? why is sudo password needed?
Because you asked for that (become: yes)
Regards
Racke
i dont have that in my pb.
ok thanks a lot. finally got it working.
quick question. is there a way to quickly rollback ?
quick answer: no