And your question is?
On Wed, 15 Feb 2023 at 21:07, Cesar Ramirez
wrote:
> Hello Guys, new tot this Group, trying to provision an EC2 Windows using
> Ansible with user_data.
>
> On Friday, October 7, 2016 at 5:21:06 PM UTC-7 einarc wrote:
>
>> Hey,
>>
>> You want to put your data in a varia
Hello Guys, new tot this Group, trying to provision an EC2 Windows using
Ansible with user_data.
On Friday, October 7, 2016 at 5:21:06 PM UTC-7 einarc wrote:
> Hey,
>
> You want to put your data in a variable, let's say in /defaults/main.yml
> and then invoke that from the ec2_lc module:
>
>
Hey,
You want to put your data in a variable, let's say in /defaults/main.yml
and then invoke that from the ec2_lc module:
- ec2_lc:
name: "{{env}}-render-premium-{{gitsha}}"
...
user_data: "{ {my_user_data }}"
I did that exact thing for Launch Configs and it works pref
On Friday, 26 December 2014 05:05:33 UTC-5, Catalin Costache wrote:
>
> Yaml has a notation for multiline string. I set user data like so:
>
> user_data: |
> #!/bin/bash
> echo "Defaults:{{admin_user}} !requiretty" > /etc/sudoers.d/
> disable_requiretty
>
I'm having trouble using th
Yaml has a notation for multiline string. I set user data like so:
user_data: |
#!/bin/bash
echo "Defaults:{{admin_user}} !requiretty" > /etc/sudoers.d/
disable_requiretty
Note the pipeline character.
# Join multiple lines without new line
value: >
part 1
part 2
Chris, please ignore my previous response, which was premature. I had
misinterpreted the (perhaps slightly ambiguous) documentation for the slurp
module, and thought that it needed to be given a base64-encoded file.
Apparently, it does not. If I give it a raw .tar.xz, your ec2.py revision
seems
Chris, thank you *very* much for looking at that. I have tried your
modified ec2.py but, unfortunately, even using it exactly as you describe,
the user data is still being stored on AWS in its base64 form. From within
the instance:
# fetch http://169.254.169.254/latest/user-data
# cat user-dat
One issue may be that boto is encoding unicode user data into utf-8, then
base64-encoding it:
https://github.com/boto/boto/blob/develop/boto/ec2/connection.py#L927
So, if we can somehow pass a str() instance to boto instead of a unicode()
instance, it'll skip the utf-8 encoding step.
I've imple
Incidentally, I also tried using the file lookup plugin on a base64-encoded
tar file, and then filtering that with Jinja2’s b64decode filter. That also
fails, though I think it does so at a later stage than trying to use the
file lookup plugin on a binary file. Using the b64decode filter on a
l
On Saturday, 25 October 2014 20:33:32 UTC+1, Chris Church wrote:
>
> The file lookup plugin is your friend.
>
It is – if one wishes to supply text-based user data. Unfortunately, I have
a requirement to provide a binary blob of user data, and the file lookup
plugin does not seem to handle that –
I'm planning to get some of these roles onto Galaxy, but until then...
The next tasks in that particular play are:
- name: wait for instances to listen on port 5986 (winrm https)
wait_for:
state=started
host={{ item.tagged_instances[0].public_ip }}
port=5986
with_items: win_ec2.re
Hi Chris,
What's your approach for logging in to your Win boxes using WinRM after
this step?
Ansible docs direct you to configure a vars file with ansible_ssh_pass set
however every ec2 instance is going to have a different password. I've
created a module for using boto to get the ec2 passwor
The file lookup plugin is your friend.
I'm using the following task for launching Windows instances and
configuring PowerShell remoting:
- ec2:
aws_access_key: '{{ aws_access_key }}'
aws_secret_key: '{{ aws_secret_key }}'
region: '{{ win_ec2_region }}'
instance_type: '{{ win_ec2_i
I don't believe YAML takes Python-like docstrings.
So you would need to start with a single or double quote and escape any
internal quotes as need be.
The "file" lookup plugin may also be helpful.
On Fri, Oct 24, 2014 at 12:06 PM, Erick Barros
wrote:
> I got the following error:
>
> ERROR: Syn
I got the following error:
ERROR: Syntax Error while loading YAML script, /etc/ansible/playbooks/search
/roles/aws/tasks/main.yml
Note: The error may actually appear before this position: line 13, column 17
state: running
user_data: """#!/bin/bash
^
This one looks easy to f
(a) can you please show the line from your playbook where you are using
the user data variable?
(b) with the above, how are you determining the way it fails? I.e. what
does failure look like?
On Fri, Aug 15, 2014 at 5:36 PM, Jonathan Nakatsui
wrote:
> From the ansible docs the ec2 module (
>From the ansible docs the ec2 module
(http://docs.ansible.com/ec2_module.html) mentions a user_data field.
However, there is no example showing the use of user_data.
I've tried a variety of things to pass through to the user field to no
avail including
user_data: file.txt
user_data: "{{ look
17 matches
Mail list logo