Closed ghost closed 5 years ago
Hi @steven-cuthill-otm, I test the roles locally using "mvbcoding/awslinux" vagrant image and did not get the specific error. I am guessing the issue is something to do with the OS running in a container which have very restrictive permissions.
Question, what output do you get when you run this command?
df --local -P | awk {'if (NR!=1) print $6'} | xargs -I '{}' find '{}' -xdev -type d -perm -0002 2>/dev/null
sorted this, its because on the ECS Image the ecs agent is actually running is a container has locks on parts of the fs.
to get around this simple stop the docker daemon run the paybooks and then kick it up up when your done. here is a snippet from my packer builder.
{
"execute_command": "echo 'ec2-user' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"type": "shell",
"inline_shebang":"/bin/sh -x",
"inline": [
"docker ps",
"ps aux | grep docker-containerd",
"service docker stop"
]
},
{
"type": "ansible-local",
"playbook_file": "ansible/playbook.yml",
"playbook_dir": "ansible"
},
{
"execute_command": "echo 'ec2-user' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"type": "shell",
"inline": [
"rm -rf /tmp/*",
"rm -f /tmp/.ansible-lock.*",
"service docker start && sleep 10",
"start ecs",
"docker ps"
]
}
Hello,
when running the role with the AWS ecs optimized ami (eu-west-2 | amzn-ami-2018.03.h-amazon-ecs-optimized | ami-0cb31bf24b130a0f9) task 1.1.18 failed. with the following error. Has this been tested or dose anybody have any experance with this ?
i have pulled out the preflight checks as i know there is support issues with 2018 verstion of aws linux with Ansible.