5
votes
Validating certificates with get_url or yum on CentOS 7 using Ansible
While it's true that the version of python reported there doesn't have SNI support, I thought that RedHat backported it. But anyways, if not, you can do that yourself:
yum -y install gcc python-devel ...
4
votes
Accepted
reboot server during Ansible tasks
Use this source code for reboot your client machine
---
- name: System Reboot
hosts: debian
become_method: sudo
become_user: root
become: true
tasks:
- name: reboot nodes ...
4
votes
What is the difference between a jail environment in linux and docker container?
While both Docker and jails have some similar functionality, they are built for different purposes.
The term "jail" comes from the FreeBSD distro. A lot of people will also refer to a chroot as a ...
3
votes
Porting a docker container to a different Linux host OS
Yes, as long as you have the Docker daemon running on the CentOS. Docker heavily utilizes a set of kernel features - namespaces and cgroups. That set comes native for all Linux derivatives.
In terms ...
3
votes
using copy module with wildcards
with_fileglog creates a loop with the fileglob lookup. As all other lookups it runs on the controller machine, not on the remote server.
Since I guess you don't already have those backup files on the ...
3
votes
reboot server during Ansible tasks
https://docs.ansible.com/ansible/latest/modules/reboot_module.html
- name: Unconditionally reboot the machine with all defaults
reboot:
- name: Reboot a slow machine that might have lots of ...
2
votes
Accepted
how to run an Ansible command for specific number of hosts
Use the --limit option to select a subset of hosts:
ansible-playbook -i /path test.yml --tags automation --limit host2
Its description from ansible-playbook documentation:
further limit selected ...
2
votes
How to manage services inside the container?
Using systemd in Docker is not really that straightforward.
However, according to the doc on the docker hub, systemd is now included in both the centos:7 and centos:latest base containers.
However, ...
2
votes
using copy module with wildcards
any with_* is actully a local lookup.
So as Zeitounator mentioned, you're going to need to use something like the find module to fetch the files you want.
so I imagine that something like this would ...
2
votes
How to use edited inventory file?
You have this in your config file:
[inventory]
enable_plugins = host_list, script, auto, yaml, ini, toml
Do you really need all these plugins? If not, they'll just add time to your processing. ...
2
votes
Accepted
how to prevent Ansible from showing output on screen?
This can be done by judicious use of one of the Ansible callback plugins. Set the relevant configuration in your ansible.cfg file.
You have a few options...
In order to print nothing to the screen, ...
2
votes
network ansible command error: "msg": "network os centos is not supported"
This error is due to invalid value of ansible_network_os:
The playbook you try setup is meant for network devices.
And since centos is not a network device OS the playbook will fail.
Here you can find ...
2
votes
Accepted
vagrant on windows 10 incorrect network configuration on multi-machine setup
eth0 is used by vagrant for nat configuration in order to establish portforwarding. eth1 private networks that you have configured should allow you to ping/nslookup from one node to another. You can ...
1
vote
Accepted
Failed to install kubernetes on centos
When I navigate to the URL, there do not appear to be any packages in the repo. Consider trying a mirror like: mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
1
vote
Accepted
Is it possible to install bitbucket container on Centos?
Since I do not currently have access to a server with Centos installed, I tested my soultion on Ubuntu 20.04. That being said, the whole point of using Docker is to make applications distribution-...
1
vote
Accepted
How to use edited inventory file?
It sounds like you need to gather facts again once you've updated the inventory. You start off with
First I add new host to my hosts.ini file
However, Ansible is not notified about this until you ...
1
vote
Accepted
How deploy public key to newly created VM on GCP?
As per the link, You can add keys via metadata. You can try the following.
metadata:
ssh-keys: "[USERNAME]:ssh-rsa [NEW_KEY_VALUE] [USERNAME]"
Replace [USERNAME] & [NEW_KEY_VALUE] with ...
1
vote
copy contents of file on ansible server to another file on remote servers
You can use Ansible’s template module transfers templated files to remote hosts.
It works similarly to the copy module, but with major difference:
You can use the jinja2 templating language in your ...
1
vote
Accepted
copy contents of file on ansible server to another file on remote servers
Copy module should work
- hosts: all
tasks:
- copy:
src: /data/new_config
dest: /opt/zservice/etc/config
owner: root
group: wheel
mode: '0750'
...
1
vote
"Error: forwarding ports: Upgrade request required" Error in helm of a kubernetes cluster
See my answer here:
Ran into this today when trying to use Garden.io for a cluster running in Jelastic.
Found the solution in this Github comment:
First acquire a local binary for Tiller (server-...
1
vote
Accepted
why can't map local path to docker's inside?
Oh! I have search for a while, it's should be like:
docker run -d --name=ak_registry --restart=always -p 7900:5000 -v /data/.docker:/var/lib/registry registry
Used /var/lib/registry instead of ...
1
vote
Accepted
Ansible does not create directories CentOS7
You have two mistakes:
name as parameter of file module. It is an alias of path, so you actually try to create directory add dir.
Unnecessary single quotes in path, giving you actual paths like etc/...
1
vote
Validating certificates with get_url or yum on CentOS 7 using Ansible
I suggest that you do not reinvent the wheel and use a ansible galaxy role that has already solved the issues you are reporting.
One could use Geerlingguys git role to install the latest git on ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
centos × 22ansible × 12
linux × 9
docker × 6
containers × 3
kubernetes × 2
dockerfile × 2
yaml × 2
docker-compose × 1
git × 1
automation × 1
windows × 1
helm × 1
bitbucket × 1
vagrant × 1
openshift × 1
kubectl × 1
ssl × 1
gcp × 1
rancher × 1
ubuntu × 1
ansible-inventory × 1
dockerhub × 1
ssh × 1
upgrade × 1