Questions tagged [ansible]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

IP not getting assigned to VM created using ansible script

I have created a VM using ansible script. IP is not getting assigned to VM even if we give static IP. And in vsphere client it is showing blank for IP Address. --- - hosts: 127.0.0.1 connection: ...
1 vote
1 answer
119 views

How would I autoinstall 22.04 from USB?

What the best way using Subquitity/Seed/Cloudinit to auto install an Ubuntu Desktop 22.04 image? Our staff use Ubuntu and rather than keeping one fat image lying about which is time consuming to ...
  • 123
0 votes
0 answers
107 views

how to force user to change password after first login

I am trying to setup a rule that every newly created user must change his password after first login. I know it can be done manually , i.e to force users to change password at next login. chage -d 0 ...
0 votes
0 answers
25 views

Ansible - How to optimize sending a file to a sub-network?

I have a playbook that looks: - name: Playbook para Copiar JRE hosts: all tasks: - name: Copia Arquivo JRE copy: src: jre.tar.gz dest: /home/pdv/sistema-loja/jre-new.tar....
0 votes
1 answer
79 views

Install ansible 2.5 in Ubuntu server 22.04

I'd like to install Ansible 2.5 in Ubuntu 22.04, because our deployment playbook incompatible with Ansible newer version. I tried installing from apt, but ppa doesn't provide 2.5 for 22.04. Installing ...
0 votes
0 answers
36 views

Squid-proxy: Automate a whitelist domains using ansible

How to set a whitelist to allow only domains in this list through ansible? PS. there is already a list of allowed domains but every time I want to add a new domain, I have to SSH on the machine and ...
0 votes
1 answer
3k views

Anisble error: "Failed to update apt cache:..." [duplicate]

I'm working on an Ansible project in the cloud and got this error. In my config-server.yml file, this is the part where the job fails, as reported by CircleCi: pre_tasks: - name: "wait 600 ...
  • 1
0 votes
0 answers
72 views

ssh via Ansible playbook and vagrant

I am using vagrant to run ubuntu VM on my Mac. I am trying to provision vagrant with the playbook I wrote but when I do im getting an error about the host. this is my Vagrant file: Vagrant.configure(&...
1 vote
0 answers
375 views

Make python3.10 as default python. Python3 is causing problems while running ansible scripts

I want to set python3.10 as default python. I want to do this because I am getting error while running ansible scripts even if the yaml files are having valid syntax. while scanning a simple key",...
  • 11
2 votes
2 answers
5k views

How to redirect output to a text file in bash and have it show in the terminal at the same time? [duplicate]

If I use the text re-directors > and >> they output to a text file which is fine for long term logging but, I also need them to be present on screen in the traditional Standard Input, ...
  • 31
0 votes
1 answer
53 views

need to run a .sh script in bin file in another host through cmd

I have tried this but not working. Command that I have tried: sudo -u ec2-user ssh -i {{ sso_key_path }}@{{ sso_ip_address }} "sh sso_file.sh"
0 votes
1 answer
337 views

How to run ansible playbook on boot on ubuntu?

I have installed Ansible on Ubuntu VM and it controls two more Ubuntu VMs. I want to run an ansible playbook when the ansible VM boots. I followed this, but it's not working for ansible playbooks. ...
0 votes
0 answers
24 views

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 93C4A3FD7BB9C367 [duplicate]

When I use apt install ansible it's not installing the latest version, When I run apt update I get the following error: Err:7 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty InRelease The ...
0 votes
0 answers
177 views

Playbook cannot work and other tests are normal

Ansible is installed at Ubuntu. I want to see output of cisco command "show ip interface brief" but it cannot work with some error message as below. All hosts and playbook info are listed in ...
1 vote
1 answer
207 views

Samba Share Configured by Ansible Not Accessible

I am attempting to administer to Samba Shares' on a Ubuntu 20.04 running Samba 4.13.17-Ubuntu. I have an Ansible playbook that writes my Samba config to smb.conf and I am adding writable & ...
0 votes
0 answers
572 views

SSH method error

I'm Hi When attempting to ssh an iLO HPE by Ansible, I receive the following error: [ip] | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host ...
0 votes
0 answers
88 views

apt install with Ubuntu local mirror - Numerous apache 206 error codes and installation fails

I've configured a ubuntu mirror server using apt-mirror/apache2 on Ubuntu 20.04. I'm auto installing some machines to deploy a minimal set of the OS, then rely on Ansible to deploy some specific ...
0 votes
0 answers
77 views

I am unable to ssh into AD domain after running devsec.hardening.ssh_hardening role

I first ran the command ansible-galaxy collection install devsec.hardening And then I ran this playbook - hosts: linux become: yes vars: - sftp_enabled: true # Enabled for Ansible. See the ...
1 vote
1 answer
124 views

apt update issues via docker container ansible playbook

I have been trying to run an ansible playbook via a docker container, However I'm having issues with sudo apt update currently running ubuntu 18.04: I’ve also tried to SSH into each VM (which isn't ...
0 votes
1 answer
37 views

Why it show python missing?

Python used to work with ansible. After reinstalling ansible, it looks like python is missing. Do you think so? Thank you enter image description here enter image description here
2 votes
0 answers
36 views

What's the difference between dist-upgrade and upgrading /usr/lib/update-notifier/apt-check --package-names? [duplicate]

What is the difference between upgrading packages using the dist-upgrade and upgrading the packages from /usr/lib/update-notifier/apt-check --package-names ? The reason I'm asking is, the machine I'm ...
  • 131
0 votes
1 answer
195 views

Ansible playbook on ubuntu 20

How to write Ansible Playbook to install different applications on different hosts on Ubuntu 20.04 Conditions When running a playbook it should ask for the host name (we must give the specific host ...
0 votes
1 answer
356 views

rsyslog.service not found by Ansible during preseed late_command

I continually find that certain things "just don't work" when run as preseed/late_command in an Ubuntu Bionic preseed file. (The same applies to autoinstall for Ubuntu Focal.) In this ...
1 vote
1 answer
3k views

Permission denied (publickey). while using SCP command

I have tried to copy some file in tomcat using SCP command scp ubuntu@xxxxxxx:/opt/apache-tomcat-9.0.48/conf/server.xml . ubuntu@xxxxxxx: Permission denied (publickey). help me to get out this Thank ...
2 votes
2 answers
849 views

Nested Command in sed substitution

I'm trying to used sed to find and encrypt ansible_password field in an inventory file and encrypt it with ansible-vault command. But ansible-command is failing throwing an sed error, where as a ...
0 votes
1 answer
388 views

Ansible to reconnect after reboot

I have a task that needs to run after a reboot. I know that checking connection can be done with wait_for_connection. I have the following draft: - name: Reboot host reboot: - name: Wait 300 ...
1 vote
1 answer
315 views

Get sudoers file instantly work after reboot in Ubuntu 20.04

I'm trying to execute an ansible command as a user-level cron job which looks as follows: @reboot /home/jon/.local/bin/ansible-playbook /home/jon/deactivate.yml where deactivate.yml is doing something ...
0 votes
3 answers
1k views

How to noninteractively add Certificate Authority (CA) ssl certificates from script

I have an ansible play that calls a script. The script copies .crt files for my private key infrastructure in to /usr/share/ca-certificates/my.domain.tld Then the script calls: sudo update-ca-...
0 votes
2 answers
1k views

Failed to find required executable brew in paths - Ansible

I installed the latest version of Ubuntu on my Windows 10 and I am trying to run a playbook: --- - name: "My first play" hosts: localhost tasks: - name: "test ...
1 vote
1 answer
275 views

Automation of desktop experience

I am trying to apply inside an Ansible playbook the following logic: Since: dconf read /org/gnome/shell/favorite-apps ['firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', '...
0 votes
1 answer
255 views

Ansible for Juniper on Ubuntu 20.04 - interpreter error

I'm having trouble setting up my Ansible playbook to run for Juniper on Ubuntu 20.04. I works for cisco though . At this point I'm stuck at getting Python 3 to work as the interpreter. Any working ...
  • 1
0 votes
0 answers
36 views

New to Linux Nassing and File sharing

So, I'm building my own tiny NAS. I have a question. I'd want to create a NAS (with SAMBA I'd say? OR whith Ansible NAS?), which would have plex running (and minecraft server ;)). Sometimes I'd want ...
1 vote
1 answer
922 views

Install Older Ansible on Ubuntu 20.04

I have installed the latest Ansible using pip3 on Ubuntu 20.04. After that, even if I installed older Ansible version, it still sees the latest version (2.10.4 ) Here are the outputs and I'm not sure ...
3 votes
1 answer
3k views

Ansible: dpkg-reconfigure -plow unattended-upgrades stopped while running

Here we are trying to start auto updating packages in Ubuntu through Ansible playbook. dpkg-reconfigure -plow unattended-upgrades When we run this command manually, it shows the following prompt, ...
  • 31
0 votes
1 answer
517 views

Ansible showing different version for root and non-root users

I need to use an older version of Ansible (2.9). I added the repo using add-apt-repository ppa:ansible/ansible-2.9. When I run ansible --version as root, I get: ansible 2.9.6 config file = /etc/...
1 vote
0 answers
778 views

Problem on installing Ansible on 18.04 LTS

What I did: sudo apt-add-repository ppa:ansible/ansible ; sudo apt update ; sudo apt install ansible Error message: Some packages could not be installed. This may mean that you have requested an ...
3 votes
1 answer
2k views

"[Errno 2]. No such file or directory: b'apt-get'", "rc": 2

I don't know why when I run my ansible-playbook to install packages on ec2-instances using apt-get this appears.[WARNING]: Updating cache and auto-installing missing dependency: python3-apt fatal: [...
  • 31
2 votes
2 answers
832 views

How can I use Ansible to claim that I accept the Microsoft EULA agreement for ttf-mscorefonts-installer?

How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer? lists some ways to achieve this (GUI, script, puppet config). But I am at loss how to handle echo ttf-mscorefonts-installer ...
1 vote
1 answer
676 views

Reinstall GRUB on second disk's EFI partition from running system

I am trying to do something like this: How can I reinstall GRUB to the EFI partition? However, I don't see how I can run chroot because it's an automated process (with Ansible, but that shouldn't ...
  • 21
5 votes
1 answer
15k views

ansible: How to avoid warnings

I am using ansible for monitoring my home computing net, which consists several Linux machines (x64 and Raspberries). How can I avoid warnings from every Raspberry client? [WARNING]: Platform linux ...
0 votes
0 answers
2k views

How to solve "No package matching 'docker-ce' is available"

I'm using Ubuntu 18.04 with Google Cloud Platform. I'm trying to install docker on my worker machine through my master machine but it keeps giving me the same error. [DEPRECATION WARNING]: Invoking &...
0 votes
1 answer
1k views

How do I fix my ansible playbook

I'm using Ubuntu 18 on GCP and I'm trying to install the chromium browser on my worker from my master node. The playbook that I wrote successfully installed java, and git, on my worker node but I get ...
0 votes
1 answer
3k views

How resolve WARN when run ansible: [WARNING]: Skipping plugin as it seems to be invalid?

When I run ansible command, like this: ansible -i host all -m ping I got this warnings: [WARNING]: Skipping plugin (/usr/lib/python2.7/dist-packages/ansible/plugins/callback/foreman.py) as it seems ...
  • 33
1 vote
1 answer
87 views

Need help with ansible

I have ansible project that automatically installs Patroni HA cluster. Problem is in patroni.conf file. It needs different configuration for every host. For example: Host 1 configuration: scope: ...
0 votes
1 answer
272 views

WSL version 1 Unable to run ansible, module missing

I'm trying to run an Ansible playbook in Ubuntu 18.04.1 under version 1 of the Windows Subsystem for Linux (Windows 10 ver 10.0.18363.751), but I keep getting the error: ImportError: No module named ...
  • 101
2 votes
0 answers
2k views

Dependencies problem when installing ansible in ubuntu 18.04

I try to reinstall ansible in my ubuntu18.04 laptop. I've got this dependencies problem : $ LANG=C sudo apt-get install ansible Reading package lists... Done Building dependency tree Reading ...
2 votes
2 answers
3k views

How to connect Ansible to AWS-EC2 via ssh

I want to connect ansible to EC2 via ssh. I created a key pair on my local machine(ubuntu) and copied it to my EC2 instances using ssh-copy-id. The copy was successful, but I get the error below when ...